修改菜单问题
This commit is contained in:
@@ -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))
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user