tianyi 1 week ago
parent
commit
d3417b9c06
  1. 34
      App.vue

34
App.vue

@ -71,6 +71,40 @@
},
onLaunch: function() {
let context = this;
//
// #ifdef APP-PLUS
plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) {
console.log(widgetInfo.version)
console.log(widgetInfo.name)
// uni.request({
// url: '',
// data: {
// version: widgetInfo.version,
// name: widgetInfo.name
// },
// success: (result) => {
// var data = result.data;
// if (data.update && data.wgtUrl) {
// uni.downloadFile({
// url: data.wgtUrl,
// success: (downloadResult) => {
// if (downloadResult.statusCode === 200) {
// plus.runtime.install(downloadResult.tempFilePath, {
// force: false
// }, function() {
// console.log('install success...');
// plus.runtime.restart();
// }, function(e) {
// console.error('install fail...');
// });
// }
// }
// });
// }
// }
// });
});
// #endif
this.globalData._i18n = this.$i18n //$i18n
this.globalData.$t = function(str) {
let $i18n = context.globalData.$i18n //globali18n

Loading…
Cancel
Save