|
|
|
@ -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) |
|
|
|
// } |
|
|
|
|
|
|
|
} |
|
|
|
</script> |
|
|
|
|