startAddUnlockMethod(params: StartAddUnlockMethodParams)
版本要求:
@ray-js/lock-sdk≥1.0.0
描述
开始添加开锁方式
参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| 是 | 录入参数(userId 用户 id、timeout 超时时间(毫秒)) |
返回值
类型:Promise<StartAddUnlockMethodResult>
无(流程结束后 resolve)
StartAddUnlockMethodResult
| 属性 | 类型 | 说明 |
|---|---|---|
total | number | 总步骤数 |
错误码
| 错误码 | 错误信息 |
|---|---|
1014 | 不支持该开锁方式类型 |
1001 | 设备不在线 |
1002 | 操作超时 |
1015 | ~1025 设备上报添加失败(status 0~10) |
1026 | 设备上报添加失败(status 0xfe) |
1027 | 设备上报未知阶段 |
合法值
StartAddUnlockMethodParams.type
| 值 | 说明 | 最低版本 |
|---|---|---|
finger | - | - |
face | - | - |
password | - | - |
card | - | - |
fingerVein | - | - |
hand | - | - |
eye | - | - |