ios 使用wgt更新,wgt会跳转到浏览器下载,安卓不会,请问如何解决
uni.downloadFile({
url: _config.packageUrl,
success: function(a) {
if (200 === a.statusCode) {
var b = a.tempFilePath;
uni.saveFile({
tempFilePath: b,
success: function(a) {
//plus.runtime.install(a.savedFilePath, {
// force: !0
//}), close()
plus.runtime.install(a.savedFilePath,{force:true},function(){
console.log("success");
plus.runtime.restart();
},function(e){
console.log("failed: "+e.message);
});
}
})
}
}
}), _downloadTask.onProgressUpdate(function(a) {
_loadingProgress != a.progress && (_loadingProgress = a.progress, _createLoading(a.progress))
}))
0 个回复