This commit is contained in:
2024-12-03 20:19:15 +08:00
parent 1009f80c35
commit 8ea28a0af6
11 changed files with 668 additions and 158 deletions

View File

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