Browse Source

fix: token过期,刷新死循环

xiaoxian521 2 năm trước cách đây
mục cha
commit
4e506555ad
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  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);