Mini Program switchTab switching tabbar

The

document says that wx.switchTab jumps to the tabBar page and closes all other non-tabBar pages. I now have two tabbar pages (home,center). I print console.log (getCurrentPages ()) in the onShow of center. When I click from home to jump to center, I print out a page stack with only center, and no home,. Why?

Mar.13,2021

wx.switchTab page stack estimation is about the same as wx.redirectTo running

clipboard.png

wx.reLaunch(OBJECT)

https://developers.weixin.qq.com/miniprogram/dev/api/ui-navigate.html-sharpwxredirecttoobject

refer to this article
https://codeshelper.com/a/11.

Menu