微信小程序页面路由

一、标签跳转
页面路由:
实现路由跳转的方式通过标签或者API

标签跳转<navigator></navigator>:组件-->导航-->navigator
    navigator标签中的属性:(不支持跳转tabbar页面需要设置跳转方式)
        url:当前小程序内的跳转链接
        open-type:跳转方式(有很多合法值)switchTab只支持跳转tabbar页面
<navigator url='/pages/index/index' open-type='switchTab'>跳转</navigator>
        
        open-type中的合法值navigate只支持跳转非tabbar页面
<navigator url='/pages/list/list' open-type='navigate'>跳转</navigator>
            
        open-type中的合法值reLaunch可以跳转任何页面

二、API跳转凡是 wx.的都是API方法

原文地址:https://www.cnblogs.com/home-/p/11607040.html