Wx.scanQRCode sweeps the official account, callback is not carried out.

use wx.scanQRCode to scan the official account. Ok, is displayed on the tool, but no callback is performed when using Wechat to scan, so you jump to

directly.

clipboard.png
wx.scanQRCode

clipboard.png
configuration of wx.config is also successful

weixinSdk() {
  var wxs = this.wxMation
  console.log(wxs)
  wx.config({
    debug: true,
    appId: wxs.appId,
    timestamp: wxs.timestamp,
    nonceStr: wxs.nonceStr,
    signature: wxs.signature,
    jsApiList: ["checkJsApi", "scanQRCode"]
  });
  wx.error(function (res) {
    alert(":" + res.errMsg);//wx.config
  });
  wx.ready(function () {
    wx.checkJsApi({
      jsApiList: ["scanQRCode"],
      success: function (res) {

      }
    });
    wx.scanQRCode({
      needResult: 1, // 01
      scanType: ["qrCode","barCode"], // 
      success: function (res) {
        alert(JSON.stringify(res))
        var result = res.resultStr; // needResult  1 
        alert(":" + result);
        // window.location.href = result;//
      },
      error:function(res){
        alert(res)
      }
    });
  })
}

is there any god who can explain the code above?

Nov.19,2021

have you solved this problem? I have a similar problem. There is no problem with the Android phone test, but the iPhone phone test can bring up the code scan interface without performing any callback functions.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ebd026-2922.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ebd026-2922.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?