微信小程序开发-页面跳转方式

页面跳转 navigator 页面链接

navigate 对应 wx.navigateTo 的功能

wx.navigateTo保留当前页面,跳转下一页(非tabBar 页面)

redirect 对应 wx.redirectTo 的功能

wx.redirectTo关闭当前页面,跳转指定页面,失去后退键(非tabBar 页面)

switchTab 对应 wx.switchTab 的功能

wx.switchTab是唯一能跳转到 tabBar 页面,就是说在做tabBar跳转的时候只能使用wx.switchTab

reLaunch 对应 wx.reLaunch 的功能

wx.reLaunch是关闭所有页面,跳转到非tabBar的页面

navigateBack 对应 wx.navigateBack 的功能

wx.navigateBack 跳转上一页内容

猜你喜欢

转载自blog.csdn.net/weixin_35773751/article/details/79698425