# sendFile
发送文件
- 参数描述:
Prop | Type | Required | Default | Description |
---|---|---|---|---|
param | Object | Y | {} 属性: sn: {Type: String, Default: N/A, Description: sn 值 } filePath: {Type: String, Default: N/A, Description: 文件路径 } fileName: {Type: String, Default: N/A, Description: 文件名称 } fileType: {Type: Number, Default: N/A, Description: 1 图片 / 2 视频 / 3 其他(文件类型)} size: {Type: Number, Default: N/A, Description: 文件大小 } time: {Type: String, Default: N/A, Description: 如果是视频类型,需要传视频时长 } | 请求参数 |
# 接口调用示例
soundModule
.sendFile(param, (resp) => {
this.$alert("成功")
}, (error) => {
this.$toast("失败")
})
1
2
3
4
5
6
2
3
4
5
6
# 返回参数
- 成功时返回
Prop | Type | Default | Description |
---|---|---|---|
data | Object | N/A | json 字符串,值是传过来的path |
- 失败时返回
Prop | Type | Default | Description |
---|---|---|---|
errorCode | Number | N/A | 失败错误码 |
errorMessage | String | N/A | 错误消息(如有) |
← setAudioRead getFiles →