From 492082f5429f45d23204628468dd995b14cf53c8 Mon Sep 17 00:00:00 2001 From: lsh <lsh123456> Date: 星期二, 21 二月 2023 19:36:40 +0800 Subject: [PATCH] # --- pages/basics/offline.vue | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pages/basics/offline.vue b/pages/basics/offline.vue index fe45e1f..68df42e 100644 --- a/pages/basics/offline.vue +++ b/pages/basics/offline.vue @@ -95,6 +95,7 @@ export default { data() { return { + commonUrl:null, barcode: '', barcodeFocus:true, focus:false, @@ -121,8 +122,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 + }, focuss() { // uni.hideKeyboard() }, @@ -202,7 +210,7 @@ } uni.showLoading(); uni.request({ - url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mobile/pack/comb/auth', + url: that.commonUrl + '/mobile/pack/comb/auth', data: JSON.stringify({ barcode: that.barcode, combMats: that.matList @@ -244,7 +252,7 @@ findMat() { let that = this uni.request({ - url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mobile/pack/get/auth', + url: that.commonUrl + '/mobile/pack/get/auth', data: { barcode: that.matNo }, -- Gitblit v1.9.1