微信小程序页面跳转报错:navigateTo:fail can not navigateTo a tabbar page

报错

微信小程序设置跳转页面报错:
navigateTo:fail can not navigateTo a tabbar page

原因

很有可能是在底部tabbar里面定义了同样连接地址的bar,如果在底部footer页面定义了相同地址的bar,则此页面无法跳转

解决方法

使用微信小程序的

wx.switchTab({
    
    undefined
         url: '路径'
});

进行页面跳转

猜你喜欢

转载自blog.csdn.net/qq_39981639/article/details/121890443