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

fix: 修复compressImage在支付宝小程序报参数不正确的Bug

上级 0452b21f
......@@ -224,6 +224,20 @@ const protocols = { // 需要做转换的 API 列表
filePath: 'apFilePath'
}
},
compressImage: {
args (fromArgs) {
fromArgs.compressLevel = 4
if (fromArgs && fromArgs.quality) {
fromArgs.compressLevel = Math.floor(fromArgs.quality / 26)
}
fromArgs.apFilePaths = [fromArgs.src]
},
returnValue (result) {
if (result.apFilePaths && result.apFilePaths.length) {
result.tempFilePath = result.apFilePaths[0]
}
}
},
chooseVideo: {
// 支付宝小程序文档中未找到(仅在getSetting处提及),但实际可用
returnValue: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册