智能小程序 Ray 开发门锁 API ——成员解锁 API 接口汇总

校验成员密码是否存在(包括临时密码)

validatePasswordForMember

引入

@ray-js/ray^1.5.0 以上版本可使用

import { validatePasswordForMember } from '@ray-js/ray'

参数

ValidatePwdMemberParams

属性类型必填说明
devIdstring设备 ID
opModeIdnumber操作模式 ID
passwordstring密码

返回

ValidatePwdMemberResult

属性类型说明
validboolean是否有效
errorCodestring错误代码(可选)
errorMsgstring错误信息(可选)

函数定义示例

/**
 * 校验成员密码是否存在(包括临时密码)
 */
export function validatePasswordForMember(
  params: ValidatePwdMemberParams
): Promise<ValidatePwdMemberResult>

添加解锁方式

addMemberUnlockMethod

引入

@ray-js/ray^1.5.0 以上版本可使用

import { addMemberUnlockMethod } from '@ray-js/ray'

参数

AddMemberUnlockMethodParams

属性类型必填说明
devIdstring设备 ID
userIdstring用户 ID
unlockIdnumber解锁 ID
unlockNamestring解锁名称
unlockAttrnumber解锁属性
notifyInfoNotifyInfo通知信息
unlockDetailstring解锁详细信息

返回

AddMemberUnlockMethodResult

属性类型说明
opModeIdstring操作模式 ID
unlockNamestring解锁名称

函数定义示例

/**
 * 添加解锁方式
 */
export function addMemberUnlockMethod(
  params: AddMemberUnlockMethodParams
): Promise<AddMemberUnlockMethodResult>

👉 立即免费领取开发资源,体验涂鸦 MiniApp 小程序开发。 

删除解锁方式

removeMemberUnlockMethod

引入

@ray-js/ray^1.5.0 以上版本可使用

import { removeMemberUnlockMethod } from '@ray-js/ray'

参数

RemoveMemberUnlockMethodParams

属性类型必填说明
devIdstring设备 ID
opmodeIdnumber操作模式 ID

返回

RemoveMemberUnlockMethodResult

boolean,表示操作是否成功。

函数定义示例

/**
 * 删除解锁方式
 */
export function removeMemberUnlockMethod(
  params: RemoveMemberUnlockMethodParams
): Promise<RemoveMemberUnlockMethodResult>

发送设置特殊解锁方式的验证码

sendSpecialUnlockVerifyCode

引入

@ray-js/ray^1.5.0 以上版本可使用

import { sendSpecialUnlockVerifyCode } from '@ray-js/ray'

参数

SendSpecialUnlockVerifyCodeParams

属性类型必填说明
accountstring用户账号

返回

SendSpecialUnlockVerifyCodeResult

boolean,表示操作是否成功。

函数定义示例

/**
 * 发送设置特殊解锁方式的验证码
 */
export function sendSpecialUnlockVerifyCode(
  params: SendSpecialUnlockVerifyCodeParams
): Promise<SendSpecialUnlockVerifyCodeResult>

更新成员的解锁方式

updateMemberUnlockMode

引入

@ray-js/ray^1.5.0 以上版本可使用

import { updateMemberUnlockMode } from '@ray-js/ray'

参数

UpdateMemberUnlockModeParams

属性类型必填说明
devIdstring设备 ID
opModeIdnumber操作模式 ID
unlockNamestring解锁名称
unlockAttrnumber解锁属性
unlockDetailstring解锁详细信息
notifyInfoNotifyInfo通知信息

返回

UpdateMemberUnlockModeResult

boolean,表示操作是否成功。

函数定义示例

/**
 * 更新成员的解锁方式
 */
export function updateMemberUnlockMode(
  params: UpdateMemberUnlockModeParams
): Promise<UpdateMemberUnlockModeResult>

查询某个解锁方式的详情

getUnlockMethodDetail

引入

@ray-js/ray^1.5.0 以上版本可使用

import { getUnlockMethodDetail } from '@ray-js/ray'

参数

UnlockMethodDetailParams

属性类型必填说明
devIdstring设备 ID
opModeIdnumber操作模式 ID

返回

UnlockMethodDetailResult

结构包含解锁方式的详细信息。

函数定义示例

/**
 * 查询某个解锁方式的详情
 */
export function getUnlockMethodDetail(
  params: UnlockMethodDetailParams
): Promise<UnlockMethodDetailResult>

获取创建密码时的序号

getCreatePasswordSN

引入

@ray-js/ray^1.5.0 以上版本可使用

import { getCreatePasswordSN } from '@ray-js/ray'

参数

GetPasswordSNParams

属性类型必填说明
devIdstring设备 ID
dpIdnumber数据点 ID

返回

GetPasswordSNResult

number,表示创建密码时的序号。

函数定义示例

/**
 * 获取创建密码时的序号
 */
export function getCreatePasswordSN(params: GetPasswordSNParams): Promise<GetPasswordSNResult>

👉 立即免费领取开发资源,体验涂鸦 MiniApp 小程序开发。  

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

IoT砖家涂拉拉

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值