reject错误

This commit is contained in:
仲么了
2023-12-26 10:34:35 +08:00
parent 8666b1b784
commit c52bb0fb9b

View File

@@ -120,6 +120,7 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
message: response.data.msg
})
router.push({ name: 'login' })
return Promise.reject(response.data)
} else {
if (options.showCodeMessage) {
ElNotification({
@@ -127,6 +128,7 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
message: response.data.message || '未知错误'
})
}
return Promise.reject(response.data)
}
},
error => {