|
// 开始下载
api.download({
url: pageParam.url,
report: true,
cache: true,
allowResume: true
}, (ret, err) => {
this.progress = ret.percent
this.style = {
width: `${ret.percent}%`
}
if (ret.state == 1) {
//下载成功
alert('下载成功')
api.installApp({
appUri: ret.savePath
});
} else {
}
});
开发App在线升级功能,部分机型 api.download 下载进度100%后,可弹出 “下载成功” 并安装软件;部门手机则是:下载进度100%后,后续就不会执行,机型如:小米9、oppo。
|
|