1
0
forked from dyf/APP

常规小优化

This commit is contained in:
liub
2026-04-22 08:29:06 +08:00
parent 01ff9c7a05
commit 1f88de4710
22 changed files with 1682 additions and 392 deletions

17
App.vue
View File

@ -103,6 +103,14 @@
if (appid !== 'HBuilder') {
upgrade.checkAndUpdateWgt();
}
uni.setKeepScreenOn({
keepScreenOn:true
}).then(res=>{
console.log("已设置屏幕常亮");
}).catch(ex=>{
console.error("设置屏幕常亮失败,ex=",ex)
})
// #endif
@ -110,6 +118,15 @@
onHide: function() {
console.log('App Hide');
// #ifdef APP|APP-PLUS
uni.setKeepScreenOn({
keepScreenOn:false
}).then(res=>{
console.log("已关闭屏幕常亮");
}).catch(ex=>{
console.error("设置屏幕常亮失败,ex=",ex)
})
// 上传中不主动断开:语音上传进行中则不断开蓝牙
let ble = bleTool.getBleTool();
if (ble && ble.isVoiceUploading && ble.isVoiceUploading()) {