diff --git a/src/component/Account/frontPage/bindPage.vue b/src/component/Account/frontPage/bindPage.vue index 7ec33f51..825781f4 100644 --- a/src/component/Account/frontPage/bindPage.vue +++ b/src/component/Account/frontPage/bindPage.vue @@ -111,28 +111,46 @@ export default defineComponent({ .catch((res) => {accountHomeData.loadingShow = false}); } const ungroupWeiXinModel = ()=>{ - Https.axiosGet(Https.httpUrls.unbindWeChat,).then((rv)=>{ - message.success(t('frontPage.jsContent1')); - let value = { - accountExtendList:{ - WeChat:undefined, - Google:accountHomeData.userDetail.accountExtendList?.Google - } + Modal.confirm({ + title: t('frontPage.UnbindTip'), + okText: t('Yes'), + cancelText: t('No'), + mask:false, + centered:true, + onOk() { + Https.axiosGet(Https.httpUrls.unbindWeChat,).then((rv)=>{ + message.success(t('frontPage.jsContent1')); + let value = { + accountExtendList:{ + WeChat:undefined, + Google:accountHomeData.userDetail.accountExtendList?.Google + } + } + store.commit("upUserDetail", value) + }) } - store.commit("upUserDetail", value) - }) + }); } const ungroupGoogleModel = ()=>{ - Https.axiosGet(Https.httpUrls.unbindGoogle,).then((rv)=>{ - let value = { - accountExtendList:{ - WeChat:accountHomeData.userDetail.accountExtendList?.WeChat, - Google:undefined, - } + Modal.confirm({ + title: t('frontPage.UnbindTip'), + okText: t('Yes'), + cancelText: t('No'), + mask:false, + centered:true, + onOk() { + Https.axiosGet(Https.httpUrls.unbindGoogle,).then((rv)=>{ + let value = { + accountExtendList:{ + WeChat:accountHomeData.userDetail.accountExtendList?.WeChat, + Google:undefined, + } + } + store.commit("upUserDetail", value) + message.success(t('frontPage.jsContent1')); + }) } - store.commit("upUserDetail", value) - message.success(t('frontPage.jsContent1')); - }) + }); } const modifyEmail = ()=>{ bindPageDom.bindEmail.init('Modify') 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; diff --git a/src/lang/cn.ts b/src/lang/cn.ts index 4ad24d17..1b459be2 100644 --- a/src/lang/cn.ts +++ b/src/lang/cn.ts @@ -825,6 +825,7 @@ export default { Modify: "修改", jsContent1: "取消绑定成功", jsContent2: "当前网络无法加载谷歌", + UnbindTip: "确认取消绑定吗?", }, Renew: { title: "选择你的最佳计划", @@ -1413,5 +1414,7 @@ export default { ToProductImage:'产品图', Relight:'打光', ChatRobot:'对话生成', + Yes:'是', + No:'否', }, }; diff --git a/src/lang/en.ts b/src/lang/en.ts index 1f2da2f7..621e7464 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -825,6 +825,7 @@ export default { Modify: "Modify", jsContent1: "Successful discharge", jsContent2: "The current network cannot load Google", + UnbindTip: "Are you sure to cancel the binding?", }, Renew: { title: "Find Your Ideal Plan", @@ -1413,5 +1414,7 @@ export default { ToProductImage:'ToProductImage', Relight:'Relight', ChatRobot:'ChatRobot', + Yes:'Yes', + No:'No', }, };