WeChat applet jump

The first one will keep the current page, and the back button will appear at the top

wx.navigateTo({
  url: '地址'
})

With the following code can return

wx.navigateBack({ 

      delta: 1 //返回上一级页面
 
});  

 The second is to close the current page and jump to a page in the application. There is no back button at the top

wx.redirectTo({
  url: '地址'
})

The third is to jump to tabar and close other pages

wx.switchTab({
  url: '地址'
})

Note: wx.navigateTo and  wx.redirectTo is not allowed to jump to the tabbar page, only to  wx.switchTab jump to the tabbar page;

Guess you like

Origin blog.csdn.net/munchmills/article/details/130718499