修改安卓蓝牙未开启定位服务的问题

This commit is contained in:
liub
2026-02-03 13:08:49 +08:00
parent fcea5b1dba
commit b1eab86ba6
5 changed files with 53 additions and 47 deletions

View File

@ -76,12 +76,12 @@ class BleHelper {
// recei.ReceiveData(receive, f, path, recArr);
// }, "BleReceiveData");
setTimeout(() => {
this.OpenBlue().then(() => {
this.linkAllDevices();
});
// setTimeout(() => {
// this.OpenBlue().then(() => {
// this.linkAllDevices();
// });
}, 10);
// }, 10);
this.dic = {
errRemarks: [{
@ -139,6 +139,10 @@ class BleHelper {
{
key: '10013',
remark: '连接 deviceId 为空或者是格式不正确'
},
{
key: '10016',
remark: '定位服务已关闭'
}
]
}
@ -445,7 +449,7 @@ class BleHelper {
getError(ex) {
let code = ex.code;
ex.msg = "未知的异常"
ex.msg = code
let f = this.dic.errRemarks.find((v) => {
return v.key == code;
});