diff --git a/pages/Bluetooth/Bluetooth.js b/pages/Bluetooth/Bluetooth.js index 0355b19..3750f57 100644 --- a/pages/Bluetooth/Bluetooth.js +++ b/pages/Bluetooth/Bluetooth.js @@ -234,6 +234,7 @@ Page({ } let superAdminId = superAdmin.join('').slice(superAdmin.length - 8, superAdmin.length) basecode = superAdminId + console.log(superAdminId, basecode); this.setData({ deviceInfo: res.data.list[0], lock: lock, @@ -1764,16 +1765,17 @@ Page({ 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 = { code: 'lwj/registerDevice', data: { @@ -1792,7 +1794,7 @@ Page({ code: 'lwj/registerSupperAdmin', data: { lockerId: that.data.deviceNum, - lockerSuperAdminId: superAdminId, + lockerSuperAdminId: basecode, bluetoothMac: lockMac } } diff --git a/pages/Bluetooth/Bluetooth.wxml b/pages/Bluetooth/Bluetooth.wxml index f780c1b..ac2aff7 100644 --- a/pages/Bluetooth/Bluetooth.wxml +++ b/pages/Bluetooth/Bluetooth.wxml @@ -131,8 +131,8 @@ - - + +