Compare commits
4 Commits
8108744d56
...
main
Author | SHA1 | Date | |
---|---|---|---|
55620449e4 | |||
d7a91a6df2 | |||
07064b4b85 | |||
6ee45f6868 |
@ -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
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -1187,16 +1165,15 @@
|
||||
case 12:
|
||||
this.currentMainMode = this.getMainLightModeLabel(deviceState[
|
||||
1]);
|
||||
this.isLaserOn = deviceState[2] === 1;
|
||||
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;
|
||||
@ -1648,7 +1625,7 @@
|
||||
/* 弹窗主体 */
|
||||
.agreement-popup {
|
||||
width: 100%;
|
||||
height: 50%;
|
||||
/* height: 50%; */
|
||||
background-color: rgb(42, 42, 42);
|
||||
border-radius: 60rpx 60rpx 0rpx 0rpx;
|
||||
padding: 40rpx;
|
||||
|
@ -87,6 +87,21 @@
|
||||
}
|
||||
},
|
||||
},
|
||||
// 处理返回键
|
||||
onBackPress() {
|
||||
// 如果绑定成功了,返回时也要刷新首页
|
||||
if (this.isSuccess) {
|
||||
uni.$emit('refreshDeviceList');
|
||||
}
|
||||
return false; // 允许正常返回
|
||||
},
|
||||
// 页面卸载时处理
|
||||
onUnload() {
|
||||
// 如果绑定成功了,卸载时也要刷新首页
|
||||
if (this.isSuccess) {
|
||||
uni.$emit('refreshDeviceList');
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.deviceId) {
|
||||
this.deviceId = decodeURIComponent(options.deviceId);
|
||||
|
@ -6,7 +6,7 @@
|
||||
<image src="/static/images/common/logo.png" class="logo"></image>
|
||||
</view>
|
||||
<view class="user-right">
|
||||
<view class="user-title">富源晟科技</view>
|
||||
<view class="user-title">武汉星汉</view>
|
||||
<view class="ID">ID:123456</view>
|
||||
</view>
|
||||
</view>
|
||||
|
Reference in New Issue
Block a user