018A添加报警日志
This commit is contained in:
81
App.vue
81
App.vue
@ -35,10 +35,10 @@
|
||||
//以上代码仅在开发时使用,否则会出现不可预知的问题。
|
||||
|
||||
// #ifdef APP|APP-PLUS
|
||||
|
||||
let system=uni.getSystemInfoSync();
|
||||
|
||||
|
||||
|
||||
let system = uni.getSystemInfoSync();
|
||||
|
||||
|
||||
let initOS = () => {
|
||||
let ble = bleTool.getBleTool();
|
||||
|
||||
@ -52,10 +52,10 @@
|
||||
}
|
||||
});
|
||||
if (!uni.setAppBadgeNumber) { //兼容鸿蒙的写法
|
||||
if(plus){
|
||||
if (plus) {
|
||||
uni.setAppBadgeNumber = plus.runtime.setBadgeNumber;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
uni.onPushMessage((res) => {
|
||||
console.log("收到推送消息:", res); //监听推送消息
|
||||
@ -73,7 +73,7 @@
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (plus.os.name == 'Android') {
|
||||
if (plus.runtime.isAgreePrivacy()) {
|
||||
initOS();
|
||||
@ -83,8 +83,8 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
console.log("system=",system);
|
||||
|
||||
console.log("system=", system);
|
||||
// #endif
|
||||
},
|
||||
onShow: function() {
|
||||
@ -103,13 +103,13 @@
|
||||
if (appid !== 'HBuilder') {
|
||||
upgrade.checkAndUpdateWgt();
|
||||
}
|
||||
|
||||
|
||||
uni.setKeepScreenOn({
|
||||
keepScreenOn:true
|
||||
}).then(res=>{
|
||||
keepScreenOn: true
|
||||
}).then(res => {
|
||||
console.log("已设置屏幕常亮");
|
||||
}).catch(ex=>{
|
||||
console.error("设置屏幕常亮失败,ex=",ex)
|
||||
}).catch(ex => {
|
||||
console.error("设置屏幕常亮失败,ex=", ex)
|
||||
})
|
||||
// #endif
|
||||
|
||||
@ -118,15 +118,15 @@
|
||||
onHide: function() {
|
||||
console.log('App Hide');
|
||||
// #ifdef APP|APP-PLUS
|
||||
|
||||
|
||||
uni.setKeepScreenOn({
|
||||
keepScreenOn:false
|
||||
}).then(res=>{
|
||||
keepScreenOn: false
|
||||
}).then(res => {
|
||||
console.log("已关闭屏幕常亮");
|
||||
}).catch(ex=>{
|
||||
console.error("设置屏幕常亮失败,ex=",ex)
|
||||
}).catch(ex => {
|
||||
console.error("设置屏幕常亮失败,ex=", ex)
|
||||
})
|
||||
|
||||
|
||||
// 上传中不主动断开:语音上传进行中则不断开蓝牙
|
||||
let ble = bleTool.getBleTool();
|
||||
if (ble && ble.isVoiceUploading && ble.isVoiceUploading()) {
|
||||
@ -143,7 +143,7 @@
|
||||
ble2.StopSearch().catch(ex => {});
|
||||
ble2.disconnectDevice().catch(ex => {});
|
||||
console.log("断开所有蓝牙设备");
|
||||
|
||||
|
||||
|
||||
}
|
||||
}, BLE_DISCONNECT_DELAY);
|
||||
@ -231,9 +231,10 @@
|
||||
color: #ffffffde;
|
||||
}
|
||||
|
||||
.uni-app--maxwidth,.uni-body{
|
||||
background-color: #121212;
|
||||
}
|
||||
.uni-app--maxwidth,
|
||||
.uni-body {
|
||||
background-color: #121212;
|
||||
}
|
||||
|
||||
.fleft {
|
||||
float: left;
|
||||
@ -264,14 +265,32 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: "PingFang SC";
|
||||
src: url("~@/static/fonts/PingFangSC.ttf") format("opentype");
|
||||
.navbarRight .img {
|
||||
width: 35rpx;
|
||||
height: 35rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "PingFangBold";
|
||||
src: url("~@/static/fonts/PingFangBold.ttf") format("opentype");
|
||||
.uni-navbar--fixed {
|
||||
top: 0rpx;
|
||||
}
|
||||
|
||||
::v-deep .uni-navbar--fixed {
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
::v-deep .uni-navbar__placeholder {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
|
||||
// @font-face {
|
||||
// font-family: "PingFang SC";
|
||||
// src: url("~@/static/fonts/PingFangSC.ttf") format("opentype");
|
||||
// }
|
||||
|
||||
// @font-face {
|
||||
// font-family: "PingFangBold";
|
||||
// src: url("~@/static/fonts/PingFangBold.ttf") format("opentype");
|
||||
// }
|
||||
</style>
|
||||
Reference in New Issue
Block a user