修改测试bug

This commit is contained in:
GGJ
2024-11-27 16:01:08 +08:00
parent 0898cd20d3
commit 52b41a3248
11 changed files with 471 additions and 264 deletions

View File

@@ -1,9 +1,10 @@
import type { AxiosRequestConfig, Method } from 'axios'
import axios from 'axios'
import { ElLoading,ElMessage, ElNotification, type LoadingOptions } from 'element-plus'
import { ElLoading, ElMessage, ElNotification, type LoadingOptions } from 'element-plus'
import { refreshToken } from '@/api/user-boot/user'
import router from '@/router/index'
import { useAdminInfo } from '@/stores/adminInfo'
import { set } from 'lodash'
window.requests = []
window.tokenRefreshing = false
@@ -150,11 +151,13 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
return Promise.reject(response.data)
} else {
if (options.showCodeMessage) {
// ElNotification({
// type: 'error',
// message: response.data.message || '未知错误'
// })
ElMessage.error(response.data.message || '未知错误')
if (response.config.url == '/access-boot/device/wlRegister') {
setTimeout(() => {
ElMessage.error(response.data.message || '未知错误')
}, 6000)
} else {
ElMessage.error(response.data.message || '未知错误')
}
}
return Promise.reject(response.data)
}