优化蓝牙订阅在首页的弹窗

This commit is contained in:
liub
2026-04-06 14:02:00 +08:00
parent 1e51023c00
commit 2b7ae4ebaa
5 changed files with 232 additions and 208 deletions

View File

@ -482,20 +482,20 @@
ble.addStateBreakCallback(() => {
uni.showModal({
title: '提示',
content: '蓝牙不可用'
});
MsgError('蓝牙不可用','',these);
these.EquipMents.filter((v, i) => {
these.$set(these.EquipMents[i], 'link', false);
});
}, pagePath);
ble.addStateRecoveryCallback(() => {
uni.showModal({
title: '提示',
content: '蓝牙恢复可用'
});
MsgSuccess('蓝牙恢复可用','',these,()=>{
MsgClear(these);
})
},
pagePath);
@ -568,7 +568,7 @@
plus.runtime.openURL('weixin://', (err) => {
MsgError("打开微信失败,请手动打开微信粘贴");
MsgError("打开微信失败,请手动打开微信,发送至'文件传输助手'");
});
},
fail(ex){
@ -805,10 +805,8 @@
let json = getUrlParams(res.result);
if (!json.key) {
uni.showModal({
title: '错误',
content: "无效的二维码"
})
MsgError('无效的二维码','',these);
return;
}
this.scanKey = json.key;
@ -1050,9 +1048,8 @@
these.sendEquipToMq();
}).catch(ex => {
console.log("ex=", ex)
uni.showModal({
content: "连接失败:" + ex.msg
});
MsgError("连接失败:" + ex.msg,'',these);
hideLoading(these);
});
}