添加报警功能
This commit is contained in:
43
App.vue
43
App.vue
@ -1,14 +1,46 @@
|
||||
<script>
|
||||
import bleTool from '@/utils/BleHelper.js'
|
||||
import upgrade from '@/utils/update.js'
|
||||
export default {
|
||||
|
||||
onLaunch: function() {
|
||||
onLaunch: function() {
|
||||
//以下代码仅在开发时使用,否则会出现不可预知的问题。
|
||||
//清除登陆之外的所有信息;
|
||||
// let store=uni.getStorageInfoSync();
|
||||
// store.keys.forEach((val,index,array)=>{
|
||||
// if(val=="tokenTime"){
|
||||
// let time=uni.getStorageSync(val);
|
||||
// if(!time){
|
||||
// time=0;
|
||||
// }
|
||||
// let currTime=new Date().getTime();
|
||||
// if(currTime>=time){
|
||||
// uni.removeStorageSync(val);
|
||||
// uni.removeStorageSync("token");
|
||||
// uni.removeStorageSync("clientID");
|
||||
// }
|
||||
// }
|
||||
// else if(val=="token" || val=="clientID"){
|
||||
// console.log("忽略登陆信息");
|
||||
// }else{
|
||||
// uni.removeStorageSync(val);
|
||||
// }
|
||||
// });
|
||||
//以上代码仅在开发时使用,否则会出现不可预知的问题。
|
||||
|
||||
uni.getSystemInfo({success:function(res){
|
||||
if(res.uniPlatform=='app'){
|
||||
upgrade.checkAndUpdateWgt("http://114.55.111.217/app/CheckUpdate");
|
||||
bleTool.getBleTool();
|
||||
}
|
||||
}});
|
||||
},
|
||||
onShow: function() {
|
||||
console.log('App Show')
|
||||
console.log('App Show');
|
||||
|
||||
},
|
||||
onHide: function() {
|
||||
console.log('App Hide')
|
||||
console.log('App Hide');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -54,4 +86,9 @@
|
||||
.uni-picker-view-wrapper{
|
||||
background: rgba(42, 42, 42, 1);
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "PingFang SC";
|
||||
src: url("~@/static/fonts/PingFangSC.ttf") format("opentype");
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user