fix:修改接口

This commit is contained in:
郭飞 2025-03-14 16:36:24 +08:00
parent c8d8a14c12
commit 2de306c09f
2 changed files with 5 additions and 4 deletions

View File

@ -9,8 +9,9 @@ export default function $http(options) {
console.log(options.url) console.log(options.url)
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// 拦截请求 // 拦截请求
_config.header.Authorization=service.getToken()//这里是调用本地存储配置文件的方法不需要可以改下面这种方式 // _config.header.Authorization=service.getToken()//这里是调用本地存储配置文件的方法不需要可以改下面这种方式
console.log('token',service.getToken() ) let token = uni.getStorageSync('token')
console.log('token',service.getToken(),uni.getStorageSync('token') )
// if(service.getStorageExpires('utn')) { // if(service.getStorageExpires('utn')) {
// _config.header.Authorization = service.getStorageExpires('utn') // _config.header.Authorization = service.getStorageExpires('utn')
// service.setStorageExpires('utn', _config.header.Authorization, 30) // 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['Content-type'] = 'application/json;charset=utf-8'
_config.header['Authorization'] = "Bearer " + options.token _config.header['Authorization'] = "Bearer " + token
_config.timeout = 600000 _config.timeout = 600000
// _config.header['Content-type'] = 'application/x-www-form-urlencoded;charset=utf-8' // _config.header['Content-type'] = 'application/x-www-form-urlencoded;charset=utf-8'
//_config.header.Authorization=uni.getStorageSync(STATE_KEY); //_config.header.Authorization=uni.getStorageSync(STATE_KEY);

View File

@ -503,7 +503,7 @@
getLocationName() { getLocationName() {
this.items_Location = [] this.items_Location = []
if (this.ERPLOCATION != '') { if (this.ERPLOCATION != '') {
this.$MyRequest('/storage/getLocationNameForERPLocation', { this.$MyRequest('/api/storage/getLocationNameForERPLocation', {
ERPLocation: this.ERPLOCATION ERPLocation: this.ERPLOCATION
}).then(res => { }).then(res => {
if (res.data.success) { if (res.data.success) {