4***@qq.com
4***@qq.com
  • 发布:2017-09-21 12:00
  • 更新:2017-09-21 12:00
  • 阅读:1503

【报Bug】小米note plus.barcode.scan 相册二维码图片出错

分类:HTML5+

详细问题描述
[内容]
从相册中选择文件打印出来是:file:///storage/emulated/0/DCIM/Camera/IMG_20170921_113130.jpg
调用plus.barcode.scan方法,在error回调方法中error.message错误显示为空
如果在相册中选择图片,点击右上方的确定还会跳Uncaught TypeError: i.apply is not a function at js/vendor.js:11错误,不点击确定,自动关闭返回不会跳这个错误

重现步骤
[步骤]

[结果]
[期望]

运行环境
[系统版本]
[浏览器版本]
[IDE版本]
[mui版本]

附件
[代码片段]
function scanImg (imgPath) {
window.plus.barcode.scan(imgPath, (type, result) => {
alert('Scan success:(' + type + ')' + result)
}, (error) => {
console.log('scanImg Error: ' + error.message)
// alert(error.message)
}, ['QR'])

  }  

window.plus.gallery.pick((path) => {
console.log(path)
scanImg(path)
}, function (e) {
console.log('取消选择图片')
}, {filter: 'image'})
[安装包]

联系方式
[QQ] 451570208@qq.com
[电话]

2017-09-21 12:00 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复