1
0
forked from dyf/APP

018A初步完成

This commit is contained in:
liub
2026-04-14 15:19:05 +08:00
parent d82ae6445e
commit 01ff9c7a05
43 changed files with 2626 additions and 892 deletions

17
App.vue
View File

@ -35,6 +35,10 @@
//以上代码仅在开发时使用,否则会出现不可预知的问题。
// #ifdef APP|APP-PLUS
let system=uni.getSystemInfoSync();
let initOS = () => {
let ble = bleTool.getBleTool();
@ -48,14 +52,17 @@
}
});
if (!uni.setAppBadgeNumber) { //兼容鸿蒙的写法
uni.setAppBadgeNumber = plus.runtime.setBadgeNumber;
if(plus){
uni.setAppBadgeNumber = plus.runtime.setBadgeNumber;
}
}
uni.onPushMessage((res) => {
console.log("收到推送消息:", res); //监听推送消息
if (res.type == 'click') {
//将App角标设置为0清空app在消息中心的所有消息
uni.setAppBadgeNumber(0);
plus.push.clear();
plus && plus.push.clear();
return;
}
uni.createPushMessage({
@ -66,6 +73,7 @@
});
}
if (plus.os.name == 'Android') {
if (plus.runtime.isAgreePrivacy()) {
initOS();
@ -75,7 +83,7 @@
}
let system=uni.getSystemInfoSync();
console.log("system=",system);
// #endif
},
@ -206,6 +214,9 @@
color: #ffffffde;
}
.uni-app--maxwidth,.uni-body{
background-color: #121212;
}
.fleft {
float: left;