getUnlockMethodDetail(id: number)

版本要求:
@ray-js/lock-sdk≥1.0.0

描述

获取开锁方式详细信息

参数

参数类型必填说明
idnumber是记录 id

返回值

类型:Promise<UnlockMethodDetail>
开锁方式详情(云端记录解析结果)
UnlockMethodDetail
属性类型说明
isBoundboolean是否与云端用户绑定
type"finger" | "face" | "password" | "card" | "fingerVein" | "hand" | "eye"开锁方式类型
phasenumber云端阶段/状态值
dpIdnumber对应 DP 数字 id
isSpecialboolean是否特殊开锁方式
unlockNamestring开锁方式名称
userIdstring所属云端用户 id
unlockIdnumber锁端开锁实例 id
lockUserIdnumber锁端用户 id
idstring云端开锁方式记录 id(字符串形态)
userTypenumber用户类型(数值)
通知配置;`isSpecial` 为 true 时有效

错误码

错误码错误信息
1040云端:记录不存在(RECORD_NOT_EXIST)

引用对象

interfaceNotifyInfo
属性类型描述
appSendboolean是否推送 App 消息
msgSendboolean是否发送短信
msgPhonestring短信接收手机号(有值通常表示开启短信)
countryCodestring短信国家码

合法值

return.type
值说明最低版本
finger--
face--
password--
card--
fingerVein--
hand--
eye--

示例代码

import { getUnlockMethodDetail } from '@ray-js/lock-sdk';
const detail = await getUnlockMethodDetail(123456);