1
0
forked from dyf/APP

670加入机器状态、设备详情加接口请求

This commit is contained in:
liub
2025-09-18 17:31:40 +08:00
parent 404e42a7d8
commit cb44810c6b
10 changed files with 454 additions and 221 deletions

View File

@ -415,6 +415,9 @@ class BleHelper {
uni.onBluetoothAdapterStateChange((state) => {
console.log('蓝牙状态发生变化:' + JSON.stringify(state));
if(this.data.available==state.available){
return;
}
this.data.available = state.available;
this.data.discovering = state.discovering;
if (this.data.available && this.data
@ -1095,7 +1098,7 @@ class BleHelper {
},
fail: (ex) => {
ex = this.getError(ex);
console.log("蓝牙连接失败" + JSON.stringify(ex));
console.log("蓝牙"+deviceId+"连接失败" + JSON.stringify(ex));
// 连接超时后自动重试
if (ex.code === 10012 && retryCount < maxRetries) {