修复蓝牙连接锁未释放的问题
This commit is contained in:
@ -21,7 +21,7 @@
|
||||
|
||||
</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>
|
||||
</view>
|
||||
@ -296,7 +296,9 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.Status.navbar.height = uni.getSystemInfoSync().statusBarHeight + 44;
|
||||
},
|
||||
onUnload() {
|
||||
console.log("页面卸载,释放资源");
|
||||
ble.removeAllCallback(pagePath);
|
||||
@ -667,20 +669,7 @@ import request, { baseURL } from '@/utils/request.js';
|
||||
return;
|
||||
}
|
||||
}
|
||||
let phone = uni.getStorageSync('phone');
|
||||
if (phone === '17671332251') {
|
||||
console.log("default=",that.device);
|
||||
that.formData.company = '湖北消防总队';
|
||||
that.formData.name = '胡红军';
|
||||
that.formData.job = '中队长';
|
||||
let arr=that.device.bluetoothName.split('-');
|
||||
if(arr.length>1){
|
||||
that.formData.id =arr[arr.length-1];
|
||||
}else{
|
||||
that.formData.id =that.device.bluetoothName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user