Browse Source

no message

master
xiaohei 1 year ago
parent
commit
2eb735cb55
2 changed files with 15 additions and 13 deletions
  1. +13
    -11
      pages/Bluetooth/Bluetooth.js
  2. +2
    -2
      pages/Bluetooth/Bluetooth.wxml

+ 13
- 11
pages/Bluetooth/Bluetooth.js View File

@ -234,6 +234,7 @@ Page({
} }
let superAdminId = superAdmin.join('').slice(superAdmin.length - 8, superAdmin.length) let superAdminId = superAdmin.join('').slice(superAdmin.length - 8, superAdmin.length)
basecode = superAdminId basecode = superAdminId
console.log(superAdminId, basecode);
this.setData({ this.setData({
deviceInfo: res.data.list[0], deviceInfo: res.data.list[0],
lock: lock, lock: lock,
@ -1764,16 +1765,17 @@ Page({
deviceimei = this.data.deviceNum.slice(this.data.deviceNum.length - 15, this.data.deviceNum.length) deviceimei = this.data.deviceNum.slice(this.data.deviceNum.length - 15, this.data.deviceNum.length)
} }
} }
for (let i = 0; i < superAdminIdlist.length; i++) {
if (superAdminIdlist[i] >= 0 && superAdminIdlist[i] <= 9) {
superAdmin.push(superAdminIdlist[i])
} else {
let adminid = superAdminIdlist.charCodeAt(i)
superAdmin.push(adminid)
}
}
superAdminId = superAdmin.join('').slice(superAdmin.length - 8, superAdmin.length)
console.log(lockMac, superAdminIdlist, superAdminId);
// for (let i = 0; i < superAdminIdlist.length; i++) {
// if (superAdminIdlist[i] >= 0 && superAdminIdlist[i] <= 9) {
// superAdmin.push(superAdminIdlist[i])
// } else {
// let adminid = superAdminIdlist.charCodeAt(i)
// superAdmin.push(adminid)
// }
// }
// superAdminId = superAdmin.join('').slice(superAdmin.length - 8, superAdmin.length)
// console.log(lockMac, superAdminIdlist, superAdminId);
console.log("123123123123", basecode);
let data = { let data = {
code: 'lwj/registerDevice', code: 'lwj/registerDevice',
data: { data: {
@ -1792,7 +1794,7 @@ Page({
code: 'lwj/registerSupperAdmin', code: 'lwj/registerSupperAdmin',
data: { data: {
lockerId: that.data.deviceNum, lockerId: that.data.deviceNum,
lockerSuperAdminId: superAdminId,
lockerSuperAdminId: basecode,
bluetoothMac: lockMac bluetoothMac: lockMac
} }
} }


+ 2
- 2
pages/Bluetooth/Bluetooth.wxml View File

@ -131,8 +131,8 @@
</view> </view>
<view class='row'> <view class='row'>
<button class="button-action" type='primary' bindtap="changemanId" disabled="{{!resgiterdevice}}">注册到平台</button>
<!-- <button class="button-action" type='primary' bindtap="changemanId">注册到平台</button> -->
<!-- <button class="button-action" type='primary' bindtap="changemanId" disabled="{{!resgiterdevice}}">注册到平台</button> -->
<button class="button-action" type='primary' bindtap="changemanId">注册到平台</button>
<button class="button-action" type='primary' bindtap="bindRoomMethods" disabled="{{resgiterdevice}}">绑定房间</button> <button class="button-action" type='primary' bindtap="bindRoomMethods" disabled="{{resgiterdevice}}">绑定房间</button>
</view> </view>


Loading…
Cancel
Save