刘向辉 3 years ago
parent
commit
1e69670d56
  1. 3
      src/app/http-interceptors/base-interceptor.ts

3
src/app/http-interceptors/base-interceptor.ts

@ -56,7 +56,8 @@ export class BaseInterceptor implements HttpInterceptor {
if (error.status === 401 || error.status === 614) {
this.token.delete()
sessionStorage.clear()
window.localStorage.clear()
// window.localStorage.clear()
localStorage.removeItem("isautologin")
this.cookieService.set("token", '', new Date(new Date().getTime() + 1), '/')
this.cookieService.set("refreshToken", '', new Date(new Date().getTime() + 1), '/')
this.message.create('error', `用户认证信息过期,请重新登录!`);

Loading…
Cancel
Save