|
@@ -47,10 +47,10 @@
|
|
|
<view class="start_up_process">
|
|
<view class="start_up_process">
|
|
|
<uni-steps :options="list1" :active-color="colorPrimary" :active="active" />
|
|
<uni-steps :options="list1" :active-color="colorPrimary" :active="active" />
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="ad">
|
|
|
|
|
|
|
+ <!-- <view class="ad">
|
|
|
<image src="../../static/images/ad_reshui.jpg" mode="aspectFill" class="ad_img" @tap="ad_redirect">
|
|
<image src="../../static/images/ad_reshui.jpg" mode="aspectFill" class="ad_img" @tap="ad_redirect">
|
|
|
</image>
|
|
</image>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view> -->
|
|
|
<view class="title">
|
|
<view class="title">
|
|
|
消费记录
|
|
消费记录
|
|
|
</view>
|
|
</view>
|
|
@@ -518,35 +518,49 @@
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.isChecked = false
|
|
|
|
|
+ }, 200)
|
|
|
|
|
+
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
icon: 'none',
|
|
|
title: '先【扫码连接】,后【开启设备】',
|
|
title: '先【扫码连接】,后【开启设备】',
|
|
|
duration: 1500
|
|
duration: 1500
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (!(this.deviceId && this.serviceId)) {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ icon: 'none',
|
|
|
|
|
+ title: '与设备连接中断!请在设备上手动停止即可!',
|
|
|
|
|
+ duration: 3000
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
- this.isChecked = false
|
|
|
|
|
|
|
+ this.setInit()
|
|
|
}, 300)
|
|
}, 300)
|
|
|
|
|
+
|
|
|
|
|
+ return
|
|
|
}
|
|
}
|
|
|
- } else {
|
|
|
|
|
|
|
+
|
|
|
uni.showModal({
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
title: '提示',
|
|
|
content: '确定要关闭设备?',
|
|
content: '确定要关闭设备?',
|
|
|
success: (res) => {
|
|
success: (res) => {
|
|
|
if (res.confirm) {
|
|
if (res.confirm) {
|
|
|
- this.isChecked = false
|
|
|
|
|
-
|
|
|
|
|
if (this.deviceId && this.serviceId) {
|
|
if (this.deviceId && this.serviceId) {
|
|
|
|
|
+ this.isChecked = false
|
|
|
this.send('stop')
|
|
this.send('stop')
|
|
|
} else {
|
|
} else {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
icon: 'none',
|
|
|
title: '与设备连接中断!请在设备上手动停止即可!',
|
|
title: '与设备连接中断!请在设备上手动停止即可!',
|
|
|
- duration: 5000
|
|
|
|
|
|
|
+ duration: 3000
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
- this.isChecked = true
|
|
|
|
|
|
|
+ // this.isChecked = true;
|
|
|
|
|
+ this.setInit()
|
|
|
}, 300)
|
|
}, 300)
|
|
|
}
|
|
}
|
|
|
} else if (res.cancel) {
|
|
} else if (res.cancel) {
|
|
@@ -1274,8 +1288,8 @@
|
|
|
|
|
|
|
|
this.get_Bluetooth_Bevice = false
|
|
this.get_Bluetooth_Bevice = false
|
|
|
this.rooms = [] // 宿舍号,蓝牙连接具有时效性,断开连接后清空
|
|
this.rooms = [] // 宿舍号,蓝牙连接具有时效性,断开连接后清空
|
|
|
- // this.start_code = ''
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.start_code = ''
|
|
|
|
|
+ }, 200)
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1338,20 +1352,21 @@
|
|
|
// console.log(res)
|
|
// console.log(res)
|
|
|
if (val == 'start') {
|
|
if (val == 'start') {
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
- this.isChecked = true
|
|
|
|
|
- this.isConnected = true
|
|
|
|
|
|
|
+ this.isChecked = true;
|
|
|
|
|
+ this.isConnected = true;
|
|
|
|
|
+ this.byte35 = '';
|
|
|
}, 300)
|
|
}, 300)
|
|
|
|
|
|
|
|
this.process_control(3)
|
|
this.process_control(3)
|
|
|
} else if (val == 'stop') {
|
|
} else if (val == 'stop') {
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
- this.isChecked = false
|
|
|
|
|
|
|
+ this.isChecked = false;
|
|
|
}, 300)
|
|
}, 300)
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
fail: (err) => {
|
|
fail: (err) => {
|
|
|
// console.log(err)
|
|
// console.log(err)
|
|
|
- if (err.errCode == 10006) {
|
|
|
|
|
|
|
+ if (err.errCode !== 0) {
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
this.setInit()
|
|
this.setInit()
|
|
|
}, 300)
|
|
}, 300)
|
|
@@ -1359,12 +1374,14 @@
|
|
|
if (this.isConnected) {
|
|
if (this.isConnected) {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '设备连接已断开!请在水表上手动停止!',
|
|
title: '设备连接已断开!请在水表上手动停止!',
|
|
|
- icon: 'none'
|
|
|
|
|
|
|
+ icon: 'none',
|
|
|
|
|
+ duration: 5000
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '设备连接失败!请重试扫描连接!',
|
|
title: '设备连接失败!请重试扫描连接!',
|
|
|
- icon: 'none'
|
|
|
|
|
|
|
+ icon: 'none',
|
|
|
|
|
+ duration: 5000
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|