|
|
@ -142,7 +142,7 @@ export default class LoginPage extends BasePage {
|
|
|
|
// console.log('Version////', this.Version);
|
|
|
|
// console.log('Version////', this.Version);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
///********版本号修改区域**********
|
|
|
|
///********版本号修改区域**********
|
|
|
|
version = '0.0.144'; //正式版本号
|
|
|
|
version = '0.0.145'; //正式版本号
|
|
|
|
//version = '0.0.14'; //测试版本号
|
|
|
|
//version = '0.0.14'; //测试版本号
|
|
|
|
//***************标志修改区域:是否是测试标志: false 正式版本; true 测试版本****************
|
|
|
|
//***************标志修改区域:是否是测试标志: false 正式版本; true 测试版本****************
|
|
|
|
//isTest = true;
|
|
|
|
//isTest = true;
|
|
|
@ -182,24 +182,6 @@ export default class LoginPage extends BasePage {
|
|
|
|
//const queryversion = this.checkversion.Version.match(/\d+\.\d+\.\d+/)[0];
|
|
|
|
//const queryversion = this.checkversion.Version.match(/\d+\.\d+\.\d+/)[0];
|
|
|
|
let versionNumber = this.compareVersion(this.version, queryversion); //this.version, queryversion
|
|
|
|
let versionNumber = this.compareVersion(this.version, queryversion); //this.version, queryversion
|
|
|
|
if (versionNumber == -1) {
|
|
|
|
if (versionNumber == -1) {
|
|
|
|
//如果 我现在是测试版本test true: 发了一个测试版本更新,isTestUpdate:true走跟新;发了一个正式isTestUpdate:false不走更新
|
|
|
|
|
|
|
|
//如果 我现在是正式版本 test false:发了一个测试版本更新,isTestUpdate:true不走更新;发了一个正式isTestUpdate:false走跟新
|
|
|
|
|
|
|
|
// if (isTestUpdate && !this.isTest) {
|
|
|
|
|
|
|
|
// // 测试版本更新,但当前环境是正式环境,不提示更新
|
|
|
|
|
|
|
|
// console.log('Test version update available, but running in production environment.');
|
|
|
|
|
|
|
|
// uni.navigateTo({
|
|
|
|
|
|
|
|
// url: page.shouye,
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// return;
|
|
|
|
|
|
|
|
// } else if (!isTestUpdate && this.isTest) {
|
|
|
|
|
|
|
|
// // 正式版本更新,但当前环境是测试环境,不提示更新
|
|
|
|
|
|
|
|
// console.log('Production version update available, but running in test environment.');
|
|
|
|
|
|
|
|
// uni.navigateTo({
|
|
|
|
|
|
|
|
// url: page.shouye,
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// return;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 版本更新提示
|
|
|
|
// 版本更新提示
|
|
|
|
uni.showModal({
|
|
|
|
uni.showModal({
|
|
|
|
content: '新版本为:' + this.model.checkversion.version + ',' + '是否更新?',
|
|
|
|
content: '新版本为:' + this.model.checkversion.version + ',' + '是否更新?',
|
|
|
|