kuaifan 5 yıl önce
ebeveyn
işleme
c9987f7c84

+ 3 - 2
resources/assets/js/main/main.js

@@ -314,10 +314,11 @@ import '../../sass/main.scss';
             $A.token("");
             $A.storage("userInfo", {});
             $A.triggerUserInfoListener({});
+            let from = window.location.pathname == '/' ? '' : encodeURIComponent(window.location.href);
             if (typeof $A.app === "object") {
-                $A.app.goForward({path: '/', query:{from:encodeURIComponent(window.location.href)}}, true);
+                $A.app.goForward({path: '/', query: from ? {from: from} : {}}, true);
             } else {
-                window.location.replace($A.webUrl() + '?from=' + encodeURIComponent(window.location.href));
+                window.location.replace($A.webUrl() + (from ? ('?from=' + from) : ''));
             }
         },
 

+ 0 - 1
resources/assets/js/main/pages/todo.vue

@@ -382,7 +382,6 @@
         },
         mounted() {
             if ($A.getToken() === false) {
-                this.goForward({path: '/'}, true);
                 return;
             }
             this.refreshTask();