扫码的BUG,求解决
Iphone调扫码接口,有时会使小程序闪退,4s重现率70%以上
scan:function(){
console.log(“000000000000”)
var that = this
wx.scanCode({
success: (res) => {
console.log(res)
that.setData({
scantext:res.result
})
}
})
}
布局只有
<button bindtap=“scan”>扫码</button>
<text>{{scantext}}</text>
点击按钮,调用wx.scanCode api扫码。就会闪退,iphone 6sp 也出现过,但频率不高,