From 6ee45f68687527c0a32866ed35093aba3ef4e6e8 Mon Sep 17 00:00:00 2001 From: fengerli <528575642@qq.com> Date: Fri, 5 Sep 2025 18:48:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/6170/deviceControl/index.vue | 49 ++++++++---------------------- pages/common/user/index.vue | 2 +- 2 files changed, 14 insertions(+), 37 deletions(-) diff --git a/pages/6170/deviceControl/index.vue b/pages/6170/deviceControl/index.vue index 515f2e8..c1466a6 100644 --- a/pages/6170/deviceControl/index.vue +++ b/pages/6170/deviceControl/index.vue @@ -545,15 +545,6 @@ }); return; } - // 防重复提交 - if (this.isProcessing) return; - let loadingShown = false; - uni.showLoading({ - title: '处理中...', - mask: true - }); - loadingShown = true; - this.isProcessing = true if (this.selectedItemIndex === null) return; const selectedItem = this.items[this.selectedItemIndex]; let data = { @@ -573,15 +564,15 @@ }) uni.hideLoading(); this.lightModeA = false; - this.isProcessing = false - loadingShown = false + //this.isProcessing = false + //loadingShown = false } else { uni.showToast({ title: res.msg, icon: 'none' }) - this.isProcessing = false - loadingShown = false + //this.isProcessing = false + //loadingShown = false uni.hideLoading(); } }) @@ -599,15 +590,6 @@ }); return; } - // 防重复提交 - if (this.isProcessing) return; - let loadingShown = false; - uni.showLoading({ - title: '处理中...', - mask: true - }); - loadingShown = true; - this.isProcessing = true const instructValue = this.isLaserOn ? 0 : 1; let data = { deviceId: this.computedDeviceId, @@ -625,15 +607,11 @@ this.isLaserOn = !this.isLaserOn; this.currentlaserMode = this.isLaserOn ? "开启" : "关闭"; this.lightModeC = false; - this.isProcessing = false - loadingShown = false } else { uni.showToast({ title: res.msg, icon: 'none' }); - this.isProcessing = false - loadingShown = false } }) }, @@ -730,7 +708,7 @@ const statusRes = await getdeviceSTatus({ functionMode: 1, batchId, - typeName:'FunctionAccessStatusRule', + typeName: 'FunctionAccessStatusRule', deviceImei, interval: 800 }, @@ -913,7 +891,7 @@ const statusRes = await getdeviceSTatus({ functionMode: 2, batchId, - typeName:'FunctionAccessBatchStatusRule', + typeName: 'FunctionAccessBatchStatusRule', deviceImei, interval: 500 }, @@ -995,7 +973,7 @@ const statusRes = await getdeviceSTatus({ functionMode: 2, batchId, - typeName:'FunctionAccessBatchStatusRule', + typeName: 'FunctionAccessBatchStatusRule', deviceImei, interval: 500 }, @@ -1187,16 +1165,15 @@ case 12: this.currentMainMode = this.getMainLightModeLabel(deviceState[ 1]); - this.isLaserOn = deviceState[2] === 1; - this.currentlaserMode = this.isLaserOn ? "开启" : "关闭"; + this.isLaserOn = deviceState[2] === 1; //第3位表示当时激光灯档位 + this.currentlaserMode = this.isLaserOn ? "开启" : "关闭"; if (this.deviceInfo) { - this.deviceInfo.batteryPercentage = deviceState[3]; - this.deviceInfo.chargeState = deviceState[4]; - this.deviceInfo.batteryRemainingTime = deviceState[5]; + this.deviceInfo.batteryPercentage = deviceState[3]; //第4位电量百分比 + this.deviceInfo.chargeState = deviceState[4]; //第5位为充电状态(0没有充电,1正在充电,2为已充满) + this.deviceInfo.batteryRemainingTime = deviceState[5]; //第6位200代表电池剩余续航时间200分钟 } setTimeout(() => { - if (this.deviceInfo.batteryPercentage < - 20) { + if (this.deviceInfo.batteryPercentage <20 && this.deviceInfo.chargeState == 0) { this.popupType = 'bettery'; this.popupMessage = '请及时充电'; this.showPopupFlag = true; diff --git a/pages/common/user/index.vue b/pages/common/user/index.vue index d3dfa59..2a62915 100644 --- a/pages/common/user/index.vue +++ b/pages/common/user/index.vue @@ -6,7 +6,7 @@ - 富源晟科技 + 武汉星汉 ID:123456