0.0.63来料检验输入框限制数字去掉

master
LAPTOP-R6EHHS26\86155 1 year ago
parent 48899291a0
commit 19a3dc538b

@ -142,7 +142,7 @@ export default class LoginPage extends BasePage {
// console.log('Version////', this.Version); // console.log('Version////', this.Version);
} }
///****************** ///******************
version = '0.0.62';// version = '0.0.63'; //
//version = '0.0.2';// //version = '0.0.2';//
//*************** false true **************** //*************** false true ****************
//isTest = true; //isTest = true;
@ -174,79 +174,78 @@ export default class LoginPage extends BasePage {
async checkupdate() { async checkupdate() {
try { try {
await this.model.checkupdate(); await this.model.checkupdate();
console.log('3333333',this.model.checkversion) console.log('3333333', this.model.checkversion);
if(this.model.checkversion != undefined){ if (this.model.checkversion != undefined) {
const fileName = this.model.checkversion.fileName; // const fileName = this.model.checkversion.fileName;
// const isTestUpdate = fileName.includes('test'); // fileName'test' // const isTestUpdate = fileName.includes('test'); // fileName'test'
const queryversion = this.model.checkversion.version; const queryversion = this.model.checkversion.version;
//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 isTestUpdatetrueisTestUpdatefalse // test true isTestUpdatetrueisTestUpdatefalse
// test falseisTestUpdatetrueisTestUpdatefalse // test falseisTestUpdatetrueisTestUpdatefalse
// if (isTestUpdate && !this.isTest) { // if (isTestUpdate && !this.isTest) {
// // // //
// console.log('Test version update available, but running in production environment.'); // console.log('Test version update available, but running in production environment.');
// uni.navigateTo({ // uni.navigateTo({
// url: page.shouye, // url: page.shouye,
// }); // });
// return; // return;
// } else if (!isTestUpdate && this.isTest) { // } else if (!isTestUpdate && this.isTest) {
// // // //
// console.log('Production version update available, but running in test environment.'); // console.log('Production version update available, but running in test environment.');
// uni.navigateTo({ // uni.navigateTo({
// url: page.shouye, // url: page.shouye,
// }); // });
// return; // return;
// } // }
// //
uni.showModal({ uni.showModal({
content: '新版本为:' + this.model.checkversion.version + ',' + '是否更新?', content: '新版本为:' + this.model.checkversion.version + ',' + '是否更新?',
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
// //
let downloadApkUrl = this.model.checkversion.fileAddress; let downloadApkUrl = this.model.checkversion.fileAddress;
uni.showLoading({ uni.showLoading({
title: '下载中', title: '下载中',
}); });
////////////////uni, ////////////////uni,
uni.downloadFile({ uni.downloadFile({
url: downloadApkUrl, url: downloadApkUrl,
success: (downloadResult) => { success: (downloadResult) => {
uni.hideLoading(); uni.hideLoading();
if (downloadResult.statusCode == 200) { if (downloadResult.statusCode == 200) {
// //
plus.runtime.install(downloadResult.tempFilePath as any, { force: true }, function () { plus.runtime.install(downloadResult.tempFilePath as any, { force: true }, function () {
//uni.showToast(''); //uni.showToast('');
plus.runtime.restart(); plus.runtime.restart();
}); });
} }
}, },
}); });
} else if (res.cancel) { } else if (res.cancel) {
console.log(); console.log();
uni.navigateTo({ uni.navigateTo({
url: page.shouye, url: page.shouye,
}); });
} }
}, },
}); });
return; return;
} else {
uni.navigateTo({
url: page.shouye,
});
// uni.showToast({
// title: '',
// icon: 'none',
// });
}
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: page.shouye, url: page.shouye,
}); });
// uni.showToast({
// title: '',
// icon: 'none',
// });
}
}
else{
uni.navigateTo({
url: page.shouye,
});
} }
} catch (e) { } catch (e) {
console.log('error', e); console.log('error', e);

@ -242,7 +242,7 @@
</div> </div>
<div class="upload-name"> <div class="upload-name">
<div> <div>
<u-input :border="true" v-model="tagsvalue" type="number" :focus="isfocus" style="overflow: hidden" /> <u-input :border="true" v-model="tagsvalue" :focus="isfocus" style="overflow: hidden" />
</div> </div>
<div> <div>
<u-button style="width: 100px; height: 35px; margin-left: 5px" @click="ontagsadd" size="mini" type="primary">确认</u-button> <u-button style="width: 100px; height: 35px; margin-left: 5px" @click="ontagsadd" size="mini" type="primary">确认</u-button>

Loading…
Cancel
Save