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) {