diff --git a/components/configureDevice_3/configureDevice_3.wxml b/components/configureDevice_3/configureDevice_3.wxml index 6c427af..568429c 100644 --- a/components/configureDevice_3/configureDevice_3.wxml +++ b/components/configureDevice_3/configureDevice_3.wxml @@ -35,15 +35,25 @@ 密码 - + + + + + + - + diff --git a/pages/configureDevice/configureDevice.js b/pages/configureDevice/configureDevice.js index 205394a..e0cb5d8 100644 --- a/pages/configureDevice/configureDevice.js +++ b/pages/configureDevice/configureDevice.js @@ -50,17 +50,13 @@ Page({ equipmentCode: scaleDeviceId, }; $.ajax("weighingScale/del/device", params, "POST", true, "正在初始化设备...").then(res => { + ppScale.plugin.Blue.disconnect(); wx.showToast({ icon: "none", title: "设备初始化成功,请重新绑定。", }) // device.list = []; // device.mac = null; - let pages = getCurrentPages(); - let prevPage = pages[pages.length - 2]; - prevPage.setData({ - getDeviceSetting: true - }) setTimeout(() => { wx.navigateBack({ delta: 1 @@ -68,6 +64,7 @@ Page({ }, 1500); }); } else { + ppScale.plugin.Blue.disconnect(); wx.showToast({ icon: "none", title: "设备初始化失败。", diff --git a/pages/searchDevice/searchDevice.js b/pages/searchDevice/searchDevice.js index 9201489..973476d 100644 --- a/pages/searchDevice/searchDevice.js +++ b/pages/searchDevice/searchDevice.js @@ -2,8 +2,6 @@ const app = getApp(); Page({ data: { - getDeviceSetting: false, - initText: "", devicesList: [], searchDevicesList: true, @@ -14,11 +12,7 @@ Page({ }, onShow() { - if (this.data.getDeviceSetting) { - this.getDeviceSettingList(); - } else { - this.checkBluetoothPermissionAndInit(); - } + this.checkBluetoothPermissionAndInit(); }, checkBluetoothPermissionAndInit() { diff --git a/project.private.config.json b/project.private.config.json index cdd4818..b8e5312 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -1,24 +1,24 @@ { - "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", - "projectname": "bodyWeight", - "setting": { - "compileHotReLoad": true, - "urlCheck": false, - "bigPackageSizeSupport": true, - "coverView": true, - "lazyloadPlaceholderEnable": false, - "skylineRenderEnable": false, - "preloadBackgroundData": false, - "autoAudits": false, - "useApiHook": true, - "useApiHostProcess": true, - "showShadowRootInWxmlPanel": true, - "useStaticServer": false, - "useLanDebug": false, - "showES6CompileOption": false, - "checkInvalidKey": true, - "ignoreDevUnusedFiles": true - }, - "libVersion": "3.8.5", - "condition": {} + "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", + "projectname": "bodyWeight", + "setting": { + "compileHotReLoad": true, + "urlCheck": false, + "bigPackageSizeSupport": true, + "coverView": true, + "lazyloadPlaceholderEnable": false, + "skylineRenderEnable": false, + "preloadBackgroundData": false, + "autoAudits": false, + "useApiHook": true, + "useApiHostProcess": true, + "showShadowRootInWxmlPanel": true, + "useStaticServer": false, + "useLanDebug": false, + "showES6CompileOption": false, + "checkInvalidKey": true, + "ignoreDevUnusedFiles": true + }, + "libVersion": "3.8.6", + "condition": {} } \ No newline at end of file