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

60
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) {
// version: widgetInfo.version,
// uni.request({ // name: widgetInfo.name
// url: '', uni.request({
// data: { url: baseUrl + '/setting/app-update/latest',
// version: widgetInfo.version, data: {},
// name: widgetInfo.name success: (res) => {
// },
// success: (result) => { var data = res.data.result;
// var data = result.data; // if(data.version == widgetInfo.version){
// if (data.update && data.wgtUrl) {
// uni.downloadFile({
// url: data.wgtUrl, if (data.url) {
// success: (downloadResult) => { uni.downloadFile({
// if (downloadResult.statusCode === 200) { url: data.url,
// plus.runtime.install(downloadResult.tempFilePath, { success: (downloadResult) => {
// force: false if (downloadResult.statusCode === 200) {
// }, function() { plus.runtime.install(downloadResult.tempFilePath, {
// console.log('install success...'); force: false
// plus.runtime.restart(); }, function() {
// }, function(e) { console.log('install success...');
// console.error('install fail...'); 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