diff --git a/pages/roomDetail/roomDetail.js b/pages/roomDetail/roomDetail.js index c535039..bf3644d 100644 --- a/pages/roomDetail/roomDetail.js +++ b/pages/roomDetail/roomDetail.js @@ -1251,7 +1251,8 @@ Page({ this.personnelmanagement() } } else { - this.searchDevicesMethods() + this.searchDevicesMethods() + } } }, @@ -1268,10 +1269,10 @@ Page({ searchDevicesMethods() { var that = this; - wx.showLoading({ - title: '正在搜索', - // mask: true - }) + // wx.showLoading({ + // title: '正在搜索', + // // mask: true + // }) this.setData({ searchClick: false }) @@ -1279,11 +1280,24 @@ Page({ success: function (res) { wx.startBluetoothDevicesDiscovery({ success: function (res) { + let it={name:that.data.deviceinfo.deviceNum,deviceId:that.data.deviceinfo.bluetoothMac,mac:that.data.deviceinfo.bluetoothMac,localName:that.data.deviceinfo.deviceId} + lockModel = util1.getLockModel(that.data.deviceinfo.deviceNum) + it.lockType = util1.getLockType(lockModel) + app.addDeviceWithDevName(it.name, it) + connectedDeviceId = it.deviceId + lockDevice = it + app.globalData.isSearch = true + that.data.isSearch = true + console.log(that.data.deviceinfo.deviceNum,it.name,'ppppp') + that.connectTo() + return wx.getBluetoothDevices({ success: function (res) { console.log(res) + let i=1 res.devices.map(it => { var status = it.name.indexOf('WSL') + i++ if (status != -1) { if (it.RSSI != 127) { if (it.advertisData != null) { @@ -1344,9 +1358,10 @@ Page({ } } }) - if (!that.data.isSearch && that.data.toSearch) { - that.searchDevicesMethods() - } + // if (!that.data.isSearch) { + // that.searchDevicesMethods() + // console.log(i,'iii1') + // } } }) }, @@ -1552,7 +1567,6 @@ Page({ deviceId: lockDevice.deviceId, timeout: config.ble.connectTimeOut, success: function (res) { - console.debug('connectTo', res) isConnected = true wx.hideLoading() setTimeout(function () { diff --git a/utils/ICINPakage/ICINLocker.js b/utils/ICINPakage/ICINLocker.js index 8f79939..c046bf4 100644 --- a/utils/ICINPakage/ICINLocker.js +++ b/utils/ICINPakage/ICINLocker.js @@ -2634,7 +2634,6 @@ export default class ICINLocker { let userID4AuthCode = str2Hex(_userID); let userId = userID4AuthCode.PadRight(40, "0"); let pwd = str2Hex(_pwd).PadRight(40, "0"); - console.log("2637", _useCountLimit, _useCountLimit.toString(16), typeof (_useCountLimit.toString(16))); let useCountLimit = _useCountLimit.toString(16).PadLeft(2, "0"); let token = "00000000".PadRight(8, "0"); let startTime = _startTime.PadRight(8, "0");