联调二级评估页面

This commit is contained in:
guanj
2025-08-11 16:13:51 +08:00
parent 8d613f7a57
commit aa3dbb6c5d
22 changed files with 864 additions and 474 deletions

View File

@@ -4,7 +4,8 @@ import { ElLoading, ElNotification, type LoadingOptions } from 'element-plus'
import { refreshToken } from '@/api/user-boot/user'
import router from '@/router/index'
import { useAdminInfo } from '@/stores/adminInfo'
import { debounce } from 'lodash-es';
let loginExpireTimer:any = null
window.requests = []
window.tokenRefreshing = false
const pendingMap = new Map()
@@ -167,12 +168,19 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
}
} else if (response.data.code == 'A0024' || response.data.code == 'null') {
// // 登录失效
ElNotification({
type: 'error',
message: response.data.message
})
adminInfo.removeToken()
router.push({ name: 'login' })
// 清除上一次的定时器
if (loginExpireTimer) {
clearTimeout(loginExpireTimer)
}
loginExpireTimer = setTimeout(() => {
ElNotification({
type: 'error',
message: response.data.message
})
adminInfo.removeToken()
router.push({ name: 'login' })
loginExpireTimer = null // 执行后清空定时器
}, 100) // 可根据实际情况调整延迟时间
return Promise.reject(response.data)
} else {
if (options.showCodeMessage) {