Kaynağa Gözat

自动刷新

yuany 3 yıl önce
ebeveyn
işleme
48f25331a4
3 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 1 0
      src/views/Home.vue
  2. 1 0
      src/views/Mine.vue
  3. 0 1
      src/views/account/Login.vue

+ 1 - 0
src/views/Home.vue

@@ -316,6 +316,7 @@ export default {
         let that = this;
         let that = this;
         // that.getList();
         // that.getList();
         that.getBanner();
         that.getBanner();
+        location.reload()
         // that.getUser();
         // that.getUser();
     },
     },
     activated() {
     activated() {

+ 1 - 0
src/views/Mine.vue

@@ -209,6 +209,7 @@ export default {
         };
         };
     },
     },
     mounted() {
     mounted() {
+        location.reload()
         this.$store.dispatch('getUserInfo');
         this.$store.dispatch('getUserInfo');
         if (this.isLogin) {
         if (this.isLogin) {
             this.$http
             this.$http

+ 0 - 1
src/views/account/Login.vue

@@ -139,7 +139,6 @@ export default {
             });
             });
             this.check().then(() => {
             this.check().then(() => {
                 this.$toast.success('登录成功');
                 this.$toast.success('登录成功');
-                location.reload()
                 setTimeout(() => {
                 setTimeout(() => {
                     if (this.$store.state.loginBackUrl) {
                     if (this.$store.state.loginBackUrl) {
                         this.$router.replace(this.$store.state.loginBackUrl);
                         this.$router.replace(this.$store.state.loginBackUrl);