修改测试bug
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user