微信小程序中,不允许用户返回上一页的操作
//用wx.redirectTo来做跳转页面
wx.redirectTo({
url: '/pages/index/index'
})
但是用了这个之后会发现小程序左上角会多了一个home的小按钮,可以在onShow中添加wx.hideHomeButton(),即可消除
onShow: function () {
wx.hideHomeButton()
},
微信小程序中,不允许用户返回上一页的操作
//用wx.redirectTo来做跳转页面
wx.redirectTo({
url: '/pages/index/index'
})
但是用了这个之后会发现小程序左上角会多了一个home的小按钮,可以在onShow中添加wx.hideHomeButton(),即可消除
onShow: function () {
wx.hideHomeButton()
},