小程序使用wx.redirectTo跳转时隐藏返回首页按钮

使用wx.redirectTo进行跳转时,默认是带有返回首页按钮的。 解决方案: 在onShow里执行wx.hideHomeButton(),就可以隐藏返回首

使用wx.redirectTo进行跳转时,默认是带有返回首页按钮的。

解决方案:

在onShow里执行wx.hideHomeButton(),就可以隐藏返回首页按钮。

onShow() {if (wx.canIUse('hideHomeButton')) {wx.hideHomeButton()}
},