From 020be75f7b22c28ff65cd0e339511762d18a365c Mon Sep 17 00:00:00 2001 From: kuaifan Date: Thu, 9 Jun 2022 12:21:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E5=8A=A8=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF=E8=AE=BF=E9=97=AE=E6=9C=AC=E7=AB=99=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E9=9C=80=E8=A6=81=E7=99=BB=E5=BD=95=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/pages/index.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/resources/assets/js/pages/index.vue b/resources/assets/js/pages/index.vue index 63a04499d..40dbd861b 100644 --- a/resources/assets/js/pages/index.vue +++ b/resources/assets/js/pages/index.vue @@ -204,7 +204,19 @@ export default { return window.systemInfo.title || "DooTask"; }, }, + mounted() { + if (this.$router.mode === "hash") { + if ($A.stringLength(window.location.pathname) > 2) { + window.location.href = `${window.location.origin}/#${window.location.pathname}${window.location.search}` + return + } + } else if (this.$router.mode === "history") { + if ($A.strExists(window.location.href, "/#/")) { + window.location.href = window.location.href.replace("/#/", "/") + return + } + } this.getNeedStartHome(); },