详细问题描述
[内容]
从相册中选择文件打印出来是: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
[电话]
0 个回复