1
0
forked from dyf/APP

蓝牙添加连接、断开、可用、不可用控制

This commit is contained in:
liub
2025-10-17 11:52:26 +08:00
parent 0ce4f4bef0
commit b114f6690d
13 changed files with 3024 additions and 407 deletions

31
App.vue
View File

@ -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");