修改菜单问题

This commit is contained in:
浅念
2025-07-14 10:09:10 +08:00
parent 2ad479b006
commit 812e3c4b0c
10 changed files with 170 additions and 37 deletions
+9 -2
View File
@@ -81,8 +81,15 @@ axiosInstance.interceptors.response.use(
}
},
(error) => {
return Promise.reject(handleError(error))
const { code, msg } = error.response.data
switch (code) {
case ApiStatus.unauthorized:
logOut()
throw new HttpError(msg || $t('httpMsg.unauthorized'), ApiStatus.unauthorized)
default:
throw new HttpError(msg || $t('httpMsg.requestFailed'), code)
}
// return Promise.reject(handleError(error))
}
)