页面路由配置了两个
{
path: 'index',
name: 'introduce',
component: page.introduce,
},
{
path: 'detail',
name: 'detail',
component: page.detail,
}
由先由index跳转到detail, detail再跳转其他地址如百度或者什么的,再点击微信端的返回,如何直接返回到第一个页面?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
跳到百度之后就不归你管了.
可以在你的路由或者组件里面判断document.referrer是不是为其他网址.是的话返回第一个页面.
window.location.replace()
this.$router.replace()