|
[多端开发]
api.download,正式打包后无反应
[复制链接]
var txt=new Date().getTime()
api.download({
url: this.data.img,
savePath: 'fs://'+txt+'.png',
report: true,
cache: true,
allowResume: true
}, function (res, err) {
if (res.state == 1) {
api.saveMediaToAlbum({
path: res.savePath
}, function (ret, err) {
if (ret && ret.status) {
$kn.toast('保存成功,进入相册查看')
} else {
console.log('保存失败');
}
});
} else {
}
});
但正式编译后无反应,出现问题的手机有,华为P30pro harmonyOS2.0.0(mate 40 pro)
|
|