查询是否有解锁方式需要分配
checkUnlockMethod
引入
@ray-js/ray^1.5.0 以上版本可使用
import { checkUnlockMethod } from '@ray-js/ray'
参数
CheckUnlockMethodParams
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
devId | string | 是 | 门锁编号 |
返回
CheckUnlockMethodResult
boolean
,查询结果。
函数定义示例
/**
* 查询是否有解锁方式需要分配
*/
export function checkUnlockMethod(params: CheckUnlockMethodParams): Promise<CheckUnlockMethodResult>
查询需要分配的开锁方式列表
getUnlockMethodList
引入
@ray-js/ray^1.5.0 以上版本可使用
import { getUnlockMethodList } from '@ray-js/ray'
参数
GetUnlockMethodListParams
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
devId | string | 是 | 门锁编号 |
返回
GetUnlockMethodListResult
属性 | 类型 | 说明 |
---|---|---|
opmode | boolean | 解锁方式(指纹 1,密码 2,门卡 3) |
unlockInfo | UnlockInfo[] | 待分配的解锁方式详情 |
UnlockInfo
属性 | 类型 | 说明 |
---|---|---|
unlockId | string | 解锁方式编号 |
unlockName | string | 解锁方式名称 |
opmodeId | number | 解锁方式云端序号 |
函数定义示例
/**
* 查询需要分配的开锁方式列表
*/
export function getUnlockMethodList(
params: GetUnlockMethodListParams
): Promise<GetUnlockMethodListResult[]>
绑定解锁方式到人
bindUnlockMethodToUser
引入
@ray-js/ray^1.5.0 以上版本可使用
import { bindUnlockMethodToUser } from '@ray-js/ray'
参数
BindUnlockMethodToUserParams
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
devId | string | 是 | 门锁编号 |
userId | string | 是 | 用户编号 |
unlockIds | string[] | 是 | 解锁方式列表 |
返回
BindUnlockMethodToUserResponse
boolean
,返回参数。
函数定义示例
/**
* 绑定解锁方式到人
*/
export function bindUnlockMethodToUser(
params: BindUnlockMethodToUserParams
): Promise<BindUnlockMethodToUserResponse>
👉 立即免费领取开发资源,体验涂鸦 MiniApp 小程序开发。