蓝牙添加连接、断开、可用、不可用控制
This commit is contained in:
31
App.vue
31
App.vue
@ -29,17 +29,23 @@
|
||||
// uni.clearStorageSync();
|
||||
//以上代码仅在开发时使用,否则会出现不可预知的问题。
|
||||
|
||||
uni.getSystemInfo({success:function(res){
|
||||
if(res.uniPlatform=='app'){
|
||||
bleTool.getBleTool();
|
||||
upgrade.checkAndUpdateWgt();
|
||||
|
||||
}
|
||||
}});
|
||||
|
||||
},
|
||||
onShow: function() {
|
||||
console.log('App Show');
|
||||
|
||||
//将检查更新换到onshow,因为苹果用户喜欢一直挂着
|
||||
uni.getSystemInfo({success:function(res){
|
||||
if(res.uniPlatform=='app'){
|
||||
let appid=plus.runtime.appid;
|
||||
if(appid!=='HBuilder'){
|
||||
console.log("appid=",appid);
|
||||
bleTool.getBleTool();
|
||||
upgrade.checkAndUpdateWgt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}});
|
||||
},
|
||||
onHide: function() {
|
||||
console.log('App Hide');
|
||||
@ -92,6 +98,15 @@
|
||||
background: rgba(42, 42, 42, 1);
|
||||
}
|
||||
|
||||
.green{
|
||||
color: #BBE600 !important;
|
||||
}
|
||||
|
||||
.red{
|
||||
color:#E03434 !important;
|
||||
}
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: "PingFang SC";
|
||||
src: url("~@/static/fonts/PingFangSC.ttf") format("opentype");
|
||||
|
||||
Reference in New Issue
Block a user