# chooseMulPhoto ^5.0.0
选择多张相册照片,并返回相片数据,不支持base64的转换
# 请求参数
Prop | Type | Required | Default | Description |
---|---|---|---|---|
param | Object | Y | {} 属性: max: {Type: Number, Default: 9 ,Description: 一次最多可选择的数量,默认为 9 ,最多9 张} compressRage: { // ^6.3Type: Number, Default: 50 ,Description: 返回照片的压缩率,范围为0~100,数值越高保真率越高(iOS在之前版本已经实现,默认压缩率为50) } | 请求参数 |
# 接口调用示例
this.$bridge
.chooseMulPhoto(params)
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
# 返回参数
- 成功时返回
Prop | Type | Default | Description |
---|---|---|---|
status | Number | 0 /1 | 0 选择照片成功/ 1 取消选择 |
list | Array | [{}] 属性: type: {Type: String, Default: N/A, Description: 指定返回相片的格式(值为 jpg 或png } filePath: {Type: String, Default: N/A, Description: 返回相片保存的文件路径 } fileName: {Type: String, Default: N/A, Description: 保存的文件名 } size: {Type: String, Default: N/A, Description: 返回相片的文件大小,带小数,单位为Kb } | 相片文件的对象数组 |
- 失败时返回
Prop | Type | Default | Description |
---|---|---|---|
errorCode | Number | N/A | 请求失败错误码:-1 没有权限 |