From 1242118a6229b39cbf7732f47681898668eb851e Mon Sep 17 00:00:00 2001 From: aihe <961836564@qq.com> Date: Sun, 23 Jun 2024 16:19:00 +0800 Subject: [PATCH] uu --- common/messageNotice/index.js | 2 +- components/tpx-bluetooth-native/tpx-bluetooth-native.vue | 3 ++- components/tpx-bluetooth-print/render-template-native.vue | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/common/messageNotice/index.js b/common/messageNotice/index.js index 264ec47..f172998 100644 --- a/common/messageNotice/index.js +++ b/common/messageNotice/index.js @@ -30,5 +30,5 @@ export const onPushMessage = async()=> { }) let cltRes = await getPushClientId() // 复制 PushClientId - setClipboardData(cltRes.cid) + // setClipboardData(cltRes.cid) } \ No newline at end of file diff --git a/components/tpx-bluetooth-native/tpx-bluetooth-native.vue b/components/tpx-bluetooth-native/tpx-bluetooth-native.vue index 1305c24..e709f1f 100644 --- a/components/tpx-bluetooth-native/tpx-bluetooth-native.vue +++ b/components/tpx-bluetooth-native/tpx-bluetooth-native.vue @@ -199,6 +199,7 @@ export default { var _this = this showLoading('正在连接设备') console.log("连接蓝牙 设备=====", deviceId) + _this.isStateOn = false let bl = await new Promise((resolve)=> { bluetoothTool.connDevice(deviceId,(result) => { console.log('bluetoothTool.connDevice result ====== ', result) @@ -215,7 +216,7 @@ export default { return bl }, getConData() { - return { deviceId: this.deviceId, } + return { deviceId: this.deviceId, isStateOn: this.isStateOn } } } } diff --git a/components/tpx-bluetooth-print/render-template-native.vue b/components/tpx-bluetooth-print/render-template-native.vue index bfb2d7b..42d7c4d 100644 --- a/components/tpx-bluetooth-print/render-template-native.vue +++ b/components/tpx-bluetooth-print/render-template-native.vue @@ -120,10 +120,10 @@ export default { }, checkPrintParam() { let msg = '', bl = false - let { deviceId } = this.$refs.curBlueTooth.getConData() + let { deviceId, isStateOn } = this.$refs.curBlueTooth.getConData() !this.imgData && (msg = '打印内容不能为空,请重试') - if(!msg && !(deviceId)) { - msg = '请选选择打印设备' + if(!msg && !(deviceId && isStateOn)) { + msg = '未连接打印设备' } msg && (showToast(msg)) return {