Token jumps to the login page after expiration, but the login page is blank. The page will not be displayed until it is refreshed.

before the-sharp number is removed, the token expires can be successfully redirected to the login page, but after the-sharp number is removed, the API request 401, that is, after the token expires, the jump page is successful but blank because of an error in parsing the css file path.
error content

the code in my main.js is
axios.interceptors.response.use (response = > {
return response
}, err = > {
if (err.response) {

)
switch (err.response.status) {
  case 401:
    router.replace({
      path: "/login",
      name: "login"
    })
}

}
return Promise.reject (err.response.data)
})

token adds a code
this.$http.defaults.headers.common ["Authorization"] =" Bearer"+ res.data
when logging in, so does anyone know how to solve it?

Dec.06,2021

that's why the default-sharp number is removed. You can find out what configuration the front end needs to do when the-sharp number is removed and what cooperation the back end makes

.
Menu