From 2de306c09f2e275a28266f8de32e53dbdccd073f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E9=A3=9E?= Date: Fri, 14 Mar 2025 16:36:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/request.js | 7 ++++--- pages/material/features/ProduceReturnPage/index.vue | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/common/request.js b/common/request.js index 2c0e3aa..dba1dad 100644 --- a/common/request.js +++ b/common/request.js @@ -9,8 +9,9 @@ export default function $http(options) { console.log(options.url) return new Promise((resolve, reject) => { // 拦截请求 - _config.header.Authorization=service.getToken()//这里是调用本地存储配置文件的方法不需要可以改下面这种方式 - console.log('token',service.getToken() ) + // _config.header.Authorization=service.getToken()//这里是调用本地存储配置文件的方法不需要可以改下面这种方式 + let token = uni.getStorageSync('token') + console.log('token',service.getToken(),uni.getStorageSync('token') ) // if(service.getStorageExpires('utn')) { // _config.header.Authorization = service.getStorageExpires('utn') // service.setStorageExpires('utn', _config.header.Authorization, 30) @@ -23,7 +24,7 @@ export default function $http(options) { // } _config.header['Content-type'] = 'application/json;charset=utf-8' - _config.header['Authorization'] = "Bearer " + options.token + _config.header['Authorization'] = "Bearer " + token _config.timeout = 600000 // _config.header['Content-type'] = 'application/x-www-form-urlencoded;charset=utf-8' //_config.header.Authorization=uni.getStorageSync(STATE_KEY); diff --git a/pages/material/features/ProduceReturnPage/index.vue b/pages/material/features/ProduceReturnPage/index.vue index 66c20bb..e091f03 100644 --- a/pages/material/features/ProduceReturnPage/index.vue +++ b/pages/material/features/ProduceReturnPage/index.vue @@ -503,7 +503,7 @@ getLocationName() { this.items_Location = [] if (this.ERPLOCATION != '') { - this.$MyRequest('/storage/getLocationNameForERPLocation', { + this.$MyRequest('/api/storage/getLocationNameForERPLocation', { ERPLocation: this.ERPLOCATION }).then(res => { if (res.data.success) {