This commit is contained in:
shilin
2025-02-21 17:55:50 +08:00
parent 78aaca142b
commit 129037c757
8 changed files with 176 additions and 92 deletions

View File

@ -44,6 +44,9 @@ service.interceptors.response.use(
* You can also judge the status by HTTP Status Code
*/
response => {
if (['blob'].includes(response.config.responseType)) {
return response.data
}
const code = response.data.code
if (code === 401) {
store.dispatch('user/resetToken')