update:登录相关修改

master
guoshuang 3 years ago
parent 921a2435d3
commit 61b1508274

@ -152,43 +152,48 @@ export default class LoginPage extends BasePage {
}
Version = '1.0.1';
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