收藏
回答

wx.scanCode扫描barcode128码

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

- 当前 Bug 的表现(可附上截图)

安卓机调用 wx.scanCode,扫描barcode 128时,如果barcode值为BAGD3124,E01,01,

当 wx.scanCode的 success时result的值 为 "BAGD3124", 把后面[,E01,01]的值 截取掉了,IOS调用没有这个问题.


- 预期表现


- 复现路径


- 提供一个最简复现 Demo


回答关注问题邀请回答
收藏

3 个回答

  • ShinBlueCat
    ShinBlueCat
    2019-05-29

    问题已复现,我们会在后续版本中进行修复。

    2019-05-29
    有用
    回复 2
    • 2019-06-24

      老师,啥时候能修复,谢谢

      2019-06-24
      回复
    • 林  晓
      林 晓
      2019-09-30
      同样的问题,现在还是出现在我身上了,安卓扫码条形码,返回值的result不对,scanType也不对
      2019-09-30
      回复
  • 禾店短剧系统
    禾店短剧系统
    2021-05-24

    是真的修复了吗?😂

    2021-05-24
    有用 1
    回复
  • 灵芝
    灵芝
    2019-05-24

    麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

    以及对应的码

    2019-05-24
    有用
    回复 5
    • 2019-05-24

      安卓机 有这个问题,微信版本7.0.4  系统版本号2.7.0 代码

      scanTap: function() {

      var that = this;

      wx.scanCode({

      success: (res) => {

      /*

      this.show = "--result:" + res.result + "--scanType:" + res.scanType + "--charSet:" + res.charSet + "--path:" + res.path;

      */

      console.log(res);    //这里res.result会把值 截取掉

      that.setData({

      tm: res.result

      });


      let params = {

      username: that.data.username,

      tel: that.data.tel,

      qyid: that.data.qyid,

      openid: that.data.openid,

      tm: that.data.tm

      }

      let url = app.serverip + "/zt/add_kb_zt_sm";

      wxRequest.getRequest(url, params).then(function (res) {

      //console.log(res.data);

      if (res.data.retcode == 1) {

      let sl = that.data.curr_qty;

      that.setData({

      curr_qty: sl+1,

      });

      $Message({

      content: '成功',

      type: 'success'

      });


      } else {

      $Message({

      content: '失败',

      type: 'error'

      });

      }

      }).finally(function (res) {


      });

      },

      fail: (res) => {

      $Toast({

      content: '失败',

      type: 'error'

      });

      },

      complete: (res) => {

      }

      });

      },


      2019-05-24
      回复
    • 灵芝
      灵芝
      2019-05-24回复

      麻烦提供一下这个格式的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

      还有能复现问题的barcode

      2019-05-24
      回复
    • 2019-05-24回复灵芝

      https://developers.weixin.qq.com/s/VOv4KBmw7k87barcode 128:BKAG1109,E01,01   安卓扫码时得到 res.result=BKAG1109 (错误,截取掉了,E01,01)

      IOS扫码时得到 res.result=BKAG1109,E01,01   正确


      2019-05-24
      回复
    • 灵芝
      灵芝
      2019-05-24回复

      不是,barcode的图片发一下,我扫一下看看

      2019-05-24
      回复
    • 2019-05-24回复灵芝

      https://developers.weixin.qq.com/s/KGxosBmI7a8V

      2019-05-24
      回复
登录 后发表内容