扫码的BUG,求解决
发布于 5 年前 作者 rcheng 11208 次浏览 来自 问答

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 回复

安卓没发现过扫码闪退

android上试过没?

回到顶部