From fd232a4478aeb37f207902cb0c2353ee5d4f2bf1 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期五, 07 七月 2023 15:46:00 +0800
Subject: [PATCH] #

---
 pages/basics/pakin.vue |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/pages/basics/pakin.vue b/pages/basics/pakin.vue
index 731017c..d12a626 100644
--- a/pages/basics/pakin.vue
+++ b/pages/basics/pakin.vue
@@ -9,7 +9,7 @@
 				<view class="square-content">
 					<view class="content-input">
 						<input v-model="barcode" type="text" placeholder="鎵爜 / 杈撳叆" 
-						:focus="barcodeFocus" @confirm="barcodeInput()" placeholder-style="line-height:  85rpx;">
+						:focus="barcodeFocus" @input="checkedBarcode()" placeholder-style="line-height:  85rpx;">
 						<uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons>
 					</view>
 				</view>
@@ -197,6 +197,28 @@
 			getUrl() {
 				this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl
 			},
+			// 妫�鏌ユ潯鐮�
+			checkedBarcode() {
+				let that = this
+				uni.request({
+					url: that.commonUrl + '/mobile/barcode/auth',
+					data: {
+						barcode: that.barcode,
+					},
+					header: {
+						'token':uni.getStorageSync('token')
+					},
+					success(result) {
+						var res = result.data
+						if (res.code === 500) {
+							that.barcodeFocuss()
+							uni.showToast({title: res.msg, icon: "none", position: 'top'});
+						} else if(res.code === 200) {
+							that.barcodeInput()
+						}
+					}
+				})
+			},
 			// 鍐荤粨
 			isFrozen() {
 				var temp = this.ck1

--
Gitblit v1.9.1