# chooseRes
选择图片视频
# 请求参数
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
param | Object | Y | {}属性: sn:{Type: String, Default: N/A, Description: sn值 } | 请求参数 |
# 接口调用示例
soundModule.chooseRes(param, (resp) => {
this.$alert("成功")
}, (error) => {
this.$toast("失败")
})
1
2
3
4
5
2
3
4
5
# 返回参数
- 成功时返回
| Prop | Type | Default | Description |
|---|---|---|---|
status | Number | N/A | 0拍照成功,1取消拍照 |
list | Array | []属性: fileType:{Type: Number, Default: N/A, Description: 1照片 / 2视频} filePath:{Type: String, Default: N/A, Description: 返回相片保存的文件路径 } fileName:{Type: String, Default: N/A, Description: 保存的文件名 } size:{Type: Number, Default: N/A, Description: 返回文件大小,带小数,单位为 Kb} | 多个媒体文件信息, 格式为[{ },{ }] |
- 失败时返回
| Prop | Type | Default | Description |
|---|---|---|---|
errorCode | Number | N/A | 请求失败错误码:1蓝牙权限未开启 / 2蓝牙未连接 |
errorMessage | String | N/A | 错误消息(如有) |
← takeScreen previewRes →