接口错误码兼容处理

This commit is contained in:
Waiting 2024-06-05 15:47:15 +08:00
parent 947d85c1c6
commit f0ca5624ea
2 changed files with 2 additions and 2 deletions

View File

@ -40,4 +40,4 @@
"base": "/uniapp-vue3-template/" "base": "/uniapp-vue3-template/"
} }
} }
} }

View File

@ -61,7 +61,7 @@ function responseInterceptors() {
} }
// 登录状态失效,重新登录 // 登录状态失效,重新登录
if(data.code === 4011) { if(data.code === 4011 || data?.retcode === 4011) {
// 是否在获取token中,防止重复获取 // 是否在获取token中,防止重复获取
if(!isRefreshing) { if(!isRefreshing) {
// 修改登录状态为true // 修改登录状态为true