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

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

@ -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);