From 02b5b5cf1ae11b8c0cc410dfafe4f129aacd3d0c Mon Sep 17 00:00:00 2001 From: whycq <123456> Date: 星期二, 16 八月 2022 16:27:11 +0800 Subject: [PATCH] Merge branch 'hylywms' of http://47.97.1.152:5880/r/~whycq/wms-app into hylywms --- pages/basics/pakin.vue | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pages/basics/pakin.vue b/pages/basics/pakin.vue index 33d2310..e382528 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="鎵爜 / 杈撳叆" maxlength="10" - :focus="barcodeFocus" @input="barcodeInput" placeholder-style="line-height: 85rpx;"> + :focus="barcodeFocus" placeholder-style="line-height: 85rpx;"> <uni-icons type="closeempty" size="20" color="#dadada" @click="removeBarcode()"></uni-icons> </view> </view> @@ -116,6 +116,7 @@ export default { data() { return { + commonUrl:null, barcode: '', barcodeFocus:true, focus:false, @@ -146,8 +147,15 @@ 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 + }, // barcode input 浜嬩欢 barcodeInput() { var len = this.barcode.length @@ -227,7 +235,7 @@ } uni.showLoading(); uni.request({ - url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mobile/comb/auth', + url: that.commonUrl + '/mobile/comb/auth', data: JSON.stringify({ barcode: that.barcode, combMats: that.matList @@ -273,7 +281,7 @@ }, success: function(res) { // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑 - res.eventChannel.emit('acceptDataFromOpenerPage', {baseIP:that.baseIP, basePORT:that.basePORT }) + res.eventChannel.emit('acceptDataFromOpenerPage', {commonUrl:that.commonUrl }) }, }); @@ -282,7 +290,7 @@ findMat() { let that = this uni.request({ - url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mat/auth', + url: that.commonUrl + '/mat/auth', data: { matnr:that.matnr }, -- Gitblit v1.9.1