Explorar o código

fix: token过期,刷新死循环

xiaoxian521 %!s(int64=3) %!d(string=hai) anos
pai
achega
4e506555ad
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/store/modules/user.ts

+ 1 - 0
src/store/modules/user.ts

@@ -68,6 +68,7 @@ export const useUserStore = defineStore({
     },
     // 刷新token
     async refreshToken(data) {
+      removeToken();
       return refreshToken(data).then(data => {
         if (data) {
           setToken(data);