优化蓝牙订阅在首页的弹窗
This commit is contained in:
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
@ -134,6 +134,9 @@
|
||||
</view>
|
||||
<!-- 蒙板、用于点击任意位置关闭悬浮的菜单 -->
|
||||
<view class="mask" v-show="showTooltip||showshare" @click.stop="closePopMenu"></view>
|
||||
|
||||
|
||||
<MsgBox ref="msgPop" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -772,7 +775,8 @@
|
||||
this.downCallback();
|
||||
});
|
||||
ble = bleTool.getBleTool();
|
||||
recei = BleReceive.getBleReceive();
|
||||
console.log("this=",this);
|
||||
recei = BleReceive.getBleReceive(this);
|
||||
//蓝牙连接成功的回调
|
||||
ble.addRecoveryCallback((res) => {
|
||||
// console.log("蓝牙连接成功的回调");
|
||||
@ -799,8 +803,9 @@
|
||||
|
||||
//接收到消息的回调
|
||||
ble.addReceiveCallback((receive, device, path, recArr) => {
|
||||
// console.error("首页收到消息了");
|
||||
recei.ReceiveData(receive, device, path, recArr);
|
||||
console.error("首页收到消息了");
|
||||
let json=recei.ReceiveData(receive, device, path, recArr);
|
||||
console.error("消息内容",json);
|
||||
this.updateBleStatu();
|
||||
}, pagePath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user