目录
兼容性:企业微信 iOS、Android 2.8.2 开始支持
查看设备。
ww.openDeviceProfile({
deviceSn: 'QYWX001'
})
调用者必须拥有指定 deviceSn 的管理权限。
属性 | 类型 | 必填 | 说明 | |
---|---|---|---|---|
deviceSn | string | 是 | 已绑定的设备SN | |
success | Function | 否 | 成功回调 | |
fail | Function | 否 | 失败回调 | |
cancel | Function | 否 | 取消回调 | |
complete | Function | 否 | 完成回调 |
Promise<Object>
属性 | 类型 | 必填 | 说明 | |
---|---|---|---|---|
errMsg | string | 是 | 通用错误信息 | |
errCode | number | 是 | 通用错误码 |
若开发者需要在 web 端引导跳转设备管理,可以构造链接跳转:https://work.weixin.qq.com/wework_admin/frame#hardware/device?sn={{DEVICESN}}
。
errMsg | 说明 |
---|---|
openDeviceProfile:ok | 执行成功 |
openDeviceProfile:fail_device_permission_denied | 管理员无设备管理权限 |
openDeviceProfile:fail_device_not_found | 不存在此设备 |
wx.invoke("openDeviceProfile", {
"deviceSn": "QYWX001", // 设备SN
},function(res){
if (res.err_msg == "openDeviceProfile:ok")
{
// 打开设备详情页成功
}
});