1
0
forked from dyf/APP

修复蓝牙连接锁未释放的问题

This commit is contained in:
liub
2026-04-30 11:23:28 +08:00
parent 677586e51c
commit 6d9df4c945
24 changed files with 1225 additions and 759 deletions

67
App.vue
View File

@ -74,9 +74,23 @@
});
});
//监听网络变化
uni.onNetworkStatusChange((res)=>{
let title='网络连接已断开';
if(res.isConnected){
title='网络连接已恢复';
}
uni.showToast({
title:title
});
});
}
if (plus.os.name == 'Android') {
if (system.osName == 'android') {
if (plus.runtime.isAgreePrivacy()) {
initOS();
}
@ -121,6 +135,10 @@
console.log('App Hide');
// #ifdef APP|APP-PLUS
uni.offNetworkStatusChange(result=>{
console.log("取消监听网络变化");
});
uni.setKeepScreenOn({
keepScreenOn: false
}).then(res => {
@ -181,6 +199,7 @@
// }
/* #endif */
/* #ifndef APP-NVUE|APP-PLUS-NVUE */
.custom-file-picker .file-picker__box-content {
background: rgba(26, 26, 26, 1);
border: none !important;
@ -188,76 +207,76 @@
width: 180rpx;
height: 180rpx;
}
.uni-file-picker.custom-file-picker {
overflow: inherit !important;
}
.custom-file-picker .icon-add {
height: 5rpx !important;
width: 70rpx !important;
}
.uni-picker-view-mask {
background: rgba(42, 42, 42, 1);
z-index: -1;
}
.uni-picker-view-content {
position: inherit;
}
.uni-picker-view-wrapper {
background: rgba(42, 42, 42, 1);
}
.green {
color: #aed600 !important;
}
.red {
color: #FF0000 !important;
}
.maincontent {
width: 100%;
min-height: 100vh;
height: auto;
padding: 30rpx;
box-sizing: border-box;
}
.contentBg {
background-color: #121212;
color: #ffffffde;
}
.uni-app--maxwidth,
.uni-body {
background-color: #121212;
}
.fleft {
float: left;
}
.fright {
float: right;
}
.clear {
clear: both;
}
.displayNone {
display: none !important;
}
.visibilityHidden {
visibility: hidden !important;
}
.center {
display: flex;
flex-direction: row;
@ -266,25 +285,27 @@
justify-content: center;
align-items: center;
}
.navbarRight .img {
width: 35rpx;
height: 35rpx;
margin-right: 30rpx;
}
.uni-navbar--fixed {
top: 0rpx;
}
::v-deep .uni-navbar--fixed {
top: 0px;
}
::v-deep .uni-navbar__placeholder {
display: none !important;
}
/* #endif */
// @font-face {
// font-family: "PingFang SC";