提交代码

This commit is contained in:
yiqiuyang
2025-10-15 16:46:35 +08:00
parent 9a01223fc9
commit 502eaff488
36 changed files with 595 additions and 196 deletions

View File

@ -50,10 +50,7 @@ service.interceptors.response.use(
const {data, config} = response
// 处理二进制数据响应
if (
config.responseType === 'blob' ||
config.responseType === 'arraybuffer'
) {
if (config.responseType === 'blob' || config.responseType === 'arraybuffer') {
return data
}
@ -90,15 +87,11 @@ function handleAuthError(config, response) {
const excludeUrls = ['/Token/Logout', '/Token/Access']
if (!excludeUrls.includes(config.url)) {
ElMessageBox.confirm(
'登录状态已过期,您可以继续留在该页面,或者重新登录',
'系统提示',
{
confirmButtonText: '重新登录',
cancelButtonText: '取消',
type: 'warning',
}
)
ElMessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
confirmButtonText: '重新登录',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
removeToken()
removeUserTenantInfo()
@ -127,7 +120,7 @@ function handleNetworkError(message) {
ElMessage({
message: errorMsg,
type: 'error',
duration: 5 * 1000,
duration: 1000,
})
}