From dc7923ab1cfd6b8fd4470f777e0ee229eda98d94 Mon Sep 17 00:00:00 2001 From: "453530270@qq.com" Date: Thu, 4 Jan 2024 18:11:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E4=B8=AD=E9=80=94=E8=BF=94?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/shortcut/index.vue | 3 --- pages/findpass/findpass.vue | 2 +- pages/login/index.vue | 25 +++++++++++++------------ 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/components/shortcut/index.vue b/components/shortcut/index.vue index 681aa7f..27d0713 100644 --- a/components/shortcut/index.vue +++ b/components/shortcut/index.vue @@ -62,9 +62,6 @@ methods: { - - - /** * 导航菜单切换事件 */ diff --git a/pages/findpass/findpass.vue b/pages/findpass/findpass.vue index 3433b4f..af9a716 100644 --- a/pages/findpass/findpass.vue +++ b/pages/findpass/findpass.vue @@ -52,7 +52,7 @@ methods: { // 调整到登录页面 gologin(){ - this.$navTo("pages/login/index") + this.$navTo("pages/login/index") }, } } diff --git a/pages/login/index.vue b/pages/login/index.vue index 5ae0c4c..fc8fcf3 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -121,17 +121,18 @@ mounted() { // 监听返回事件,点击系统返回时 if(window.history && window.history.pushState){ - console.log(window.history) + history.pushState(null, null, document.URL) window.addEventListener('popstate',this.goback,false) } }, + destroyed() { + window.removeEventListener('popstate', this.goback, false) + }, methods: { - + // 返回 goback(){ - console.log("6666666666666666666") - // let path = this.$route.path - // this.$toast(path) - this.onNavigateBack(1) + this.$navTo("pages/index/index") + //this.$router.replace('pages/index/index') }, // 账户类型 radioChange(evt) { @@ -241,8 +242,8 @@ delta: Number(delta || 1) }) } else { - //this.$navTo('pages/user/index') - this.$navTo('pages/index/index') + this.$navTo('pages/user/index') + // this.$navTo('pages/index/index') } }, @@ -270,10 +271,10 @@ }, //退出页面 - destroyed(){ - //销毁监听 - window.removeEventListener('popstate',this.goback,false) - } + // destroyed(){ + // //销毁监听 + // window.removeEventListener('popstate',this.goback,false) + // } }