两种路由触发模式:
1.标签方式触发
vue:
小程序:
接收:通过另一个页面在onload生命周期中接收
2.编程式触发
vue:
this.$router.push()
小程序跳转:
wx.navigateTo() 带历史回退
wx.redirectTo() 不保留历史,跳转到另一个页面,不能返回到上一页面 this.$router.replace()
wx.switchTab() 只跳转到tabBar页面,不带回退
wx.reLaunch() 即能跳转到tabBar页面,也能跳转到非tabBar页面,不带历史回退