From 0ee21d97ac9cf8e55d0663714e3f13927670f6be Mon Sep 17 00:00:00 2001
From: qq_41295110 <qq_41295110@noreply.gitcode.com>
Date: 星期二, 29 七月 2025 15:08:11 +0800
Subject: [PATCH] 修改扫码功能
---
pages/weiwailingliao/form.vue | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/pages/weiwailingliao/form.vue b/pages/weiwailingliao/form.vue
index 4e3c0ba..c21e55b 100644
--- a/pages/weiwailingliao/form.vue
+++ b/pages/weiwailingliao/form.vue
@@ -406,19 +406,21 @@
},
//鎵爜
toScanCode() {
- uni.scanCode({
- onlyFromCamera: true,
- success: (res) => {
- console.log('鏉$爜鍐呭锛�' + res.result);
- if (this.hform.HBarCode == '*') {
- this.hform.HBarCode = this.hform.HBarCode + res.result
- } else {
- this.hform.HBarCode = res.result
- }
-
- this.getCode(this.hform.HBarCode)
+ var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
+ mpaasScanModule.mpaasScan({
+ 'hideAlbum': true,
+ 'timeoutInterval':'10', //瓒呮椂鏃堕棿
+ 'timeoutText':'鏈瘑鍒埌浜岀淮鐮�' //瓒呮椂鎻愰啋
+ },(ret) => {
+ console.log(ret.resp_result)
+ if (this.hform.HBarCode == '*') {
+ this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
+ } else {
+ this.hform.HBarCode = ret.resp_result
}
- });
+
+ this.getCode(this.hform.HBarCode)
+ })
},
showBillList() {
this.$refs.billList.showPopup()
--
Gitblit v1.9.1