Refactor code structure for improved readability and maintainability

This commit is contained in:
bighuixiang
2025-06-19 10:21:17 +08:00
parent 9b15d988f0
commit 505c79665b
4 changed files with 3768 additions and 3848 deletions

View File

@@ -8,13 +8,13 @@
<!-- v-show="loginType == 'username'" --> <!-- v-show="loginType == 'username'" -->
<div> <div>
<div class="login_form_content" :state="emailStap"> <div class="login_form_content" :state="emailStap">
<div v-show="emailStap === 1"> <div v-show="emailStap === 1">
<div class="login_form_title marign_top30"> <div class="login_form_title marign_top30">Enterprise</div>
Enterprise
</div>
<div class="generalModel_state"> <div class="generalModel_state">
<div class="generalModel_state_item" style="width: 100%; margin: 0;"> <div
class="generalModel_state_item"
style="width: 100%; margin: 0"
>
<a-select <a-select
placeholder="Select a school" placeholder="Select a school"
v-model:value="selectEnterprise" v-model:value="selectEnterprise"
@@ -36,9 +36,7 @@
</a-select> </a-select>
</div> </div>
</div> </div>
<div class="login_form_title marign_top30"> <div class="login_form_title marign_top30">Email</div>
Email
</div>
<input <input
class="login_form_input" class="login_form_input"
placeholder="Enter your email address" placeholder="Enter your email address"
@@ -63,21 +61,16 @@
</div> </div>
</div> </div>
<!-- 邮箱登录 start --> <!-- 邮箱登录 start -->
<div <div
v-show="emailStap === 2" v-show="emailStap === 2"
class="login_form_email" class="login_form_email"
:class="{ active: emailStap === 2 }" :class="{ active: emailStap === 2 }"
> >
<div <div v-show="emailStap === 2" class="email_last_step">
v-show="emailStap === 2"
class="email_last_step"
>
<div class="email_last_step_block"> <div class="email_last_step_block">
<span class="email_last_step_content" <span class="email_last_step_content"
>Verify with one-time verification >Verify with one-time verification code</span
code</span
> >
<i <i
class="fi fi-br-cross email_last_step_block_icon" class="fi fi-br-cross email_last_step_block_icon"
@@ -86,34 +79,23 @@
</div> </div>
<div class="email_last_step_bottom"> <div class="email_last_step_bottom">
<div class="email_last_step_des"> <div class="email_last_step_des">
<div class="sent_email_content"> <div class="sent_email_content">Sent to {{ email }}</div>
Sent to {{ email }}
</div>
<div class="tip_content"> <div class="tip_content">
<span v-show="time" <span v-show="time">{{ time }}s</span>
>{{ time }}s</span <span v-show="!time" @click="emailNextStepFun()"
>
<span
v-show="!time"
@click="emailNextStepFun()"
>Resend</span >Resend</span
> >
</div> </div>
</div> </div>
<VerificationCodeInput <VerificationCodeInput
:ct="emailCode" :ct="emailCode"
@sendCaptcha=" @sendCaptcha="submitEmailLogin($event)"
submitEmailLogin($event)
"
></VerificationCodeInput> ></VerificationCodeInput>
<div class="email_last_step_des"> <div class="email_last_step_des">
<div <div class="sent_email_content email_tip_content">
class="sent_email_content email_tip_content" Please check the junk box if you haven't received
> verification code
Please check the junk box if you
haven't received verification
code
</div> </div>
</div> </div>
</div> </div>
@@ -123,15 +105,8 @@
<div class="login_form_title marign_top30"> <div class="login_form_title marign_top30">
<label :class="{ active: emailStap == 2 }"> <label :class="{ active: emailStap == 2 }">
<input <input :state="emailStap" type="checkbox" v-model="checked" />
:state="emailStap" <span>I agree to all Term, Privacy Policy and Fees</span>
type="checkbox"
v-model="checked"
/>
<span
>I agree to all Term, Privacy Policy and
Fees</span
>
</label> </label>
</div> </div>
<!-- <div class="thirdPartyLogin marign_top30"> <!-- <div class="thirdPartyLogin marign_top30">
@@ -165,7 +140,6 @@
</div> </div>
<!-- 邮箱登录 end --> <!-- 邮箱登录 end -->
</div> </div>
<!-- 忘记密码 start --> <!-- 忘记密码 start -->
@@ -175,9 +149,7 @@
@click="forgetPasswordLastStepFun()" @click="forgetPasswordLastStepFun()"
> >
<i class="fi fi-br-arrow-left"></i> <i class="fi fi-br-arrow-left"></i>
<span class="forget_password_content_title" <span class="forget_password_content_title">Retrieve password</span>
>Retrieve password</span
>
</div> </div>
<div v-show="frogetPasswordStep === 1"> <div v-show="frogetPasswordStep === 1">
<div class="forget_passored_form_content"> <div class="forget_passored_form_content">
@@ -205,9 +177,7 @@
</div> </div>
<div class="tip_content"> <div class="tip_content">
<span v-show="time">{{ time }}s</span> <span v-show="time">{{ time }}s</span>
<span <span v-show="!time" @click="forgetPasswordNextStepFun()"
v-show="!time"
@click="forgetPasswordNextStepFun()"
>Resend</span >Resend</span
> >
</div> </div>
@@ -257,42 +227,47 @@ import phoneLogin from "@/component/LoginPage/phoneLogin.vue";
import { useStore } from "vuex"; import { useStore } from "vuex";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import { setLang } from "@/tool/guide"; import { setLang } from "@/tool/guide";
const md5 = require("md5"); import md5 from "md5";
export default defineComponent({ export default defineComponent({
components: { components: {
VerificationCodeInput,googleLogin,weiXinLogin,phoneLogin VerificationCodeInput,
googleLogin,
weiXinLogin,
phoneLogin,
}, },
setup() { setup() {
let timer: any = 0; let timer: any = 0;
const { locale } = useI18n(); const { locale } = useI18n();
const store = useStore(); const store = useStore();
let loadingShow = ref(false) let loadingShow = ref(false);
const data = reactive({ const data = reactive({
selectEnterprise:'', selectEnterprise: "",
schoolList: [] as any, schoolList: [] as any,
}) });
const schoolListChange = (e:any)=>{ const schoolListChange = (e: any) => {};
}
const filterOption = (e: any) => { const filterOption = (e: any) => {
let params = { let params = {
name: e, name: e,
type:'Enterprise' type: "Enterprise",
} };
Https.axiosPost(Https.httpUrls.organizationNameSearch,{},{params:params}).then((rv:any)=>{ Https.axiosPost(
Https.httpUrls.organizationNameSearch,
{},
{ params: params }
).then((rv: any) => {
data.schoolList = rv.map((item: any) => { data.schoolList = rv.map((item: any) => {
return { return {
label: item, label: item,
value: item, value: item,
} };
}) });
}) });
};
}
const handleFocus = () => { const handleFocus = () => {
if (data.schoolList.length == 0) { if (data.schoolList.length == 0) {
filterOption('') filterOption("");
}
} }
};
return { return {
...toRefs(data), ...toRefs(data),
store, store,
@@ -300,7 +275,8 @@ export default defineComponent({
locale, locale,
loadingShow, loadingShow,
schoolListChange, schoolListChange,
filterOption,handleFocus filterOption,
handleFocus,
}; };
}, },
data() { data() {
@@ -312,8 +288,8 @@ export default defineComponent({
emailCode: ["", "", "", "", "", ""], //邮箱验证码 emailCode: ["", "", "", "", "", ""], //邮箱验证码
emailNextStep: true, emailNextStep: true,
username: "", username: "",
password: localStorage.getItem("loginPassword") || '', password: localStorage.getItem("loginPassword") || "",
email: localStorage.getItem("loginEmail") || '', //邮箱登录邮箱 email: localStorage.getItem("loginEmail") || "", //邮箱登录邮箱
frogetPasswordStep: 1, //忘记密码的步骤 frogetPasswordStep: 1, //忘记密码的步骤
forgetPasswordEmail: "", forgetPasswordEmail: "",
forgetEmailCode: ["", "", "", "", "", ""], //忘记密码的邮箱验证码 forgetEmailCode: ["", "", "", "", "", ""], //忘记密码的邮箱验证码
@@ -358,16 +334,14 @@ export default defineComponent({
email: this.email, email: this.email,
operationType: "LOGIN", operationType: "LOGIN",
}; };
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then( Https.axiosPost(Https.httpUrls.accountSendEmail, data).then((rv: any) => {
(rv: any) => {
if (rv) { if (rv) {
this.emailStap = 2; this.emailStap = 2;
this.time = 60; this.time = 60;
this.emailCode = ["", "", "", "", "", ""]; this.emailCode = ["", "", "", "", "", ""];
this.createTimer(); this.createTimer();
} }
} });
);
}, },
//邮箱登录的上一步 //邮箱登录的上一步
@@ -390,15 +364,12 @@ export default defineComponent({
email: this.forgetPasswordEmail, email: this.forgetPasswordEmail,
operationType: "FORGET_PWD", operationType: "FORGET_PWD",
}; };
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then( Https.axiosPost(Https.httpUrls.accountSendEmail, data).then((rv: any) => {
(rv: any) => {
if (rv) { if (rv) {
this.frogetPasswordStep = 2; this.frogetPasswordStep = 2;
(this.forgetEmailCode = ["", "", "", "", "", ""]), (this.forgetEmailCode = ["", "", "", "", "", ""]), this.createTimer();
this.createTimer();
} }
} });
);
}, },
//忘记密码的上一步 //忘记密码的上一步
forgetPasswordLastStepFun() { forgetPasswordLastStepFun() {
@@ -407,8 +378,7 @@ export default defineComponent({
} else { } else {
this.frogetPasswordStep = this.frogetPasswordStep - 1; this.frogetPasswordStep = this.frogetPasswordStep - 1;
this.forgetPasswordEmail = ""; this.forgetPasswordEmail = "";
(this.forgetEmailCode = ["", "", "", "", "", ""]), (this.forgetEmailCode = ["", "", "", "", "", ""]), this.clearTimer();
this.clearTimer();
} }
}, },
@@ -421,15 +391,13 @@ export default defineComponent({
password: "", password: "",
verifyEmail: true, verifyEmail: true,
}; };
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then( Https.axiosPost(Https.httpUrls.accountResetPwd, data).then((rv: any) => {
(rv: any) => {
if (rv) { if (rv) {
this.forgetEmailValue = emailVerifyCode; this.forgetEmailValue = emailVerifyCode;
this.frogetPasswordStep = 3; this.frogetPasswordStep = 3;
this.clearTimer(); this.clearTimer();
} }
} });
);
}, },
//改变勾选是否是机器人 //改变勾选是否是机器人
@@ -444,9 +412,7 @@ export default defineComponent({
return; return;
} else { } else {
if (!this.password) { if (!this.password) {
message.info( message.info("Please enter your account number or password");
"Please enter your account number or password"
);
return; return;
} }
//输入邮箱 //输入邮箱
@@ -465,14 +431,12 @@ export default defineComponent({
} }
//判断是否同意隐私政策 //判断是否同意隐私政策
if (!this.checked) { if (!this.checked) {
message.info( message.info("Agree to all terms, privacy fees and policies");
"Agree to all terms, privacy fees and policies"
);
return; return;
} }
let data = { let data = {
password: md5(this.password + "abc"), password: md5(this.password + "abc"),
userName: 'a', userName: "a",
// userName: this.username, // userName: this.username,
organizationName: this.selectEnterprise, organizationName: this.selectEnterprise,
email: this.email, email: this.email,
@@ -484,7 +448,7 @@ export default defineComponent({
Https.axiosPost(Https.httpUrls.enterpriseLogin, data) Https.axiosPost(Https.httpUrls.enterpriseLogin, data)
.then((rv: any) => { .then((rv: any) => {
if (rv) { if (rv) {
this.clearTimer() this.clearTimer();
this.time = 60; this.time = 60;
this.emailStap = 2; this.emailStap = 2;
this.emailCode = ["", "", "", "", "", ""]; this.emailCode = ["", "", "", "", "", ""];
@@ -495,8 +459,7 @@ export default defineComponent({
localStorage.setItem("loginPassword", this.password); localStorage.setItem("loginPassword", this.password);
} }
}) })
.catch((res) => { .catch((res) => {});
});
setTimeout(() => { setTimeout(() => {
this.loginTime = true; this.loginTime = true;
}, 2000); }, 2000);
@@ -516,39 +479,39 @@ export default defineComponent({
emailVerifyCode: emailVerifyCode, emailVerifyCode: emailVerifyCode,
loginType: "EMAIL", loginType: "EMAIL",
userId: this.userId, userId: this.userId,
organizationName:this.selectEnterprise organizationName: this.selectEnterprise,
}; };
Https.axiosPost(Https.httpUrls.accountLogin, data) Https.axiosPost(Https.httpUrls.accountLogin, data)
.then((rv: any) => { .then((rv: any) => {
this.setSuccessLogin(rv) this.setSuccessLogin(rv);
}) })
.catch((res) => {}); .catch((res) => {});
}, },
isCheckAgreement() { isCheckAgreement() {
message.info( message.info("Agree to all terms, privacy fees and policies");
"Agree to all terms, privacy fees and policies"
);
}, },
//微信登录 //微信登录
wechatLogin(value: any) { wechatLogin(value: any) {
let data = { let data = {
code: value.code, code: value.code,
type:2 type: 2,
} };
this.loadingShow = true this.loadingShow = true;
Https.axiosGet(Https.httpUrls.parseWeChatCode, { params: data }) Https.axiosGet(Https.httpUrls.parseWeChatCode, { params: data })
.then((rv: any) => { .then((rv: any) => {
this.loadingShow = false this.loadingShow = false;
this.setSuccessLogin(rv) this.setSuccessLogin(rv);
}) })
.catch((res) => {this.loadingShow = false}); .catch((res) => {
this.loadingShow = false;
});
}, },
//谷歌登录 //谷歌登录
googelLogin(value: any) { googelLogin(value: any) {
let data = {credential : value,type:2} let data = { credential: value, type: 2 };
Https.axiosGet(Https.httpUrls.parseGoogleCredential, { params: data }) Https.axiosGet(Https.httpUrls.parseGoogleCredential, { params: data })
.then((rv: any) => { .then((rv: any) => {
this.setSuccessLogin(rv) this.setSuccessLogin(rv);
}) })
.catch((res) => {}); .catch((res) => {});
}, },
@@ -571,8 +534,8 @@ export default defineComponent({
let userid: any = { let userid: any = {
ueserId: rv.userId, ueserId: rv.userId,
systemUser: rv.systemUser, systemUser: rv.systemUser,
} };
if(rv.email)userid.email = rv.email if (rv.email) userid.email = rv.email;
this.store.commit("upUserDetail", userid); this.store.commit("upUserDetail", userid);
if (window.innerWidth < 768) { if (window.innerWidth < 768) {
@@ -583,13 +546,9 @@ export default defineComponent({
} else { } else {
this.turnToHomePage("/home"); this.turnToHomePage("/home");
} }
sessionStorage.setItem( sessionStorage.setItem("isTimeOne", JSON.stringify(false)); //是否需要公告 提示 弹窗
"isTimeOne",
JSON.stringify(false)
); //是否需要公告 提示 弹窗
let randomNum: any = let randomNum: any =
Math.floor(Math.random() * 9000000000000000) + Math.floor(Math.random() * 9000000000000000) + 1000000000000000;
1000000000000000;
sessionStorage.setItem("sessionId", randomNum); sessionStorage.setItem("sessionId", randomNum);
sessionStorage.setItem("record", JSON.stringify([])); sessionStorage.setItem("record", JSON.stringify([]));
} }
@@ -602,14 +561,12 @@ export default defineComponent({
password: md5(this.newPassword + "abc"), password: md5(this.newPassword + "abc"),
verifyEmail: false, verifyEmail: false,
}; };
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then( Https.axiosPost(Https.httpUrls.accountResetPwd, data).then((rv: any) => {
(rv: any) => {
if (rv) { if (rv) {
message.success("Changing the password successfully"); message.success("Changing the password successfully");
this.changeIsLogin(1); this.changeIsLogin(1);
} }
} });
);
}, },
//创建定时器 //创建定时器
@@ -655,9 +612,9 @@ export default defineComponent({
// }, // },
}, },
mounted() { mounted() {
const data = this.$route.query const data = this.$route.query;
if(data?.state == 'weiXin'){ if (data?.state == "weiXin") {
this.wechatLogin(data) this.wechatLogin(data);
} }
}, },
}); });
@@ -778,7 +735,7 @@ export default defineComponent({
font-size: 1.4rem; font-size: 1.4rem;
box-sizing: border-box; box-sizing: border-box;
outline: none; outline: none;
transition: all .3s; transition: all 0.3s;
&:hover { &:hover {
border: 0.1rem solid #000; border: 0.1rem solid #000;
} }
@@ -832,9 +789,9 @@ export default defineComponent({
font-weight: 500; font-weight: 500;
color: #ffffff; color: #ffffff;
cursor: pointer; cursor: pointer;
transition: all .3s; transition: all 0.3s;
&:hover { &:hover {
background: #3C3C3C; background: #3c3c3c;
} }
&[state="2"] { &[state="2"] {
cursor: not-allowed; cursor: not-allowed;

View File

@@ -4,7 +4,6 @@
<!-- 账号密码和邮箱登录 start--> <!-- 账号密码和邮箱登录 start-->
<div class="login_content" v-if="isLogin === 1"> <div class="login_content" v-if="isLogin === 1">
<div class="login_content_left"> <div class="login_content_left">
<!-- v-show="loginType == 'username'" --> <!-- v-show="loginType == 'username'" -->
<div> <div>
<div class="login_form_content" :state="emailStap"> <div class="login_form_content" :state="emailStap">
@@ -15,9 +14,7 @@
v-model="username" v-model="username"
/> --> /> -->
<div v-show="emailStap === 1"> <div v-show="emailStap === 1">
<div class="login_form_title marign_top30"> <div class="login_form_title marign_top30">Email</div>
Email
</div>
<input <input
class="login_form_input" class="login_form_input"
placeholder="Enter your email address" placeholder="Enter your email address"
@@ -42,21 +39,16 @@
</div> </div>
</div> </div>
<!-- 邮箱登录 start --> <!-- 邮箱登录 start -->
<div <div
v-show="emailStap === 2" v-show="emailStap === 2"
class="login_form_email" class="login_form_email"
:class="{ active: emailStap === 2 }" :class="{ active: emailStap === 2 }"
> >
<div <div v-show="emailStap === 2" class="email_last_step">
v-show="emailStap === 2"
class="email_last_step"
>
<div class="email_last_step_block"> <div class="email_last_step_block">
<span class="email_last_step_content" <span class="email_last_step_content"
>Verify with one-time verification >Verify with one-time verification code</span
code</span
> >
<i <i
class="fi fi-br-cross email_last_step_block_icon" class="fi fi-br-cross email_last_step_block_icon"
@@ -65,34 +57,23 @@
</div> </div>
<div class="email_last_step_bottom"> <div class="email_last_step_bottom">
<div class="email_last_step_des"> <div class="email_last_step_des">
<div class="sent_email_content"> <div class="sent_email_content">Sent to {{ email }}</div>
Sent to {{ email }}
</div>
<div class="tip_content"> <div class="tip_content">
<span v-show="time" <span v-show="time">{{ time }}s</span>
>{{ time }}s</span <span v-show="!time" @click="emailNextStepFun()"
>
<span
v-show="!time"
@click="emailNextStepFun()"
>Resend</span >Resend</span
> >
</div> </div>
</div> </div>
<VerificationCodeInput <VerificationCodeInput
:ct="emailCode" :ct="emailCode"
@sendCaptcha=" @sendCaptcha="submitEmailLogin($event)"
submitEmailLogin($event)
"
></VerificationCodeInput> ></VerificationCodeInput>
<div class="email_last_step_des"> <div class="email_last_step_des">
<div <div class="sent_email_content email_tip_content">
class="sent_email_content email_tip_content" Please check the junk box if you haven't received
> verification code
Please check the junk box if you
haven't received verification
code
</div> </div>
</div> </div>
</div> </div>
@@ -102,24 +83,25 @@
<div class="login_form_title marign_top30"> <div class="login_form_title marign_top30">
<label :class="{ active: emailStap == 2 }"> <label :class="{ active: emailStap == 2 }">
<input <input :state="emailStap" type="checkbox" v-model="checked" />
:state="emailStap" <span>I agree to all Term, Privacy Policy and Fees</span>
type="checkbox"
v-model="checked"
/>
<span
>I agree to all Term, Privacy Policy and
Fees</span
>
</label> </label>
</div> </div>
<div class="thirdPartyLogin marign_top30"> <div class="thirdPartyLogin marign_top30">
<div class="label"> <div class="label">
<div class="mask" v-show="!checked" @click="isCheckAgreement"></div> <div
class="mask"
v-show="!checked"
@click="isCheckAgreement"
></div>
<googleLogin @googelLogin="googelLogin"></googleLogin> <googleLogin @googelLogin="googelLogin"></googleLogin>
</div> </div>
<div class="label"> <div class="label">
<div class="mask" v-show="!checked" @click="isCheckAgreement"></div> <div
class="mask"
v-show="!checked"
@click="isCheckAgreement"
></div>
<weiXinLogin></weiXinLogin> <weiXinLogin></weiXinLogin>
</div> </div>
<!-- <phoneLogin></phoneLogin> --> <!-- <phoneLogin></phoneLogin> -->
@@ -133,10 +115,7 @@
</div> </div>
<div class="login_text"> <div class="login_text">
<div <div class="forget_password_text" @click="changeIsLogin(2)">
class="forget_password_text"
@click="changeIsLogin(2)"
>
Forgot your password Forgot your password
</div> </div>
</div> </div>
@@ -156,9 +135,7 @@
<!-- <span class="icon iconfont fi-br-arrow-left"></span <!-- <span class="icon iconfont fi-br-arrow-left"></span
> --> > -->
<i class="fi fi-br-arrow-left"></i> <i class="fi fi-br-arrow-left"></i>
<span class="forget_password_content_title" <span class="forget_password_content_title">Retrieve password</span>
>Retrieve password</span
>
</div> </div>
<div v-show="frogetPasswordStep === 1"> <div v-show="frogetPasswordStep === 1">
<div class="forget_passored_form_content"> <div class="forget_passored_form_content">
@@ -186,9 +163,7 @@
</div> </div>
<div class="tip_content"> <div class="tip_content">
<span v-show="time">{{ time }}s</span> <span v-show="time">{{ time }}s</span>
<span <span v-show="!time" @click="forgetPasswordNextStepFun()"
v-show="!time"
@click="forgetPasswordNextStepFun()"
>Resend</span >Resend</span
> >
</div> </div>
@@ -220,8 +195,6 @@
<!-- 忘记密码 end --> <!-- 忘记密码 end -->
</div> </div>
<!-- <div class="login_footer"> <!-- <div class="login_footer">
<div class="login_footer_item"> <div class="login_footer_item">
<div class="login_footer_item_text"> <div class="login_footer_item_text">
@@ -271,16 +244,19 @@ import phoneLogin from "@/component/LoginPage/phoneLogin.vue";
import { useStore } from "vuex"; import { useStore } from "vuex";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import { setLang } from "@/tool/guide"; import { setLang } from "@/tool/guide";
const md5 = require("md5"); import md5 from "md5";
export default defineComponent({ export default defineComponent({
components: { components: {
VerificationCodeInput,googleLogin,weiXinLogin,phoneLogin VerificationCodeInput,
googleLogin,
weiXinLogin,
phoneLogin,
}, },
setup() { setup() {
let timer: any = 0; let timer: any = 0;
const { locale } = useI18n(); const { locale } = useI18n();
const store = useStore(); const store = useStore();
let loadingShow = ref(false) let loadingShow = ref(false);
return { return {
store, store,
timer, timer,
@@ -297,8 +273,8 @@ export default defineComponent({
emailCode: ["", "", "", "", "", ""], //邮箱验证码 emailCode: ["", "", "", "", "", ""], //邮箱验证码
emailNextStep: true, emailNextStep: true,
username: "", username: "",
password: localStorage.getItem("loginPassword") || '', password: localStorage.getItem("loginPassword") || "",
email: localStorage.getItem("loginEmail") || '', //邮箱登录邮箱 email: localStorage.getItem("loginEmail") || "", //邮箱登录邮箱
frogetPasswordStep: 1, //忘记密码的步骤 frogetPasswordStep: 1, //忘记密码的步骤
forgetPasswordEmail: "", forgetPasswordEmail: "",
forgetEmailCode: ["", "", "", "", "", ""], //忘记密码的邮箱验证码 forgetEmailCode: ["", "", "", "", "", ""], //忘记密码的邮箱验证码
@@ -343,16 +319,14 @@ export default defineComponent({
email: this.email, email: this.email,
operationType: "LOGIN", operationType: "LOGIN",
}; };
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then( Https.axiosPost(Https.httpUrls.accountSendEmail, data).then((rv: any) => {
(rv: any) => {
if (rv) { if (rv) {
this.emailStap = 2; this.emailStap = 2;
this.time = 60; this.time = 60;
this.emailCode = ["", "", "", "", "", ""]; this.emailCode = ["", "", "", "", "", ""];
this.createTimer(); this.createTimer();
} }
} });
);
}, },
//邮箱登录的上一步 //邮箱登录的上一步
@@ -375,15 +349,12 @@ export default defineComponent({
email: this.forgetPasswordEmail, email: this.forgetPasswordEmail,
operationType: "FORGET_PWD", operationType: "FORGET_PWD",
}; };
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then( Https.axiosPost(Https.httpUrls.accountSendEmail, data).then((rv: any) => {
(rv: any) => {
if (rv) { if (rv) {
this.frogetPasswordStep = 2; this.frogetPasswordStep = 2;
(this.forgetEmailCode = ["", "", "", "", "", ""]), (this.forgetEmailCode = ["", "", "", "", "", ""]), this.createTimer();
this.createTimer();
} }
} });
);
}, },
//忘记密码的上一步 //忘记密码的上一步
forgetPasswordLastStepFun() { forgetPasswordLastStepFun() {
@@ -392,8 +363,7 @@ export default defineComponent({
} else { } else {
this.frogetPasswordStep = this.frogetPasswordStep - 1; this.frogetPasswordStep = this.frogetPasswordStep - 1;
this.forgetPasswordEmail = ""; this.forgetPasswordEmail = "";
(this.forgetEmailCode = ["", "", "", "", "", ""]), (this.forgetEmailCode = ["", "", "", "", "", ""]), this.clearTimer();
this.clearTimer();
} }
}, },
@@ -406,15 +376,13 @@ export default defineComponent({
password: "", password: "",
verifyEmail: true, verifyEmail: true,
}; };
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then( Https.axiosPost(Https.httpUrls.accountResetPwd, data).then((rv: any) => {
(rv: any) => {
if (rv) { if (rv) {
this.forgetEmailValue = emailVerifyCode; this.forgetEmailValue = emailVerifyCode;
this.frogetPasswordStep = 3; this.frogetPasswordStep = 3;
this.clearTimer(); this.clearTimer();
} }
} });
);
}, },
//改变勾选是否是机器人 //改变勾选是否是机器人
@@ -429,9 +397,7 @@ export default defineComponent({
return; return;
} else { } else {
if (!this.password) { if (!this.password) {
message.info( message.info("Please enter your account number or password");
"Please enter your account number or password"
);
return; return;
} }
//输入邮箱 //输入邮箱
@@ -446,14 +412,12 @@ export default defineComponent({
} }
//判断是否同意隐私政策 //判断是否同意隐私政策
if (!this.checked) { if (!this.checked) {
message.info( message.info("Agree to all terms, privacy fees and policies");
"Agree to all terms, privacy fees and policies"
);
return; return;
} }
let data = { let data = {
password: md5(this.password + "abc"), password: md5(this.password + "abc"),
userName: 'a', userName: "a",
// userName: this.username, // userName: this.username,
email: this.email, email: this.email,
operationType: "LOGIN", operationType: "LOGIN",
@@ -469,7 +433,7 @@ export default defineComponent({
// this.loginType = 'email' // this.loginType = 'email'
// } // }
if (rv) { if (rv) {
this.clearTimer() this.clearTimer();
this.time = 60; this.time = 60;
this.emailStap = 2; this.emailStap = 2;
this.emailCode = ["", "", "", "", "", ""]; this.emailCode = ["", "", "", "", "", ""];
@@ -482,8 +446,7 @@ export default defineComponent({
localStorage.setItem("loginPassword", this.password); localStorage.setItem("loginPassword", this.password);
} }
}) })
.catch((res) => { .catch((res) => {});
});
setTimeout(() => { setTimeout(() => {
this.loginTime = true; this.loginTime = true;
}, 2000); }, 2000);
@@ -506,35 +469,35 @@ export default defineComponent({
}; };
Https.axiosPost(Https.httpUrls.accountLogin, data) Https.axiosPost(Https.httpUrls.accountLogin, data)
.then((rv: any) => { .then((rv: any) => {
this.setSuccessLogin(rv) this.setSuccessLogin(rv);
}) })
.catch((res) => {}); .catch((res) => {});
}, },
isCheckAgreement() { isCheckAgreement() {
message.info( message.info("Agree to all terms, privacy fees and policies");
"Agree to all terms, privacy fees and policies"
);
}, },
//微信登录 //微信登录
wechatLogin(value: any) { wechatLogin(value: any) {
let data = { let data = {
code: value.code, code: value.code,
type:2 type: 2,
} };
this.loadingShow = true this.loadingShow = true;
Https.axiosGet(Https.httpUrls.parseWeChatCode, { params: data }) Https.axiosGet(Https.httpUrls.parseWeChatCode, { params: data })
.then((rv: any) => { .then((rv: any) => {
this.loadingShow = false this.loadingShow = false;
this.setSuccessLogin(rv) this.setSuccessLogin(rv);
}) })
.catch((res) => {this.loadingShow = false}); .catch((res) => {
this.loadingShow = false;
});
}, },
//谷歌登录 //谷歌登录
googelLogin(value: any) { googelLogin(value: any) {
let data = {credential : value,type:2} let data = { credential: value, type: 2 };
Https.axiosGet(Https.httpUrls.parseGoogleCredential, { params: data }) Https.axiosGet(Https.httpUrls.parseGoogleCredential, { params: data })
.then((rv: any) => { .then((rv: any) => {
this.setSuccessLogin(rv) this.setSuccessLogin(rv);
}) })
.catch((res) => {}); .catch((res) => {});
}, },
@@ -557,8 +520,8 @@ export default defineComponent({
let userid: any = { let userid: any = {
ueserId: rv.userId, ueserId: rv.userId,
systemUser: rv.systemUser, systemUser: rv.systemUser,
} };
if(rv.email)userid.email = rv.email if (rv.email) userid.email = rv.email;
this.store.commit("upUserDetail", userid); this.store.commit("upUserDetail", userid);
if (window.innerWidth < 768) { if (window.innerWidth < 768) {
@@ -569,13 +532,9 @@ export default defineComponent({
} else { } else {
this.turnToHomePage("/home"); this.turnToHomePage("/home");
} }
sessionStorage.setItem( sessionStorage.setItem("isTimeOne", JSON.stringify(false)); //是否需要公告 提示 弹窗
"isTimeOne",
JSON.stringify(false)
); //是否需要公告 提示 弹窗
let randomNum: any = let randomNum: any =
Math.floor(Math.random() * 9000000000000000) + Math.floor(Math.random() * 9000000000000000) + 1000000000000000;
1000000000000000;
sessionStorage.setItem("sessionId", randomNum); sessionStorage.setItem("sessionId", randomNum);
sessionStorage.setItem("record", JSON.stringify([])); sessionStorage.setItem("record", JSON.stringify([]));
} }
@@ -588,14 +547,12 @@ export default defineComponent({
password: md5(this.newPassword + "abc"), password: md5(this.newPassword + "abc"),
verifyEmail: false, verifyEmail: false,
}; };
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then( Https.axiosPost(Https.httpUrls.accountResetPwd, data).then((rv: any) => {
(rv: any) => {
if (rv) { if (rv) {
message.success("Changing the password successfully"); message.success("Changing the password successfully");
this.changeIsLogin(1); this.changeIsLogin(1);
} }
} });
);
}, },
//创建定时器 //创建定时器
@@ -641,9 +598,9 @@ export default defineComponent({
// }, // },
}, },
mounted() { mounted() {
const data = this.$route.query const data = this.$route.query;
if(data?.state == 'weiXin'){ if (data?.state == "weiXin") {
this.wechatLogin(data) this.wechatLogin(data);
} }
}, },
}); });
@@ -749,7 +706,7 @@ export default defineComponent({
font-size: 1.4rem; font-size: 1.4rem;
box-sizing: border-box; box-sizing: border-box;
outline: none; outline: none;
transition: all .3s; transition: all 0.3s;
&:hover { &:hover {
border: 0.1rem solid #000; border: 0.1rem solid #000;
} }
@@ -803,9 +760,9 @@ export default defineComponent({
font-weight: 500; font-weight: 500;
color: #ffffff; color: #ffffff;
cursor: pointer; cursor: pointer;
transition: all .3s; transition: all 0.3s;
&:hover { &:hover {
background: #3C3C3C; background: #3c3c3c;
} }
&[state="2"] { &[state="2"] {
cursor: not-allowed; cursor: not-allowed;

View File

@@ -8,13 +8,13 @@
<!-- v-show="loginType == 'username'" --> <!-- v-show="loginType == 'username'" -->
<div> <div>
<div class="login_form_content" :state="emailStap"> <div class="login_form_content" :state="emailStap">
<div v-show="emailStap === 1"> <div v-show="emailStap === 1">
<div class="login_form_title marign_top30"> <div class="login_form_title marign_top30">School</div>
School
</div>
<div class="generalModel_state"> <div class="generalModel_state">
<div class="generalModel_state_item" style="width: 100%; margin: 0;"> <div
class="generalModel_state_item"
style="width: 100%; margin: 0"
>
<a-select <a-select
placeholder="Select a school" placeholder="Select a school"
v-model:value="selectSchool" v-model:value="selectSchool"
@@ -36,9 +36,7 @@
</a-select> </a-select>
</div> </div>
</div> </div>
<div class="login_form_title marign_top30"> <div class="login_form_title marign_top30">Email</div>
Email
</div>
<input <input
class="login_form_input" class="login_form_input"
placeholder="Enter your email address" placeholder="Enter your email address"
@@ -63,21 +61,16 @@
</div> </div>
</div> </div>
<!-- 邮箱登录 start --> <!-- 邮箱登录 start -->
<div <div
v-show="emailStap === 2" v-show="emailStap === 2"
class="login_form_email" class="login_form_email"
:class="{ active: emailStap === 2 }" :class="{ active: emailStap === 2 }"
> >
<div <div v-show="emailStap === 2" class="email_last_step">
v-show="emailStap === 2"
class="email_last_step"
>
<div class="email_last_step_block"> <div class="email_last_step_block">
<span class="email_last_step_content" <span class="email_last_step_content"
>Verify with one-time verification >Verify with one-time verification code</span
code</span
> >
<i <i
class="fi fi-br-cross email_last_step_block_icon" class="fi fi-br-cross email_last_step_block_icon"
@@ -86,34 +79,23 @@
</div> </div>
<div class="email_last_step_bottom"> <div class="email_last_step_bottom">
<div class="email_last_step_des"> <div class="email_last_step_des">
<div class="sent_email_content"> <div class="sent_email_content">Sent to {{ email }}</div>
Sent to {{ email }}
</div>
<div class="tip_content"> <div class="tip_content">
<span v-show="time" <span v-show="time">{{ time }}s</span>
>{{ time }}s</span <span v-show="!time" @click="emailNextStepFun()"
>
<span
v-show="!time"
@click="emailNextStepFun()"
>Resend</span >Resend</span
> >
</div> </div>
</div> </div>
<VerificationCodeInput <VerificationCodeInput
:ct="emailCode" :ct="emailCode"
@sendCaptcha=" @sendCaptcha="submitEmailLogin($event)"
submitEmailLogin($event)
"
></VerificationCodeInput> ></VerificationCodeInput>
<div class="email_last_step_des"> <div class="email_last_step_des">
<div <div class="sent_email_content email_tip_content">
class="sent_email_content email_tip_content" Please check the junk box if you haven't received
> verification code
Please check the junk box if you
haven't received verification
code
</div> </div>
</div> </div>
</div> </div>
@@ -123,15 +105,8 @@
<div class="login_form_title marign_top30"> <div class="login_form_title marign_top30">
<label :class="{ active: emailStap == 2 }"> <label :class="{ active: emailStap == 2 }">
<input <input :state="emailStap" type="checkbox" v-model="checked" />
:state="emailStap" <span>I agree to all Term, Privacy Policy and Fees</span>
type="checkbox"
v-model="checked"
/>
<span
>I agree to all Term, Privacy Policy and
Fees</span
>
</label> </label>
</div> </div>
<!-- <div class="thirdPartyLogin marign_top30"> <!-- <div class="thirdPartyLogin marign_top30">
@@ -174,9 +149,7 @@
@click="forgetPasswordLastStepFun()" @click="forgetPasswordLastStepFun()"
> >
<i class="fi fi-br-arrow-left"></i> <i class="fi fi-br-arrow-left"></i>
<span class="forget_password_content_title" <span class="forget_password_content_title">Retrieve password</span>
>Retrieve password</span
>
</div> </div>
<div v-show="frogetPasswordStep === 1"> <div v-show="frogetPasswordStep === 1">
<div class="forget_passored_form_content"> <div class="forget_passored_form_content">
@@ -204,9 +177,7 @@
</div> </div>
<div class="tip_content"> <div class="tip_content">
<span v-show="time">{{ time }}s</span> <span v-show="time">{{ time }}s</span>
<span <span v-show="!time" @click="forgetPasswordNextStepFun()"
v-show="!time"
@click="forgetPasswordNextStepFun()"
>Resend</span >Resend</span
> >
</div> </div>
@@ -256,42 +227,47 @@ import phoneLogin from "@/component/LoginPage/phoneLogin.vue";
import { useStore } from "vuex"; import { useStore } from "vuex";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import { setLang } from "@/tool/guide"; import { setLang } from "@/tool/guide";
const md5 = require("md5"); import md5 from "md5";
export default defineComponent({ export default defineComponent({
components: { components: {
VerificationCodeInput,googleLogin,weiXinLogin,phoneLogin VerificationCodeInput,
googleLogin,
weiXinLogin,
phoneLogin,
}, },
setup() { setup() {
let timer: any = 0; let timer: any = 0;
const { locale } = useI18n(); const { locale } = useI18n();
const store = useStore(); const store = useStore();
let loadingShow = ref(false) let loadingShow = ref(false);
const data = reactive({ const data = reactive({
selectSchool:'', selectSchool: "",
schoolList: [] as any, schoolList: [] as any,
}) });
const schoolListChange = (e:any)=>{ const schoolListChange = (e: any) => {};
}
const filterOption = (e: any) => { const filterOption = (e: any) => {
let params = { let params = {
name: e, name: e,
type:'School' type: "School",
} };
Https.axiosPost(Https.httpUrls.organizationNameSearch,{},{params:params}).then((rv:any)=>{ Https.axiosPost(
Https.httpUrls.organizationNameSearch,
{},
{ params: params }
).then((rv: any) => {
data.schoolList = rv.map((item: any) => { data.schoolList = rv.map((item: any) => {
return { return {
label: item, label: item,
value: item, value: item,
} };
}) });
}) });
};
}
const handleFocus = () => { const handleFocus = () => {
if (data.schoolList.length == 0) { if (data.schoolList.length == 0) {
filterOption('') filterOption("");
}
} }
};
return { return {
...toRefs(data), ...toRefs(data),
store, store,
@@ -299,7 +275,8 @@ export default defineComponent({
locale, locale,
loadingShow, loadingShow,
schoolListChange, schoolListChange,
filterOption,handleFocus filterOption,
handleFocus,
}; };
}, },
data() { data() {
@@ -311,8 +288,8 @@ export default defineComponent({
emailCode: ["", "", "", "", "", ""], //邮箱验证码 emailCode: ["", "", "", "", "", ""], //邮箱验证码
emailNextStep: true, emailNextStep: true,
username: "", username: "",
password: localStorage.getItem("loginPassword") || '', password: localStorage.getItem("loginPassword") || "",
email: localStorage.getItem("loginEmail") || '', //邮箱登录邮箱 email: localStorage.getItem("loginEmail") || "", //邮箱登录邮箱
frogetPasswordStep: 1, //忘记密码的步骤 frogetPasswordStep: 1, //忘记密码的步骤
forgetPasswordEmail: "", forgetPasswordEmail: "",
forgetEmailCode: ["", "", "", "", "", ""], //忘记密码的邮箱验证码 forgetEmailCode: ["", "", "", "", "", ""], //忘记密码的邮箱验证码
@@ -357,16 +334,14 @@ export default defineComponent({
email: this.email, email: this.email,
operationType: "LOGIN", operationType: "LOGIN",
}; };
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then( Https.axiosPost(Https.httpUrls.accountSendEmail, data).then((rv: any) => {
(rv: any) => {
if (rv) { if (rv) {
this.emailStap = 2; this.emailStap = 2;
this.time = 60; this.time = 60;
this.emailCode = ["", "", "", "", "", ""]; this.emailCode = ["", "", "", "", "", ""];
this.createTimer(); this.createTimer();
} }
} });
);
}, },
//邮箱登录的上一步 //邮箱登录的上一步
@@ -389,15 +364,12 @@ export default defineComponent({
email: this.forgetPasswordEmail, email: this.forgetPasswordEmail,
operationType: "FORGET_PWD", operationType: "FORGET_PWD",
}; };
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then( Https.axiosPost(Https.httpUrls.accountSendEmail, data).then((rv: any) => {
(rv: any) => {
if (rv) { if (rv) {
this.frogetPasswordStep = 2; this.frogetPasswordStep = 2;
(this.forgetEmailCode = ["", "", "", "", "", ""]), (this.forgetEmailCode = ["", "", "", "", "", ""]), this.createTimer();
this.createTimer();
} }
} });
);
}, },
//忘记密码的上一步 //忘记密码的上一步
forgetPasswordLastStepFun() { forgetPasswordLastStepFun() {
@@ -406,8 +378,7 @@ export default defineComponent({
} else { } else {
this.frogetPasswordStep = this.frogetPasswordStep - 1; this.frogetPasswordStep = this.frogetPasswordStep - 1;
this.forgetPasswordEmail = ""; this.forgetPasswordEmail = "";
(this.forgetEmailCode = ["", "", "", "", "", ""]), (this.forgetEmailCode = ["", "", "", "", "", ""]), this.clearTimer();
this.clearTimer();
} }
}, },
@@ -420,15 +391,13 @@ export default defineComponent({
password: "", password: "",
verifyEmail: true, verifyEmail: true,
}; };
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then( Https.axiosPost(Https.httpUrls.accountResetPwd, data).then((rv: any) => {
(rv: any) => {
if (rv) { if (rv) {
this.forgetEmailValue = emailVerifyCode; this.forgetEmailValue = emailVerifyCode;
this.frogetPasswordStep = 3; this.frogetPasswordStep = 3;
this.clearTimer(); this.clearTimer();
} }
} });
);
}, },
//改变勾选是否是机器人 //改变勾选是否是机器人
@@ -443,9 +412,7 @@ export default defineComponent({
return; return;
} else { } else {
if (!this.password) { if (!this.password) {
message.info( message.info("Please enter your account number or password");
"Please enter your account number or password"
);
return; return;
} }
//输入邮箱 //输入邮箱
@@ -464,14 +431,12 @@ export default defineComponent({
} }
//判断是否同意隐私政策 //判断是否同意隐私政策
if (!this.checked) { if (!this.checked) {
message.info( message.info("Agree to all terms, privacy fees and policies");
"Agree to all terms, privacy fees and policies"
);
return; return;
} }
let data = { let data = {
password: md5(this.password + "abc"), password: md5(this.password + "abc"),
userName: 'a', userName: "a",
// userName: this.username, // userName: this.username,
organizationName: this.selectSchool, organizationName: this.selectSchool,
email: this.email, email: this.email,
@@ -484,7 +449,7 @@ export default defineComponent({
Https.axiosPost(Https.httpUrls.schoolLogin, data) Https.axiosPost(Https.httpUrls.schoolLogin, data)
.then((rv: any) => { .then((rv: any) => {
if (rv) { if (rv) {
this.clearTimer() this.clearTimer();
this.time = 60; this.time = 60;
this.emailStap = 2; this.emailStap = 2;
this.emailCode = ["", "", "", "", "", ""]; this.emailCode = ["", "", "", "", "", ""];
@@ -517,39 +482,39 @@ export default defineComponent({
emailVerifyCode: emailVerifyCode, emailVerifyCode: emailVerifyCode,
loginType: "EMAIL", loginType: "EMAIL",
userId: this.userId, userId: this.userId,
organizationName:this.selectSchool organizationName: this.selectSchool,
}; };
Https.axiosPost(Https.httpUrls.accountLogin, data) Https.axiosPost(Https.httpUrls.accountLogin, data)
.then((rv: any) => { .then((rv: any) => {
this.setSuccessLogin(rv) this.setSuccessLogin(rv);
}) })
.catch((res) => {}); .catch((res) => {});
}, },
isCheckAgreement() { isCheckAgreement() {
message.info( message.info("Agree to all terms, privacy fees and policies");
"Agree to all terms, privacy fees and policies"
);
}, },
//微信登录 //微信登录
wechatLogin(value: any) { wechatLogin(value: any) {
let data = { let data = {
code: value.code, code: value.code,
type:2 type: 2,
} };
this.loadingShow = true this.loadingShow = true;
Https.axiosGet(Https.httpUrls.parseWeChatCode, { params: data }) Https.axiosGet(Https.httpUrls.parseWeChatCode, { params: data })
.then((rv: any) => { .then((rv: any) => {
this.loadingShow = false this.loadingShow = false;
this.setSuccessLogin(rv) this.setSuccessLogin(rv);
}) })
.catch((res) => {this.loadingShow = false}); .catch((res) => {
this.loadingShow = false;
});
}, },
//谷歌登录 //谷歌登录
googelLogin(value: any) { googelLogin(value: any) {
let data = {credential : value,type:2} let data = { credential: value, type: 2 };
Https.axiosGet(Https.httpUrls.parseGoogleCredential, { params: data }) Https.axiosGet(Https.httpUrls.parseGoogleCredential, { params: data })
.then((rv: any) => { .then((rv: any) => {
this.setSuccessLogin(rv) this.setSuccessLogin(rv);
}) })
.catch((res) => {}); .catch((res) => {});
}, },
@@ -572,8 +537,8 @@ export default defineComponent({
let userid: any = { let userid: any = {
ueserId: rv.userId, ueserId: rv.userId,
systemUser: rv.systemUser, systemUser: rv.systemUser,
} };
if(rv.email)userid.email = rv.email if (rv.email) userid.email = rv.email;
this.store.commit("upUserDetail", userid); this.store.commit("upUserDetail", userid);
if (window.innerWidth < 768) { if (window.innerWidth < 768) {
@@ -584,13 +549,9 @@ export default defineComponent({
} else { } else {
this.turnToHomePage("/home"); this.turnToHomePage("/home");
} }
sessionStorage.setItem( sessionStorage.setItem("isTimeOne", JSON.stringify(false)); //是否需要公告 提示 弹窗
"isTimeOne",
JSON.stringify(false)
); //是否需要公告 提示 弹窗
let randomNum: any = let randomNum: any =
Math.floor(Math.random() * 9000000000000000) + Math.floor(Math.random() * 9000000000000000) + 1000000000000000;
1000000000000000;
sessionStorage.setItem("sessionId", randomNum); sessionStorage.setItem("sessionId", randomNum);
sessionStorage.setItem("record", JSON.stringify([])); sessionStorage.setItem("record", JSON.stringify([]));
} }
@@ -603,14 +564,12 @@ export default defineComponent({
password: md5(this.newPassword + "abc"), password: md5(this.newPassword + "abc"),
verifyEmail: false, verifyEmail: false,
}; };
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then( Https.axiosPost(Https.httpUrls.accountResetPwd, data).then((rv: any) => {
(rv: any) => {
if (rv) { if (rv) {
message.success("Changing the password successfully"); message.success("Changing the password successfully");
this.changeIsLogin(1); this.changeIsLogin(1);
} }
} });
);
}, },
//创建定时器 //创建定时器
@@ -656,9 +615,9 @@ export default defineComponent({
// }, // },
}, },
mounted() { mounted() {
const data = this.$route.query const data = this.$route.query;
if(data?.state == 'weiXin'){ if (data?.state == "weiXin") {
this.wechatLogin(data) this.wechatLogin(data);
} }
}, },
}); });
@@ -779,7 +738,7 @@ export default defineComponent({
font-size: 1.4rem; font-size: 1.4rem;
box-sizing: border-box; box-sizing: border-box;
outline: none; outline: none;
transition: all .3s; transition: all 0.3s;
&:hover { &:hover {
border: 0.1rem solid #000; border: 0.1rem solid #000;
} }
@@ -833,9 +792,9 @@ export default defineComponent({
font-weight: 500; font-weight: 500;
color: #ffffff; color: #ffffff;
cursor: pointer; cursor: pointer;
transition: all .3s; transition: all 0.3s;
&:hover { &:hover {
background: #3C3C3C; background: #3c3c3c;
} }
&[state="2"] { &[state="2"] {
cursor: not-allowed; cursor: not-allowed;

View File

@@ -17,12 +17,33 @@
<div class="generalModel_btn"> <div class="generalModel_btn">
<div class="generalModel_closeIcon" @click.stop="cancelDsign()"> <div class="generalModel_closeIcon" @click.stop="cancelDsign()">
<!-- <i class="fi fi-rr-cross-small"></i> --> <!-- <i class="fi fi-rr-cross-small"></i> -->
<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg
width="46"
height="46"
viewBox="0 0 46 46"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<circle cx="23" cy="23" r="23" fill="white" fill-opacity="0.3" /> <circle cx="23" cy="23" r="23" fill="white" fill-opacity="0.3" />
<rect x="32.5063" y="12" width="3" height="29" rx="1.5" transform="rotate(45 32.5063 12)" fill="white"/> <rect
<rect x="34.6274" y="32.5059" width="3" height="29" rx="1.5" transform="rotate(135 34.6274 32.5059)" fill="white"/> x="32.5063"
y="12"
width="3"
height="29"
rx="1.5"
transform="rotate(45 32.5063 12)"
fill="white"
/>
<rect
x="34.6274"
y="32.5059"
width="3"
height="29"
rx="1.5"
transform="rotate(135 34.6274 32.5059)"
fill="white"
/>
</svg> </svg>
</div> </div>
</div> </div>
<div class="login_page"> <div class="login_page">
@@ -33,7 +54,8 @@
<div class="login_type_list"> <div class="login_type_list">
<div <div
:class="[ :class="[
'login_type_item','username_login_item', 'login_type_item',
'username_login_item',
'login_active', 'login_active',
]" ]"
> >
@@ -61,40 +83,70 @@
<div v-show="passwordConditionShow" class="conditionShow"> <div v-show="passwordConditionShow" class="conditionShow">
<div class="item"> <div class="item">
<div class="icon"> <div class="icon">
<i v-show="!passwordCondition.length" class="fi fi-br-cross-small"></i> <i
<i v-show="passwordCondition.length" class="fi fi-br-check"></i> v-show="!passwordCondition.length"
class="fi fi-br-cross-small"
></i>
<i
v-show="passwordCondition.length"
class="fi fi-br-check"
></i>
</div> </div>
<div class="text">At least 8 characters long</div> <div class="text">At least 8 characters long</div>
</div> </div>
<div class="item"> <div class="item">
<div class="icon"> <div class="icon">
<i v-show="!passwordCondition.special" class="fi fi-br-cross-small"></i> <i
<i v-show="passwordCondition.special" class="fi fi-br-check"></i> v-show="!passwordCondition.special"
class="fi fi-br-cross-small"
></i>
<i
v-show="passwordCondition.special"
class="fi fi-br-check"
></i>
</div> </div>
<div class="text">Must contain special characters</div> <div class="text">Must contain special characters</div>
</div> </div>
<div class="item"> <div class="item">
<div class="icon"> <div class="icon">
<i v-show="!passwordCondition.group" class="fi fi-br-cross-small"></i> <i
<i v-show="passwordCondition.group" class="fi fi-br-check"></i> v-show="!passwordCondition.group"
class="fi fi-br-cross-small"
></i>
<i
v-show="passwordCondition.group"
class="fi fi-br-check"
></i>
</div>
<div class="text">
Mix of uppercase, lowercase and numbers
</div> </div>
<div class="text">Mix of uppercase, lowercase and numbers</div>
</div> </div>
</div> </div>
<input <input
class="login_form_input" class="login_form_input"
:class="{active:Object.values(passwordCondition).filter(value => value === true).length<3}" :class="{
active:
Object.values(passwordCondition).filter(
(value) => value === true
).length < 3,
}"
:type="passwordType" :type="passwordType"
placeholder="Enter your password" placeholder="Enter your password"
v-model="password" v-model="password"
@keydown.enter="submitPerLogin()" @keydown.enter="submitPerLogin()"
@input="passwordInput" @input="passwordInput"
@focus="()=>passwordConditionShow = true" @focus="() => (passwordConditionShow = true)"
@blur="()=>passwordConditionShow = false" @blur="() => (passwordConditionShow = false)"
/> />
<div class="icon iconfont icon-yanjing_yincang_o password_show_icon" @click="changePasswordType()"></div> <div
class="icon iconfont icon-yanjing_yincang_o password_show_icon"
@click="changePasswordType()"
></div>
</div> </div>
<span style="font-weight: 400;opacity: .7;">You must satisfy ALL password conditions to register.</span> <span style="font-weight: 400; opacity: 0.7"
>You must satisfy ALL password conditions to register.</span
>
<div class="login_form_title marign_top30">Email</div> <div class="login_form_title marign_top30">Email</div>
<input <input
class="login_form_input" class="login_form_input"
@@ -104,7 +156,10 @@
/> />
<!-- 邮箱登录 start --> <!-- 邮箱登录 start -->
<div class="login_form_email" :class="{active:emailStap===2}"> <div
class="login_form_email"
:class="{ active: emailStap === 2 }"
>
<!-- <div v-show="loginType == 'email'" class="login_form_email"> --> <!-- <div v-show="loginType == 'email'" class="login_form_email"> -->
<!-- <div v-show="emailStap === 1" class="forget_password_content"> <!-- <div v-show="emailStap === 1" class="forget_password_content">
<div class="forget_password_content_block" @click="changeLoginType('username')"> <div class="forget_password_content_block" @click="changeLoginType('username')">
@@ -131,12 +186,14 @@
</div> --> </div> -->
<div v-show="emailStap === 2" class="email_last_step"> <div v-show="emailStap === 2" class="email_last_step">
<div class="email_last_step_block"> <div class="email_last_step_block">
<span class="email_last_step_content" <span class="email_last_step_content"
>Verify with one-time verification code</span >Verify with one-time verification code</span
> >
<i class="fi fi-br-cross email_last_step_block_icon" @click="emailLastStepFun()"></i> <i
class="fi fi-br-cross email_last_step_block_icon"
@click="emailLastStepFun()"
></i>
</div> </div>
<div class="email_last_step_bottom"> <div class="email_last_step_bottom">
<div class="email_last_step_des"> <div class="email_last_step_des">
@@ -157,7 +214,8 @@
<div class="email_last_step_des"> <div class="email_last_step_des">
<div class="sent_email_content email_tip_content"> <div class="sent_email_content email_tip_content">
Please check the junk box if you haven't received verification code Please check the junk box if you haven't received
verification code
</div> </div>
</div> </div>
</div> </div>
@@ -167,24 +225,35 @@
<div class="login_form_title marign_top30"> <div class="login_form_title marign_top30">
<label :class="{ active: emailStap == 2 }"> <label :class="{ active: emailStap == 2 }">
<input :state="emailStap" type="checkbox" v-model="checked"> <input :state="emailStap" type="checkbox" v-model="checked" />
<span>I agree to all Term, Privacy Policy and Fees</span> <span>I agree to all Term, Privacy Policy and Fees</span>
</label> </label>
</div> </div>
<div class="thirdPartyLogin marign_top30"> <div class="thirdPartyLogin marign_top30">
<div class="label"> <div class="label">
<div class="mask" v-show="!checked" @click="isCheckAgreement"></div> <div
<googleLogin @googelLogin="googelLogin" text="Register with Google"></googleLogin> class="mask"
v-show="!checked"
@click="isCheckAgreement"
></div>
<googleLogin
@googelLogin="googelLogin"
text="Register with Google"
></googleLogin>
</div> </div>
<div class="label"> <div class="label">
<div class="mask" v-show="!checked" @click="isCheckAgreement"></div> <div
class="mask"
v-show="!checked"
@click="isCheckAgreement"
></div>
<weiXinLogin text="Register with wechat"></weiXinLogin> <weiXinLogin text="Register with wechat"></weiXinLogin>
</div> </div>
<!-- <phoneLogin></phoneLogin> --> <!-- <phoneLogin></phoneLogin> -->
</div> </div>
<div <div
class="login_submit_button marign_top40" class="login_submit_button marign_top40"
style="width: 100%;" style="width: 100%"
:state="emailStap" :state="emailStap"
@click="submitPerLogin()" @click="submitPerLogin()"
> >
@@ -194,10 +263,8 @@
<!-- <div class="login_text" > <!-- <div class="login_text" >
<div class="forget_password_text" @click="changeIsLogin(2)">Forgot your password</div> <div class="forget_password_text" @click="changeIsLogin(2)">Forgot your password</div>
</div> --> </div> -->
</div> </div>
<!-- 账号密码登录 end --> <!-- 账号密码登录 end -->
</div> </div>
<!-- 邮箱登录 end --> <!-- 邮箱登录 end -->
@@ -205,13 +272,14 @@
<!-- 忘记密码 start --> <!-- 忘记密码 start -->
<div class="forget_password_content" v-else> <div class="forget_password_content" v-else>
<div class="forget_password_content_block" @click="forgetPasswordLastStepFun()"> <div
class="forget_password_content_block"
@click="forgetPasswordLastStepFun()"
>
<!-- <span class="icon iconfont fi-br-arrow-left"></span <!-- <span class="icon iconfont fi-br-arrow-left"></span
> --> > -->
<i class="fi fi-br-arrow-left"></i> <i class="fi fi-br-arrow-left"></i>
<span class="forget_password_content_title" <span class="forget_password_content_title">Retrieve password</span>
>Retrieve password</span
>
</div> </div>
<div v-show="frogetPasswordStep === 1"> <div v-show="frogetPasswordStep === 1">
<div class="forget_passored_form_content"> <div class="forget_passored_form_content">
@@ -239,9 +307,7 @@
</div> </div>
<div class="tip_content"> <div class="tip_content">
<span v-show="time">{{ time }}s</span> <span v-show="time">{{ time }}s</span>
<span <span v-show="!time" @click="forgetPasswordNextStepFun()"
v-show="!time"
@click="forgetPasswordNextStepFun()"
>Resend</span >Resend</span
> >
</div> </div>
@@ -267,11 +333,9 @@
</div> </div>
</div> </div>
<!-- 忘记密码 end --> <!-- 忘记密码 end -->
</div> </div>
</div> </div>
</a-modal> </a-modal>
</template> </template>
<script lang="ts"> <script lang="ts">
@@ -287,32 +351,35 @@ import phoneLogin from "@/component/LoginPage/phoneLogin.vue";
import { useStore } from "vuex"; import { useStore } from "vuex";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import { setLang } from "@/tool/guide"; import { setLang } from "@/tool/guide";
const md5 = require("md5"); import md5 from "md5";
export default defineComponent({ export default defineComponent({
components: { components: {
VerificationCodeInput,googleLogin,weiXinLogin,phoneLogin VerificationCodeInput,
googleLogin,
weiXinLogin,
phoneLogin,
}, },
setup() { setup() {
let timer: any = 0; let timer: any = 0;
const {locale} = useI18n() const { locale } = useI18n();
const store = useStore(); const store = useStore();
let register = reactive({ let register = reactive({
registerModel: false, registerModel: false,
registerModelMask: true, registerModelMask: true,
pageWidth:'50%', pageWidth: "50%",
passwordConditionShow: false, passwordConditionShow: false,
passwordCondition: { passwordCondition: {
length: false, length: false,
special: false, special: false,
group: false, group: false,
}, },
}) });
return { return {
store, store,
timer, timer,
...toRefs(register), ...toRefs(register),
locale locale,
} };
}, },
data() { data() {
return { return {
@@ -332,22 +399,21 @@ export default defineComponent({
newPassword: "", //新密码 newPassword: "", //新密码
isCheckRobot: false, isCheckRobot: false,
time: 60, //60秒倒计时 time: 60, //60秒倒计时
passwordType:'password', passwordType: "password",
userId:'', userId: "",
loginTime:true loginTime: true,
}; };
}, },
mounted() { mounted() {
const data = this.$route.query const data = this.$route.query;
if(data?.state == 'weiXin'){ if (data?.state == "weiXin") {
this.wechatLogin(data) this.wechatLogin(data);
} }
}, },
methods: { methods: {
init() { init() {
this.registerModel = true this.registerModel = true;
this.emailLastStepFun() this.emailLastStepFun();
}, },
changeLoginType(type: string) { changeLoginType(type: string) {
this.loginType = type; this.loginType = type;
@@ -380,27 +446,24 @@ export default defineComponent({
operationType: "LOGIN", operationType: "LOGIN",
}; };
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then( Https.axiosPost(Https.httpUrls.accountSendEmail, data).then((rv: any) => {
(rv: any) => {
if (rv) { if (rv) {
this.emailStap = 2; this.emailStap = 2;
this.time = 60; this.time = 60;
this.emailCode = ["", "", "", "", "", ""] this.emailCode = ["", "", "", "", "", ""];
this.createTimer(); this.createTimer();
} }
} });
);
}, },
//邮箱登录的上一步 //邮箱登录的上一步
emailLastStepFun() { emailLastStepFun() {
this.emailStap = 1; this.emailStap = 1;
this.username = "", (this.username = ""), (this.password = ""), (this.email = "");
this.password = "", (this.checked = false),
this.email = ""; (this.loginType = "username"),
this.checked=false, (this.emailCode = ["", "", "", "", "", ""]),
this.loginType = "username", this.clearTimer();
(this.emailCode = ["", "", "", "", "", ""]), this.clearTimer();
}, },
//忘记密码的下一步 //忘记密码的下一步
@@ -413,15 +476,12 @@ export default defineComponent({
email: this.forgetPasswordEmail, email: this.forgetPasswordEmail,
operationType: "FORGET_PWD", operationType: "FORGET_PWD",
}; };
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then( Https.axiosPost(Https.httpUrls.accountSendEmail, data).then((rv: any) => {
(rv: any) => {
if (rv) { if (rv) {
this.frogetPasswordStep = 2; this.frogetPasswordStep = 2;
(this.forgetEmailCode = ["", "", "", "", "", ""]), (this.forgetEmailCode = ["", "", "", "", "", ""]), this.createTimer();
this.createTimer();
} }
} });
);
}, },
//忘记密码的上一步 //忘记密码的上一步
forgetPasswordLastStepFun() { forgetPasswordLastStepFun() {
@@ -430,35 +490,37 @@ export default defineComponent({
} else { } else {
this.frogetPasswordStep = this.frogetPasswordStep - 1; this.frogetPasswordStep = this.frogetPasswordStep - 1;
this.forgetPasswordEmail = ""; this.forgetPasswordEmail = "";
(this.forgetEmailCode = ["", "", "", "", "", ""]), (this.forgetEmailCode = ["", "", "", "", "", ""]), this.clearTimer();
this.clearTimer();
} }
}, },
//改变勾选是否是机器人 //改变勾选是否是机器人
checkRobot() { checkRobot() {
this.isCheckRobot = !this.isCheckRobot; this.isCheckRobot = !this.isCheckRobot;
}, },
passwordInput() { passwordInput() {
this.isPassword(this.password) this.isPassword(this.password);
}, },
isPassword(password: any) { isPassword(password: any) {
this.passwordCondition.length = /.{8,}/.test(password) this.passwordCondition.length = /.{8,}/.test(password);
this.passwordCondition.special = /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(password) this.passwordCondition.special =
this.passwordCondition.group = /[a-z]/.test(password) && /[A-Z]/.test(password) && /\d/.test(password) /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(password);
return Object.values(this.passwordCondition).filter(value => value === true).length; this.passwordCondition.group =
/[a-z]/.test(password) && /[A-Z]/.test(password) && /\d/.test(password);
return Object.values(this.passwordCondition).filter(
(value) => value === true
).length;
}, },
//提交账号密码预先登录 //提交账号密码预先登录
submitPerLogin() { submitPerLogin() {
//输入账号密码 //输入账号密码
if (this.emailStap >= 2) { if (this.emailStap >= 2) {
return; return;
} else { } else {
if (/aida/i.test(this.username)) { if (/aida/i.test(this.username)) {
message.info('The name cannot contain "AiDA" or any combination of its uppercase and lowercase forms.'); message.info(
'The name cannot contain "AiDA" or any combination of its uppercase and lowercase forms.'
);
return; return;
} }
if (!this.username || !this.password) { if (!this.username || !this.password) {
@@ -482,79 +544,77 @@ export default defineComponent({
} }
if (this.isPassword(this.password) < 3) { if (this.isPassword(this.password) < 3) {
message.info("You must satisfy ALL password conditions to register."); message.info("You must satisfy ALL password conditions to register.");
return return;
} }
let data = { let data = {
userPassword: md5(this.password + "abc"), userPassword: md5(this.password + "abc"),
userName: this.username, userName: this.username,
userEmail: this.email, userEmail: this.email,
"browserIdentifiers": "", browserIdentifiers: "",
"country": "", country: "",
"createDate": "", createDate: "",
"credits": 0, credits: 0,
"id": 0, id: 0,
"isBeginner": 0, isBeginner: 0,
"isTrial": 0, isTrial: 0,
"language": "", language: "",
"systemUser": 0, systemUser: 0,
"updateDate": "", updateDate: "",
"validEndTime": 0, validEndTime: 0,
"validStartTime": 0 validStartTime: 0,
}; };
// this.loginType = 'email' // this.loginType = 'email'
if (this.loginTime) { if (this.loginTime) {
this.loginTime = false this.loginTime = false;
Https.axiosPost(Https.httpUrls.designWorksRegister, data).then( Https.axiosPost(Https.httpUrls.designWorksRegister, data)
(rv: any) => { .then((rv: any) => {
// if (rv) { // if (rv) {
// this.loginType = 'email' // this.loginType = 'email'
// } // }
this.emailStap = 2; this.emailStap = 2;
if (rv) { if (rv) {
this.userId = rv.userId this.userId = rv.userId;
this.loginType = 'email' this.loginType = "email";
this.time = 60; this.time = 60;
this.emailCode = ["", "", "", "", "", ""] this.emailCode = ["", "", "", "", "", ""];
this.createTimer(); this.createTimer();
} }
} })
).catch(res=>{ .catch((res) => {
this.emailStap = 1; this.emailStap = 1;
}); });
setTimeout(() => { setTimeout(() => {
this.loginTime = true this.loginTime = true;
}, 2000); }, 2000);
} }
} }
}, },
isCheckAgreement() { isCheckAgreement() {
message.info( message.info("Agree to all terms, privacy fees and policies");
"Agree to all terms, privacy fees and policies"
);
}, },
changePasswordType() { changePasswordType() {
this.passwordType = this.passwordType === 'password' ? 'text' : 'password' this.passwordType =
this.passwordType === "password" ? "text" : "password";
}, },
//微信登录 //微信登录
wechatLogin(value: any) { wechatLogin(value: any) {
let data = { let data = {
code: value.code, code: value.code,
type:1 type: 1,
} };
Https.axiosGet(Https.httpUrls.parseWeChatCode, { params: data }) Https.axiosGet(Https.httpUrls.parseWeChatCode, { params: data })
.then((rv: any) => { .then((rv: any) => {
this.setSuccessLogin(rv) this.setSuccessLogin(rv);
}) })
.catch((res) => {}); .catch((res) => {});
}, },
//谷歌登录 //谷歌登录
googelLogin(value: any) { googelLogin(value: any) {
let data = {credential : value,type:1} let data = { credential: value, type: 1 };
Https.axiosGet(Https.httpUrls.parseGoogleCredential, { params: data }) Https.axiosGet(Https.httpUrls.parseGoogleCredential, { params: data })
.then((rv: any) => { .then((rv: any) => {
this.setSuccessLogin(rv) this.setSuccessLogin(rv);
}) })
.catch((res) => {}); .catch((res) => {});
}, },
@@ -574,9 +634,9 @@ export default defineComponent({
setCookie("userInfo", JSON.stringify(rv)); setCookie("userInfo", JSON.stringify(rv));
let userid: any = { let userid: any = {
ueserId: rv.userId, ueserId: rv.userId,
systemUser:rv.systemUser systemUser: rv.systemUser,
} };
if(rv.email)userid.email = rv.email if (rv.email) userid.email = rv.email;
this.store.commit("upUserDetail", userid); this.store.commit("upUserDetail", userid);
if (window.innerWidth < 768) { if (window.innerWidth < 768) {
@@ -587,36 +647,31 @@ export default defineComponent({
} else { } else {
this.turnToHomePage("/home"); this.turnToHomePage("/home");
} }
sessionStorage.setItem( sessionStorage.setItem("isTimeOne", JSON.stringify(false)); //是否需要公告 提示 弹窗
"isTimeOne",
JSON.stringify(false)
); //是否需要公告 提示 弹窗
let randomNum: any = let randomNum: any =
Math.floor(Math.random() * 9000000000000000) + Math.floor(Math.random() * 9000000000000000) + 1000000000000000;
1000000000000000;
sessionStorage.setItem("sessionId", randomNum); sessionStorage.setItem("sessionId", randomNum);
sessionStorage.setItem("record", JSON.stringify([])); sessionStorage.setItem("record", JSON.stringify([]));
} }
}, },
//邮箱登录提交 //邮箱登录提交
submitEmailLogin(emailVerifyCode: any) { submitEmailLogin(emailVerifyCode: any) {
let affiliateRef = sessionStorage.getItem('affiliateRef'); let affiliateRef = sessionStorage.getItem("affiliateRef");
let data = { let data = {
email: this.email, email: this.email,
emailVerifyCode: emailVerifyCode, emailVerifyCode: emailVerifyCode,
loginType: "EMAIL", loginType: "EMAIL",
userId: this.userId, userId: this.userId,
"userEmail": this.email, userEmail: this.email,
"userName": this.username, userName: this.username,
"userPassword": md5(this.password + "abc"), userPassword: md5(this.password + "abc"),
invitationCode:affiliateRef?affiliateRef:'', invitationCode: affiliateRef ? affiliateRef : "",
}; };
Https.axiosPost(Https.httpUrls.designWorksRegisterCode, data).then( Https.axiosPost(Https.httpUrls.designWorksRegisterCode, data)
(rv: any) => { .then((rv: any) => {
this.setSuccessLogin(rv) this.setSuccessLogin(rv);
} })
).catch(res=>{ .catch((res) => {});
});
}, },
//修改密码提交 //修改密码提交
@@ -627,14 +682,12 @@ export default defineComponent({
password: md5(this.newPassword + "abc"), password: md5(this.newPassword + "abc"),
verifyEmail: false, verifyEmail: false,
}; };
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then( Https.axiosPost(Https.httpUrls.accountResetPwd, data).then((rv: any) => {
(rv: any) => {
if (rv) { if (rv) {
message.success("Changing the password successfully"); message.success("Changing the password successfully");
this.changeIsLogin(1); this.changeIsLogin(1);
} }
} });
);
}, },
//创建定时器 //创建定时器
@@ -657,7 +710,7 @@ export default defineComponent({
//跳转到首页 //跳转到首页
turnToHomePage(str: any) { turnToHomePage(str: any) {
this.getLang() this.getLang();
// this.$router.push("/home"); // this.$router.push("/home");
// console.log(window.location.search.substring(1)); // console.log(window.location.search.substring(1));
this.store.commit("clearAllData"); this.store.commit("clearAllData");
@@ -668,22 +721,20 @@ export default defineComponent({
}, },
//获取当前语言 //获取当前语言
getLang() { getLang() {
let data ={} let data = {};
Https.axiosPost(Https.httpUrls.getUserLanguage, data).then( Https.axiosPost(Https.httpUrls.getUserLanguage, data).then((rv: any) => {
(rv: any) => {
if (rv) { if (rv) {
this.locale = rv this.locale = rv;
setLang(rv) setLang(rv);
} }
} });
);
}, },
turnToWindow(url: any) { turnToWindow(url: any) {
window.open(url); window.open(url);
}, },
cancelDsign() { cancelDsign() {
this.registerModel = false this.registerModel = false;
} },
}, },
}); });
</script> </script>
@@ -719,7 +770,7 @@ export default defineComponent({
// transform: translate(-50%,-50%); // transform: translate(-50%,-50%);
// width: 60rem; // width: 60rem;
// width: 80%; // width: 80%;
background: #FFFFFF; background: #ffffff;
// box-shadow: -0.3rem 2rem 5.9rem 0px rgba(200,200,200,0.3); // box-shadow: -0.3rem 2rem 5.9rem 0px rgba(200,200,200,0.3);
padding: 2rem 6rem 2rem; padding: 2rem 6rem 2rem;
box-sizing: border-box; box-sizing: border-box;
@@ -739,7 +790,7 @@ export default defineComponent({
top: 0; top: 0;
background: #fff; background: #fff;
transform: scale(0); transform: scale(0);
transition: .3s all; transition: 0.3s all;
border: 2px solid; border: 2px solid;
border-radius: 20px; border-radius: 20px;
.email_last_step { .email_last_step {
@@ -762,7 +813,7 @@ export default defineComponent({
text-align: center; text-align: center;
font-size: 3.6rem; font-size: 3.6rem;
font-weight: bold; font-weight: bold;
color: #D7D7D7; color: #d7d7d7;
cursor: pointer; cursor: pointer;
height: 4rem; height: 4rem;
line-height: 4rem; line-height: 4rem;
@@ -824,14 +875,14 @@ export default defineComponent({
left: auto; left: auto;
transform: translateY(-5rem); transform: translateY(-5rem);
background: #404040; background: #404040;
color: #FFF; color: #fff;
font-size: 1.4rem; font-size: 1.4rem;
padding: 2rem; padding: 2rem;
border-radius: 2rem; border-radius: 2rem;
> .item { > .item {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: .5rem; margin-bottom: 0.5rem;
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
@@ -859,7 +910,7 @@ export default defineComponent({
font-size: 1.4rem; font-size: 1.4rem;
box-sizing: border-box; box-sizing: border-box;
outline: none; outline: none;
transition: all .3s; transition: all 0.3s;
&:hover { &:hover {
border: 0.1rem solid #000; border: 0.1rem solid #000;
} }
@@ -904,8 +955,6 @@ export default defineComponent({
transform: translateY(1rem); transform: translateY(1rem);
display: inline-block; display: inline-block;
} }
} }
.login_submit_button { .login_submit_button {
@@ -918,9 +967,9 @@ export default defineComponent({
font-weight: 500; font-weight: 500;
color: #ffffff; color: #ffffff;
cursor: pointer; cursor: pointer;
transition: all .3s; transition: all 0.3s;
&:hover { &:hover {
background: #3C3C3C; background: #3c3c3c;
} }
&[state="2"] { &[state="2"] {
cursor: not-allowed; cursor: not-allowed;
@@ -945,7 +994,7 @@ export default defineComponent({
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
width: 60rem; width: 60rem;
background: #FFFFFF; background: #ffffff;
box-shadow: -0.3rem 2rem 5.9rem 0px rgba(200, 200, 200, 0.3); box-shadow: -0.3rem 2rem 5.9rem 0px rgba(200, 200, 200, 0.3);
border-radius: 1rem; border-radius: 1rem;
padding: 3rem 6rem 6.5rem; padding: 3rem 6rem 6.5rem;
@@ -985,7 +1034,7 @@ export default defineComponent({
width: 100%; width: 100%;
height: 5rem; height: 5rem;
margin-top: 1rem; margin-top: 1rem;
border: 0.1rem solid #DFDFDF; border: 0.1rem solid #dfdfdf;
border-radius: 2.5rem; border-radius: 2.5rem;
padding-left: 2.1rem; padding-left: 2.1rem;
line-height: 5rem; line-height: 5rem;
@@ -1020,7 +1069,6 @@ export default defineComponent({
} }
} }
.marign_top20 { .marign_top20 {
margin-top: 2rem; margin-top: 2rem;
} }
@@ -1078,5 +1126,4 @@ export default defineComponent({
} }
} }
} }
</style> </style>