# Conflicts:
#	src/pages/login/login/index.vue
master
hou 3 years ago
commit 8ca7100119

@ -150,45 +150,50 @@ export default class LoginPage extends BasePage {
console.log('image', this.image);
console.log('Version////', this.Version);
}
Version = '1.0.0';
Version = '1.0.2';
async update() {
await session.QueryVersion();
if (this.Version < session.Version) {
//
uni.showModal({
content: this.$t('message.Tip1') as string,
confirmText: this.$t('message.workArea_Confirm') as string,
cancelText: this.$t('message.Cancel') as string,
showCancel: false,
success: (res) => {
if (res.confirm) {
//
let downloadApkUrl = session.url;
uni.showLoading({
title: vm.$t('message.uploading') as string,
//title: '..........',
});
////////////////uni,
uni.downloadFile({
url: downloadApkUrl,
success: (downloadResult) => {
uni.hideLoading();
if (downloadResult.statusCode == 200) {
//
plus.runtime.install(downloadResult.tempFilePath as any, { force: true }, function () {
//uni.showToast('');
plus.runtime.restart();
});
}
},
});
} else if (res.cancel) {
this.go();
}
},
});
return;
try {
await session.QueryVersion();
if (this.Version < session.Version) {
//
uni.showModal({
content: this.$t('message.Tip1') as string,
confirmText: this.$t('message.workArea_Confirm') as string,
cancelText: this.$t('message.Cancel') as string,
showCancel: false,
success: (res) => {
if (res.confirm) {
//
let downloadApkUrl = session.url;
uni.showLoading({
title: vm.$t('message.uploading') as string,
//title: '..........',
});
////////////////uni,
uni.downloadFile({
url: downloadApkUrl,
success: (downloadResult) => {
uni.hideLoading();
if (downloadResult.statusCode == 200) {
//
plus.runtime.install(downloadResult.tempFilePath as any, { force: true }, function () {
//uni.showToast('');
plus.runtime.restart();
});
}
},
});
} else if (res.cancel) {
this.go();
}
},
});
return;
}
} catch (e) {
console.log('error', e);
}
this.go();
}
/////////////////

Loading…
Cancel
Save