提交代码
This commit is contained in:
@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user