tianyi 1 month ago
parent
commit
63053674e0
  1. 54
      App.vue

54
App.vue

@ -66,37 +66,41 @@
}, },
onLaunch: function() { onLaunch: function() {
let context = this; let context = this;
const baseUrl = getApp().globalData.mainurl
// //
// #ifdef APP-PLUS // #ifdef APP-PLUS
plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) { plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) {
// uni.request({
// url: '',
// data: {
// version: widgetInfo.version, // version: widgetInfo.version,
// name: widgetInfo.name // name: widgetInfo.name
// }, uni.request({
// success: (result) => { url: baseUrl + '/setting/app-update/latest',
// var data = result.data; data: {},
// if (data.update && data.wgtUrl) { success: (res) => {
// uni.downloadFile({
// url: data.wgtUrl, var data = res.data.result;
// success: (downloadResult) => { // if(data.version == widgetInfo.version){
// if (downloadResult.statusCode === 200) {
// plus.runtime.install(downloadResult.tempFilePath, {
// force: false if (data.url) {
// }, function() { uni.downloadFile({
// console.log('install success...'); url: data.url,
// plus.runtime.restart(); success: (downloadResult) => {
// }, function(e) { if (downloadResult.statusCode === 200) {
// console.error('install fail...'); plus.runtime.install(downloadResult.tempFilePath, {
// }); force: false
// } }, function() {
// } console.log('install success...');
// }); plus.runtime.restart();
// } }, function(e) {
console.error('install fail...',e);
});
}
}
});
}
// } // }
// }); }
});
}); });
// #endif // #endif
this.globalData._i18n = this.$i18n //$i18n this.globalData._i18n = this.$i18n //$i18n

Loading…
Cancel
Save