From b8e34187f1648bfb2c6dbd25a97ac495bb7c7f55 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期五, 29 七月 2022 10:55:23 +0800
Subject: [PATCH] #

---
 pages/basics/checkout.vue |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/pages/basics/checkout.vue b/pages/basics/checkout.vue
index 70e0790..dd4f473 100644
--- a/pages/basics/checkout.vue
+++ b/pages/basics/checkout.vue
@@ -73,6 +73,7 @@
 	export default {
 		data() {
 			return {
+				commonUrl:null,
 				barcode: '',
 				barcodeFocus:true,
 				focus:false,
@@ -112,9 +113,16 @@
 			this.baseIP = UIP;
 			const UPORT = uni.getStorageSync('UPORT');
 			this.basePORT = UPORT
-			
+			const PROJ = uni.getStorageSync('UPROJ');
+			this.baseUrl = PROJ
+			this.getUrl()
 		},
 		methods: {
+			// 鑾峰彇url
+			getUrl() {
+				this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl
+			},
+			// 鍑哄簱鍒嗕负涓ょ 涓�:鍏ㄦ澘鍑哄簱 鎵弿鎵樼洏鐮佹樉绀哄叏鏉垮晢鍝� 鍙互鐩存帴纭 浜屾槸鍑忔枡鍑哄簱 鎵弿鎵樼洏鐮佹彁绀洪渶瑕佸嚭搴撴暟閲�  鎵弿璐у搧鏉$爜杈惧埌鏈�澶у嚭搴撴暟閲忓嵆鍙�
 			messageToggle(type) {
 				this.msgType = type
 				this.messageText = `杩欐槸涓�鏉�${type}娑堟伅鎻愮ず`
@@ -131,7 +139,9 @@
 				this.barcode = ''
 				this.matnr = ''
 				this.matCount = ''
+				this.removeBarcode();
 				uni.vibrateShort();
+				
 			},
 			removeBarcode() {
 				this.barcode = ''
@@ -190,7 +200,7 @@
 			findBarcode() {
 				let that = this
 				uni.request({
-				    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mobile/pakout/confirm/barcode/auth',
+				    url: that.commonUrl + '/mobile/pakout/confirm/barcode/auth',
 				    data: {
 						barcode:that.barcode
 				    },
@@ -230,7 +240,7 @@
 			findMat() {
 				let that = this
 				uni.request({
-				    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mobile/pakout/confirm/pick/auth',
+				    url: that.commonUrl + '/mobile/pakout/confirm/pick/auth',
 				    data: {
 						wrkNo:that.wrkNo,
 						matnr:that.matnr
@@ -278,6 +288,7 @@
 							}, 1000);
 						} else {
 							uni.showToast({title: res.msg, icon: "none",position: 'top'})
+							that.foucss();
 						}
 						
 					}
@@ -309,7 +320,7 @@
 				}
 				uni.showLoading();
 				uni.request({
-				    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mobile/pakout/confirm/auth',
+				    url: that.commonUrl + '/mobile/pakout/confirm/auth',
 				    data: that.matList,
 					method: 'POST',
 				    header: {

--
Gitblit v1.9.1