src/utils/request.ts
@@ -54,6 +54,11 @@ // code: code, // data: data // }) console.log('接收到的参数:', { url: (config.baseUrl || baseUrl) + config.url, code: code, data: data }) if (code === 401) { showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => { if (res.confirm) { @@ -65,7 +70,8 @@ reject('无效的会话,或者会话已过期,请重新登录。') } else if (code === 500) { toast(msg) reject('500') console.error('500错误:', data) reject(data) } else if (code !== 200) { toast(msg) reject(code)