不断通过点击按钮跳转页面,点击几次以后,按钮点击失效,怎么解决?

发布于 8 年前作者 lshi13558 次浏览最后编辑 8 年前来自 issues

<view class=“btn opacityBtn” hidden=“{{type==1}}” bindtap=tohome>返回首页</view>

tohome: function(){

    wx.navigateTo({

        url: ‘…/startscan/startscan’

    })

},

通过一个页面进来,点击“下一步”,“上一步”按钮来跳转,回退页面,页面跳转几次以后view点击事件失效,将view改成button,则在console下表现为:

2 回复
fang57
fang571 楼6 年前

麻烦提供能复现问题的代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

weicai
weicai2 楼6 年前

使用navigator 跳转的话,目前页面栈最多是10层,之后在点击就无效了,页面跳转的话 将跳转方式并用,避免到达10层即可