优化蓝牙扫描动画看起来更平滑,安卓修改隐私和协议的链接

This commit is contained in:
liub
2026-02-09 16:07:03 +08:00
parent 8f211750b0
commit 63214ded3b
2 changed files with 31 additions and 31 deletions

View File

@ -481,7 +481,10 @@
}
plus.android.requestPermissions(
['android.permission.BLUETOOTH','android.permission.BLUETOOTH_ADMIN','android.permission.ACCESS_FINE_LOCATION','android.permission.ACCESS_COARSE_LOCATION'],
['android.permission.BLUETOOTH', 'android.permission.BLUETOOTH_ADMIN',
'android.permission.ACCESS_FINE_LOCATION',
'android.permission.ACCESS_COARSE_LOCATION'
],
(result) => {
if (result.granted && result.granted.length > 0) {
console.log('定位权限已授予');
@ -533,22 +536,24 @@
return;
}
}
showLoading(these,{text:'正在刷新'})
showLoading(these, {
text: '正在刷新'
})
let time = null;
let startSearch = () => {
if(time!==null){
clearTimeout(time);
if (time !== null) {
clearTimeout(time);
}
time = setTimeout(() => {
these.EquipMents = [];
these.PairEquip = [];
ble.StartSearch().then(result => {
console.log("开始搜索成功",result);
}).catch(err => {
console.log("开始搜索成功", result);
}).catch(err => {
console.error("开始搜索失败:", err);
if (err.code === 10001) {
these.showOpenSetting();
@ -557,9 +562,9 @@
title: '提示',
content: '出现错误:' + err.msg
});
}
}).finally(()=>{
}).finally(() => {
hideLoading(these);
});
}, 200);
@ -905,11 +910,11 @@
position: absolute;
border-radius: 50%;
background-color: #bbe60033;
animation: expand 4s infinite ease-out;
display: inline-block;
transform: translate(-50%, -50%);
border: 1rpx solid #bbe6003d;
animation: expand 5s infinite ease-in-out;
animation: expand 4s infinite ease-in-out;
}
.circle:nth-child(2) {
@ -922,23 +927,18 @@
@keyframes expand {
0% {
width: 0;
height: 0;
opacity: 0.8;
}
80% {
width: 18.75rem;
height: 18.75rem;
opacity: 0.2;
}
100% {
width: 0.5rem;
height: 0.5rem;
opacity: 0.5;
}
width: 0;
height: 0;
opacity: 0.9;
}
100% {
width: 18rem;
height: 18rem;
opacity: 0;
}
}
.mainContent {