diff --git a/src/component/Detail/model/modelPosition.vue b/src/component/Detail/model/modelPosition.vue index 081419b9..a154e658 100644 --- a/src/component/Detail/model/modelPosition.vue +++ b/src/component/Detail/model/modelPosition.vue @@ -119,7 +119,9 @@ export default defineComponent({ // detailData.frontBack.back[index].style[key] = value*sacle+'px' } }); - emit('modelOnLoad') + setTimeout(() => { + emit('modelOnLoad') + }); }; img.src = detailData.frontBack?.body?.path; }) diff --git a/src/component/LoginPage/login/personal.vue b/src/component/LoginPage/login/personal.vue index e94401f1..33e569ff 100644 --- a/src/component/LoginPage/login/personal.vue +++ b/src/component/LoginPage/login/personal.vue @@ -68,6 +68,7 @@
We’ve sent an code to your email {{ email }}
@@ -97,7 +98,9 @@
Sign in
@@ -302,6 +305,8 @@ export default defineComponent({ passwordType: "password", userId: "", loginTime: true, + animation: false, + inputCodeTime: null as any, }; }, onBeforeUnmount() { @@ -415,6 +420,16 @@ export default defineComponent({ submitPerLogin() { //输入账号密码 if (this.emailStap >= 2) { + let verificationCodeInputDom:any = this.$refs.verificationCodeInputDom + let code = verificationCodeInputDom.getCtData.map(item => item).join(''); + console.log(code) + if(code.length !== this.emailCode.length){ + message.info("Please enter the complete verification code."); + }else{ + this.submitEmailLogin(code) + } + + //提交验证码 return; } else { if (!this.password) { @@ -482,20 +497,23 @@ export default defineComponent({ //邮箱登录提交 submitEmailLogin(emailVerifyCode: any) { - let data = { - email: this.email, - emailVerifyCode: emailVerifyCode, - loginType: "EMAIL", - userId: this.userId, - }; - this.$emit('update:isMask',true) - Https.axiosPost(Https.httpUrls.accountLogin, data) - .then((rv: any) => { - this.setSuccessLogin(rv); - }) - .catch((res) => { - this.$emit('update:isMask',false) - }); + clearTimeout(this.inputCodeTime) + this.inputCodeTime = setTimeout(()=>{ + let data = { + email: this.email, + emailVerifyCode: emailVerifyCode, + loginType: "EMAIL", + userId: this.userId, + }; + this.$emit('update:isMask',true) + Https.axiosPost(Https.httpUrls.accountLogin, data) + .then((rv: any) => { + this.setSuccessLogin(rv); + }) + .catch((res) => { + this.$emit('update:isMask',false) + }); + },1000) }, isCheckAgreement() { message.info("Agree to all terms, privacy fees and policies"); @@ -600,7 +618,15 @@ export default defineComponent({ // } // ); // }, - }, + loginBtnMousedown(){ + this.animation = true + let mouseup = ()=>{ + this.animation = false + document.removeEventListener('mouseup',mouseup) + } + document.addEventListener('mouseup',mouseup) + }, +}, mounted() { }, }); @@ -761,13 +787,12 @@ export default defineComponent({ transition: all 0.3s; margin-top: 5rem; font-weight: 600; - + &.active{ + transform: scale(.9); + } &:hover { background: #3c3c3c; } - &[state="2"] { - cursor: not-allowed; - } } .NewAccount{ font-size: 1.6rem; @@ -776,6 +801,8 @@ export default defineComponent({ margin-top: 1.2rem; text-align: left; cursor: pointer; + width: min-content; + white-space: nowrap; } .segmentation{ margin-top: 4rem; diff --git a/src/component/LoginPage/login/school.vue b/src/component/LoginPage/login/school.vue index 19c86954..9c5dfe03 100644 --- a/src/component/LoginPage/login/school.vue +++ b/src/component/LoginPage/login/school.vue @@ -90,6 +90,7 @@
We’ve sent an code to your email {{ email }}
@@ -125,9 +126,11 @@
-->
Sign in
@@ -310,6 +313,8 @@ export default defineComponent({ passwordType: "password", userId: "", loginTime: true, + animation: false, + inputCodeTime: null as any, }; }, onBeforeUnmount() { @@ -421,6 +426,16 @@ export default defineComponent({ submitPerLogin() { //输入账号密码 if (this.emailStap >= 2) { + let verificationCodeInputDom:any = this.$refs.verificationCodeInputDom + let code = verificationCodeInputDom.getCtData.map(item => item).join(''); + console.log(code) + if(code.length !== this.emailCode.length){ + message.info("Please enter the complete verification code."); + }else{ + this.submitEmailLogin(code) + } + + //提交验证码 return; } else { if (!this.password) { @@ -489,21 +504,24 @@ export default defineComponent({ //邮箱登录提交 submitEmailLogin(emailVerifyCode: any) { - let data = { - email: this.email, - emailVerifyCode: emailVerifyCode, - loginType: "EMAIL", - userId: this.userId, - organizationName: this.selectSchool, - }; - this.$emit('update:isMask',true) - Https.axiosPost(Https.httpUrls.accountLogin, data) - .then((rv: any) => { - this.setSuccessLogin(rv); - }) - .catch((res) => { - this.$emit('update:isMask',false) - }); + clearTimeout(this.inputCodeTime) + this.inputCodeTime = setTimeout(()=>{ + let data = { + email: this.email, + emailVerifyCode: emailVerifyCode, + loginType: "EMAIL", + userId: this.userId, + organizationName: this.selectSchool, + }; + this.$emit('update:isMask',true) + Https.axiosPost(Https.httpUrls.accountLogin, data) + .then((rv: any) => { + this.setSuccessLogin(rv); + }) + .catch((res) => { + this.$emit('update:isMask',false) + }); + },1000) }, isCheckAgreement() { message.info("Agree to all terms, privacy fees and policies"); @@ -608,6 +626,14 @@ export default defineComponent({ // } // ); // }, + loginBtnMousedown(){ + this.animation = true + let mouseup = ()=>{ + this.animation = false + document.removeEventListener('mouseup',mouseup) + } + document.addEventListener('mouseup',mouseup) + }, }, mounted() { }, @@ -785,13 +811,12 @@ export default defineComponent({ transition: all 0.3s; margin-top: 5rem; font-weight: 600; - + &.active{ + transform: scale(.9); + } &:hover { background: #3c3c3c; } - &[state="2"] { - cursor: not-allowed; - } } .NewAccount{ font-size: 1.6rem; @@ -800,6 +825,8 @@ export default defineComponent({ margin-top: 1.2rem; text-align: left; cursor: pointer; + width: min-content; + white-space: nowrap; } .segmentation{ margin-top: 4rem;