Compare commits

...

2 Commits

Author SHA1 Message Date
tianyi 3dc894ca6b 1 4 weeks ago
tianyi f95be17b57 1 4 weeks ago
  1. 57
      App.vue
  2. 4
      manifest.json

57
App.vue

@ -68,39 +68,30 @@
let context = this; let context = this;
const baseUrl = getApp().globalData.mainurl const baseUrl = getApp().globalData.mainurl
// //
// #ifdef APP-PLUS // #ifdef APP-PLUS
plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) { uni.request({
// version: widgetInfo.version, url: baseUrl + '/setting/app-update/latest',
// name: widgetInfo.name data: {},
uni.request({ success: (res) => {
url: baseUrl + '/setting/app-update/latest', var data = res.data.result;
data: {}, if (data.url) {
success: (res) => { uni.downloadFile({
url: data.url,
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...',e);
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

4
manifest.json

@ -2,8 +2,8 @@
"name" : "半径里商家端", "name" : "半径里商家端",
"appid" : "__UNI__F1A1D03", "appid" : "__UNI__F1A1D03",
"description" : "", "description" : "",
"versionName" : "1.2.6", "versionName" : "1.2.7",
"versionCode" : 5, "versionCode" : 6,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

Loading…
Cancel
Save