From 3caf082c24a6a469bfe78353d14f3f8d10da555a Mon Sep 17 00:00:00 2001 From: 17792275749 <812100002@qq.com> Date: Thu, 29 May 2025 09:15:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E8=BE=93=E5=85=A5wifi?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E5=88=87=E6=8D=A2=E6=97=B6=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configureDevice_3/configureDevice_3.wxml | 24 +++++++--- pages/configureDevice/configureDevice.js | 7 +-- pages/searchDevice/searchDevice.js | 8 +--- project.private.config.json | 44 +++++++++---------- 4 files changed, 42 insertions(+), 41 deletions(-) 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