Skip to content

Commit

Permalink
fix: fix the problem that the login box does not pop up when 301
Browse files Browse the repository at this point in the history
  • Loading branch information
Linkontoask committed Dec 22, 2020
1 parent 9b534d7 commit 666cf0f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/utils/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ http.interceptors.response.use(
if (response.status === 200) {
return response.data
}
if (response.status === 301) {
store.commit('/Auth/SHOW_VIEW')
}
return response
},
error => {
if (error.response) {
if (error.response.status === 301) {
store.commit('Auth/SHOW_VIEW')
}
}

return Promise.reject(error)
}
)
Expand Down

0 comments on commit 666cf0f

Please sign in to comment.