提交 b77f59cf 编写于 作者: 雪洛's avatar 雪洛

fix: 修复支付宝小程序scanCode设置scanType无效的Bug #1578

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