刘洋 1 năm trước cách đây
mục cha
commit
f0ce37caf8
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      src/store/modules/user.js

+ 3 - 1
src/store/modules/user.js

@@ -33,9 +33,11 @@ const useUserStore = defineStore("user", {
         await wxUnbind().catch(() => {});
         logout().then(() => {
           router.replace("/login");
+          this.resetUser();
         });
+      } else {
+        this.resetUser();
       }
-      this.resetUser();
     },
     resetUser() {
       this.$reset();