修改部分bug

This commit is contained in:
2022-06-29 13:50:38 +08:00
parent ddcae32b63
commit 8f470fa084
9 changed files with 124 additions and 48 deletions
+3 -9
View File
@@ -85,9 +85,6 @@ const showStatus = (status) => {
return `${message},请检查网络或联系管理员!`
}
//登录状态
let loginStatus: false|true = false // true:登录中
/**
* axios 请求状态封装,返回响应式数据 fetch(), loading, error, code, msg 等常用方法/状态
* @param {Object} options 对象
@@ -176,12 +173,9 @@ export const useRequest = (options:option = {
stateRef.current.total = data?.list ? data?.total : 0
}else{
if (statusCode === 401) {
if(!loginStatus) {
removeToken()
removeSessionKey()
login()
loginStatus = true
}
removeToken()
removeSessionKey()
login()
//todo 登录数据刷新次数问题
} else {
Taro.showToast({