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

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

解决方案:

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

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

猜你喜欢

转载自blog.csdn.net/watson2017/article/details/130350621