uni.downloadFile({ url: data.url, success: (downloadResult) => { if (downloadResult.statusCode === 200) { plus.runtime.install(downloadResult.tempFilePath, { force: true }, function() { console.log('install success...'); uni.$u.toast('系统升级完毕') this.isupdate=false setTimeout(plus.runtime.restart(),2000) }, function(e) { console.log(e) console.error('install fail...'); }); } } });