流转
This commit is contained in:
@@ -17,7 +17,6 @@ import {
|
||||
|
||||
let timeout = 60000
|
||||
const request = config => {
|
||||
// console.log('config',config);
|
||||
// 是否需要设置 token
|
||||
const storageBaseUrl = 'http://' + getBaseUrl();
|
||||
const isToken = (config.headers || {}).isToken === false
|
||||
@@ -41,17 +40,14 @@ const request = config => {
|
||||
header: config.header,
|
||||
dataType: 'json'
|
||||
}).then(response => {
|
||||
// console.log('response',response);
|
||||
let [error, res] = response
|
||||
if (error) {
|
||||
console.log('config', config);
|
||||
console.log('response', response);
|
||||
console.log('error', error);
|
||||
toast('后端接口连接异常')
|
||||
reject('后端接口连接异常')
|
||||
return
|
||||
}
|
||||
// console.log('response',response,error,res);
|
||||
const code = res.data.code || 200
|
||||
const msg = errorCode[code] || res.data.msg || errorCode['default']
|
||||
if (code === 401) {
|
||||
|
||||
Reference in New Issue
Block a user