提交 70c212c3 编写于 作者: W wangyaqi

update: 增加scanType对支付宝的支持

上级 9b675c24
......@@ -287,9 +287,23 @@ const protocols = { // 需要做转换的 API 列表
},
scanCode: {
name: 'scan',
args: {
onlyFromCamera: 'hideAlbum',
scanType: false
args(fromArgs) {
if (fromArgs.scanType === 'qrCode') {
fromArgs.type = 'qr'
return {
onlyFromCamera: 'hideAlbum',
}
} else if(fromArgs.scanType === 'barCode'){
fromArgs.type = 'bar'
return {
onlyFromCamera: 'hideAlbum',
}
} else {
return {
scanType: false,
onlyFromCamera: 'hideAlbum',
}
}
},
returnValue: {
code: 'result'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册