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

4
manifest.json

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

Loading…
Cancel
Save