Explorar o código

Merge branch 'yuan' of panhui/lasuo_nft_front into dev

yuanyuan %!s(int64=3) %!d(string=hai) anos
pai
achega
e6f12cf10d
Modificáronse 2 ficheiros con 14 adicións e 2 borrados
  1. 7 1
      src/views/Home.vue
  2. 7 1
      src/views/Mine.vue

+ 7 - 1
src/views/Home.vue

@@ -316,9 +316,15 @@ export default {
         let that = this;
         // that.getList();
         that.getBanner();
-        location.reload()
+        // location.reload()
         // that.getUser();
     },
+    noReloaded: function () {
+        if (location.href.indexOf('#reloaded') == -1) {
+            location.href = location.href + '#reloaded';
+            window.location.reload();
+        }
+    },
     activated() {
         this.$nextTick(() => {
             this.changeScroll(this.scrollTop);

+ 7 - 1
src/views/Mine.vue

@@ -209,7 +209,7 @@ export default {
         };
     },
     mounted() {
-        location.reload()
+        // location.reload()
         this.$store.dispatch('getUserInfo');
         if (this.isLogin) {
             this.$http
@@ -265,6 +265,12 @@ export default {
         //         this.$el.parentNode.childNodes[1].className.replace(/ bgBack/, '') + ' bgBack';
         // });
     },
+    noReloaded: function () {
+        if (location.href.indexOf('#reloaded') == -1) {
+            location.href = location.href + '#reloaded';
+            window.location.reload();
+        }
+    },
     methods: {
         // 复制
         copy() {