From bbae990ed1f4574fa954753faeae159052d03fba Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期二, 27 一月 2026 16:14:06 +0800
Subject: [PATCH] 待我审核增加销售订单,采购订单
---
components/blueToothConnector/blueToothConnector.vue | 22 +++++++---------------
1 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/components/blueToothConnector/blueToothConnector.vue b/components/blueToothConnector/blueToothConnector.vue
index ce6052b..b8d00cf 100644
--- a/components/blueToothConnector/blueToothConnector.vue
+++ b/components/blueToothConnector/blueToothConnector.vue
@@ -32,6 +32,7 @@
</template>
<script>
+ import printerMeta from "../../static/json/printerMeta.json";
import {
CommonUtils
} from '../../utils/common';
@@ -189,7 +190,7 @@
that.clock.stop();
reject(new Error('璇诲彇瓒呮椂'));
}
- }, 2000);
+ }, printerMeta['timeoutPerMillSecond']);
// 鍚姩鏃堕挓
that.clock.start();
@@ -201,31 +202,22 @@
title: "鍙戦�佷腑..."
})
// console.log("msg: " + cmd);
- let toast = (msg) => {
- uni.hideLoading()
- uni.showToast({
- icon: 'none',
- title: msg,
- duration: 2000
- })
- }
let that = this
return new Promise((resolve, reject) => {
const result = blueToothTool.sendByteData(cmd);
if (!result) {
- toast("鍙戦�佸け璐�,璇烽噸璇�...")
- reject(false)
+ this.clock.stop();
+ reject("鍙戦�佸け璐�,璇烽噸璇�...")
}
- that.checkReadSuccess(5)
+ that.checkReadSuccess(printerMeta['timeoutCount'])
.then((res) => {
if (res === true) {
- toast('鍙戦�佹垚鍔�!!!')
resolve(true)
}
})
.catch((err) => {
- toast('璁惧寮傚父,璇锋鏌ヨ澶囩姸鎬�...')
- reject(false)
+ this.clock.stop();
+ reject('璁惧寮傚父,璇锋鏌ヨ澶囩姸鎬�...')
})
.finally(() => {
that.readSuccess = false
--
Gitblit v1.9.1