扫码的BUG,求解决

发布于 7 年前作者 rcheng11376 次浏览最后编辑 7 年前来自 ask

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 也出现过,但频率不高,

2 回复
xiulan59
xiulan591 楼6 年前

安卓没发现过扫码闪退

cuilei
cuilei2 楼5 年前

android上试过没?