Compare commits

...

3 Commits

Author SHA1 Message Date
tianyi 2d60c3f490 1 1 month ago
tianyi 63053674e0 1 1 month ago
tianyi 9a39355a79 1 1 month ago
  1. 60
      App.vue
  2. 2
      components/worker/delivery.vue
  3. 2
      manifest.json

60
App.vue

@ -66,37 +66,41 @@
},
onLaunch: function() {
let context = this;
const baseUrl = getApp().globalData.mainurl
//
// #ifdef APP-PLUS
plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) {
// 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...');
// });
// }
// }
// });
// }
// }
// });
// 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);
});
}
}
});
}
// }
}
});
});
// #endif
this.globalData._i18n = this.$i18n //$i18n

2
components/worker/delivery.vue

@ -1720,7 +1720,7 @@
}
.box1 {
width: 100%;
width: 94%;
margin: 20rpx auto 20rpx;
background: #fff;
border-radius: 20rpx;

2
manifest.json

@ -3,7 +3,7 @@
"appid" : "__UNI__F1A1D03",
"description" : "",
"versionName" : "1.2.5",
"versionCode" : 2,
"versionCode" : 3,
"transformPx" : false,
/* 5+App */
"app-plus" : {

Loading…
Cancel
Save