This commit is contained in:
aihe 2024-06-23 16:19:00 +08:00
parent f5ecf271e1
commit 1242118a62
3 changed files with 6 additions and 5 deletions

View File

@ -30,5 +30,5 @@ export const onPushMessage = async()=> {
})
let cltRes = await getPushClientId()
// 复制 PushClientId
setClipboardData(cltRes.cid)
// setClipboardData(cltRes.cid)
}

View File

@ -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 }
}
}
}

View File

@ -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 {