安卓 扫码 scanCode 无法识别数据
发布于 5 年前 作者 jiangxiuying 10791 次浏览 来自 问答

onLoad: function (options) {

var id = options.id;

var _this = this;

wx.showLoading({

title: ‘加载中’,

})

//如果存在二维码扫描

if (typeof (options.scene) != “undefined”) {

var scene = decodeURIComponent(options.scene);

console.log(‘扫描进入’);

console.log(scene);

var dateList = scene.split("=");

id = dateList[0];//设备ID

_this.setData({

code_compid: dateList[1]

});

}

使用IOS 扫码图片的时候 会获取到图片上的参数99=1

但是使用安卓扫码的时候 会获取到图片的99,很是奇怪,

但是这个问题只有在调用

wx.scanCode 才会出现这个问题。

假如使用微信APP的扫一扫,没有任何问题。会准确获取到99=1 这样一个字符串。

请问这是已存在的BUG 还是我的写法有问题?

!!!

1 回复

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

回到顶部