# downFile ^6.8

下载文件

# 请求参数

Prop Type Default Comment
url String N/A 下载地址

# 接口调用示例

const params = {
  url: 'xxx', //下载地址
}
this.$bridge
  .downFile(params)
  .then(res => {
    this.$alert(res)
  })
  .catch(err => {
    this.$toast(err)
  })
1
2
3
4
5
6
7
8
9
10
11

# 返回参数

  • 成功时返回
Prop Type Default Description
errorCode Number N/A 0:下载完成 1:下载中
progress Number N/A 1~100 下载进度(errorCode为1时有效)
path String N/A 下载文件本地路径(errorCode为0时有效)
status String N/A 固件状态
  • 失败时返回
Prop Type Default Description
errorCode Number N/A 其他(不是0和1):下载出错
errorMessage String N/A 下载错误时候的错误信息
更新时间: 7/27/2021, 11:23:45 AM