请扫码查看示例
# chooseImage ^6.8
选择图片
# 请求参数
Prop | Type | Comment |
---|---|---|
count | Number | 最多可以选择的图片张数,不得大于 9 |
# 引入接口模块
import bridge from '@minix-iot/etsbridge-sdk'
1
# 参数代码示例
let params = { count: 9 }
1
# 接口调用示例
let params = { count: 9 }
bridge
.chooseImage(params)
.then((res) => {
console.log(res)
})
.catch((err) => {
console.log(err)
})
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
# 返回参数
- 成功时返回
Prop | Type | Value |
---|---|---|
tempFilePaths | Array | - |
- 失败时返回
Prop | Type | Value | Comment |
---|---|---|---|
code | Number | -11 | 用户取消操作 |
msg | String | - |
# 返回示例
{
"tempFilePaths": [
"localImages/weex_1609393434_0.jpg",
"localImages/weex_1609393772_0.jpg"
]
}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8