# choosePhoto H5 选取照片方法
# Attributes
属性 | 类型 | 必要 | 默认值 | 说明 |
---|---|---|---|---|
compressRage | Number | Y | - | 返回照片的压缩率,范围为0~100,数值越高保真率越高 |
crop | Boolean | Y | - | 是否需要裁切 true裁切 false不裁切 |
maxWidthHeight | Number | Y | - | 最大宽高 |
isNeedBase64 | Boolean | Y | - | 是否需要返回base64 |
# 调用示例
window.bridge.choosePhoto({
compressRage: 70,
type: 'jpg',
crop: false,
scale: 1,
maxWidthHeight: 1500,
isNeedBase64: false
}, res => {
console.log(res)
}, error => {
console.log(error)
});
# 接口返回示例