From 6100ae71b3a2bd1812a18e43bf7717a5b63eeac3 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: Thu, 14 Mar 2024 19:00:17 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=AB=E7=A0=81=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/appointment/appointment.vue | 39 ++++++++++++++++++++++++++++---
1 file changed, 36 insertions(+), 3 deletions(-)
diff --git a/pages/appointment/appointment.vue b/pages/appointment/appointment.vue
index 96dfbf1..cf543c5 100644
--- a/pages/appointment/appointment.vue
+++ b/pages/appointment/appointment.vue
@@ -6,7 +6,12 @@
+
+
+
+
+
@@ -133,6 +138,34 @@
this._loadMyModify();
},
methods: {
+ scanCodeHandler() {
+ let that = this;
+ // 调起条码扫描
+ uni.scanCode({
+ onlyFromCamera: true, // 是否只能从相机扫码,不允许从相册选择图片
+ scanType: ['qrCode'], // 扫码类型 qrCode二维码
+ autoZoom: false, // 是否启用自动放大,默认启用
+ success: function(res) {
+ console.log(`扫码结果:${JSON.stringify(res,null,2)}`);
+ that.parseQRCode(res);
+ },
+ fail: function(err) {
+ console.log(`错误:${err}`);
+ },
+ complete: function(data) {
+ console.log('ok!');
+ }
+ });
+ },
+ // 解析二维码,处理业务
+ parseQRCode(data) {
+ uni.vibrateShort(); // 震动提示
+ console.log({
+ title: data.result
+ });
+ this.comfirmTimeId(data.result);
+ //uni.showToast({title: data.result}); // 弹出提示
+ },
_searchRepair: function() {
this.myOrders = [];
this.page = 1;
@@ -227,7 +260,7 @@
// debugger
_that.repairName = timeId;
// debugger
- setTimeout(function() {
+ setTimeout(function() {
uni.showModal({
cancelText: "取消", // 取消按钮的文字
confirmText: "核销",
@@ -250,7 +283,7 @@
wx.hideLoading();
_that._loadMyModify();
});
- }
+ }
}
});
}, 1000);
@@ -262,4 +295,4 @@
+
\ No newline at end of file