fix: 移动客户端访问本站链接出现需要登录的情况

This commit is contained in:
kuaifan 2022-06-09 12:21:56 +08:00
parent 66961197f6
commit 020be75f7b

View File

@ -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();
},