收藏
回答

使用scanCode方法的时候,我扫了一维码后,返回的scanType的值为QR_CODE

框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug wx.scanCode 微信安卓客户端 8.0.7.48 2.19.2

https://developers.weixin.qq.com/miniprogram/dev/api/device/scan/wx.scanCode.html

使用scanCode方法的时候,我扫了一维码后,返回的scanType的值为QR_CODE

文档说明不符合我的要求,这是什么原因造成的?

最后一次编辑于  2022-01-13
回答关注问题邀请回答
收藏

2 个回答

  • 周涛
    周涛
    2022-01-13

    要贴代码看看

    2022-01-13
    有用
    回复 2
    • 高亮飞
      高亮飞
      2022-01-13
      wx.scanCode({
            desc: "scanQRCode desc",
            needResult: 0,
            scanType: ["qrCode", "barCode"],
            success: (res:any) => {
              console.log(res);
              const code = res.result;
              const scan_type = res.scanType;
            }
          });
      2022-01-13
      回复
    • 周涛
      周涛
      2022-01-13回复高亮飞
      没有这desc、 needResult 这2个属性吧?
      2022-01-13
      回复
  • Cjiang
    Cjiang
    2022-01-13

    提供下具体的一维码图片看看

    2022-01-13
    有用
    回复 2
    • 高亮飞
      高亮飞
      2022-01-13
      2022-01-13
      回复
    • Cjiang
      Cjiang
      2022-01-14回复高亮飞
      试了下返回这个
      2022-01-14
      回复
登录 后发表内容