|
[App引擎]
下载文件 percent 到完成都是0,不能实时返回进度嘛
[复制链接]
打印出来永远是0~~
api.download({
url : url,
report : true
}, function(ret, err) {
if (ret && ret.state == 0) {
api.showProgress({
style: 'default',
animationType: 'fade',
title: '下载中...',
text: ret.percent + "%",
modal: true
});
}
if (ret && ret.state == 1) {
hideProgress();
// 下载完成
}
});
|
|