1
0
forked from dyf/APP

修复蓝牙连接锁未释放的问题

This commit is contained in:
liub
2026-04-30 11:23:28 +08:00
parent 677586e51c
commit 6d9df4c945
24 changed files with 1225 additions and 759 deletions

View File

@ -15,7 +15,7 @@
</block>
</uni-nav-bar>
<view class="eq">
<view class="eq" :style="{marginTop:Status.navbar.height+'px'}">
<view class="leftImg" @click.stop="previewImg(device.devicePic?device.devicePic:formData.img)">
<image class="img" :src="device.devicePic?device.devicePic:formData.img" mode="aspectFit"></image>
@ -84,7 +84,7 @@
</view>
</view>
<view class="warnnig" v-show="formData.sta_ShakeBit!='' && formData.sta_ShakeBit!='0'"
<view class="warnnig" v-show="formData.sta_ShakeBit==1 && formData.sta_ShakeBit==2"
@click="showAction('map')">
<view>{{ShakeBit}}</view>
</view>
@ -297,7 +297,10 @@
permissions: []
}
},
created() {
this.Status.navbar.height = uni.getSystemInfoSync().statusBarHeight + 44;
console.log("this.Status.navbar.height=",this.Status.navbar.height);
},
onUnload() {
console.log("页面卸载,释放资源");
ble.removeAllCallback(pagePath);
@ -355,7 +358,7 @@
these.device.latitude = form.sta_latitude;
these.formData.blename = f.name ? f.name : "Unname";
these.formData.deviceName = device.deviceName;
these.formData.bleStatu = false;
these.formData.deviceId = f.deviceId;
ble.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(res => {
@ -412,6 +415,7 @@
let dic = {
"1": "设备SOS求救中",
"2": "设备静止报警中",
"6":"设备遇水报警中"
};
let keys = Object.keys(dic);
let f = keys.find(key => {