Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -8,13 +8,13 @@
|
||||
<!-- v-show="loginType == 'username'" -->
|
||||
<div>
|
||||
<div class="login_form_content" :state="emailStap">
|
||||
|
||||
<div v-show="emailStap === 1">
|
||||
<div class="login_form_title marign_top30">
|
||||
Enterprise
|
||||
</div>
|
||||
<div class="login_form_title marign_top30">Enterprise</div>
|
||||
<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
|
||||
placeholder="Select a school"
|
||||
v-model:value="selectEnterprise"
|
||||
@@ -36,9 +36,7 @@
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="login_form_title marign_top30">
|
||||
Email
|
||||
</div>
|
||||
<div class="login_form_title marign_top30">Email</div>
|
||||
<input
|
||||
class="login_form_input"
|
||||
placeholder="Enter your email address"
|
||||
@@ -63,21 +61,16 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 邮箱登录 start -->
|
||||
<div
|
||||
v-show="emailStap === 2"
|
||||
class="login_form_email"
|
||||
:class="{ active: emailStap === 2 }"
|
||||
>
|
||||
<div
|
||||
v-show="emailStap === 2"
|
||||
class="email_last_step"
|
||||
>
|
||||
<div v-show="emailStap === 2" class="email_last_step">
|
||||
<div class="email_last_step_block">
|
||||
<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"
|
||||
@@ -86,34 +79,23 @@
|
||||
</div>
|
||||
<div class="email_last_step_bottom">
|
||||
<div class="email_last_step_des">
|
||||
<div class="sent_email_content">
|
||||
Sent to {{ email }}
|
||||
</div>
|
||||
<div class="sent_email_content">Sent to {{ email }}</div>
|
||||
<div class="tip_content">
|
||||
<span v-show="time"
|
||||
>{{ time }}s</span
|
||||
>
|
||||
<span
|
||||
v-show="!time"
|
||||
@click="emailNextStepFun()"
|
||||
<span v-show="time">{{ time }}s</span>
|
||||
<span v-show="!time" @click="emailNextStepFun()"
|
||||
>Resend</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<VerificationCodeInput
|
||||
:ct="emailCode"
|
||||
@sendCaptcha="
|
||||
submitEmailLogin($event)
|
||||
"
|
||||
@sendCaptcha="submitEmailLogin($event)"
|
||||
></VerificationCodeInput>
|
||||
|
||||
<div class="email_last_step_des">
|
||||
<div
|
||||
class="sent_email_content email_tip_content"
|
||||
>
|
||||
Please check the junk box if you
|
||||
haven't received verification
|
||||
code
|
||||
<div class="sent_email_content email_tip_content">
|
||||
Please check the junk box if you haven't received
|
||||
verification code
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -123,15 +105,8 @@
|
||||
|
||||
<div class="login_form_title marign_top30">
|
||||
<label :class="{ active: emailStap == 2 }">
|
||||
<input
|
||||
:state="emailStap"
|
||||
type="checkbox"
|
||||
v-model="checked"
|
||||
/>
|
||||
<span
|
||||
>I agree to all Term, Privacy Policy and
|
||||
Fees</span
|
||||
>
|
||||
<input :state="emailStap" type="checkbox" v-model="checked" />
|
||||
<span>I agree to all Term, Privacy Policy and Fees</span>
|
||||
</label>
|
||||
</div>
|
||||
<!-- <div class="thirdPartyLogin marign_top30">
|
||||
@@ -165,7 +140,6 @@
|
||||
</div>
|
||||
|
||||
<!-- 邮箱登录 end -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 忘记密码 start -->
|
||||
@@ -175,9 +149,7 @@
|
||||
@click="forgetPasswordLastStepFun()"
|
||||
>
|
||||
<i class="fi fi-br-arrow-left"></i>
|
||||
<span class="forget_password_content_title"
|
||||
>Retrieve password</span
|
||||
>
|
||||
<span class="forget_password_content_title">Retrieve password</span>
|
||||
</div>
|
||||
<div v-show="frogetPasswordStep === 1">
|
||||
<div class="forget_passored_form_content">
|
||||
@@ -205,9 +177,7 @@
|
||||
</div>
|
||||
<div class="tip_content">
|
||||
<span v-show="time">{{ time }}s</span>
|
||||
<span
|
||||
v-show="!time"
|
||||
@click="forgetPasswordNextStepFun()"
|
||||
<span v-show="!time" @click="forgetPasswordNextStepFun()"
|
||||
>Resend</span
|
||||
>
|
||||
</div>
|
||||
@@ -257,42 +227,47 @@ import phoneLogin from "@/component/LoginPage/phoneLogin.vue";
|
||||
import { useStore } from "vuex";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { setLang } from "@/tool/guide";
|
||||
const md5 = require("md5");
|
||||
import md5 from "md5";
|
||||
export default defineComponent({
|
||||
components: {
|
||||
VerificationCodeInput,googleLogin,weiXinLogin,phoneLogin
|
||||
VerificationCodeInput,
|
||||
googleLogin,
|
||||
weiXinLogin,
|
||||
phoneLogin,
|
||||
},
|
||||
setup() {
|
||||
let timer: any = 0;
|
||||
const { locale } = useI18n();
|
||||
const store = useStore();
|
||||
let loadingShow = ref(false)
|
||||
let loadingShow = ref(false);
|
||||
const data = reactive({
|
||||
selectEnterprise:'',
|
||||
selectEnterprise: "",
|
||||
schoolList: [] as any,
|
||||
})
|
||||
const schoolListChange = (e:any)=>{
|
||||
}
|
||||
});
|
||||
const schoolListChange = (e: any) => {};
|
||||
const filterOption = (e: any) => {
|
||||
let params = {
|
||||
name: e,
|
||||
type:'Enterprise'
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.organizationNameSearch,{},{params:params}).then((rv:any)=>{
|
||||
type: "Enterprise",
|
||||
};
|
||||
Https.axiosPost(
|
||||
Https.httpUrls.organizationNameSearch,
|
||||
{},
|
||||
{ params: params }
|
||||
).then((rv: any) => {
|
||||
data.schoolList = rv.map((item: any) => {
|
||||
return {
|
||||
label: item,
|
||||
value: item,
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
};
|
||||
const handleFocus = () => {
|
||||
if (data.schoolList.length == 0) {
|
||||
filterOption('')
|
||||
}
|
||||
filterOption("");
|
||||
}
|
||||
};
|
||||
return {
|
||||
...toRefs(data),
|
||||
store,
|
||||
@@ -300,7 +275,8 @@ export default defineComponent({
|
||||
locale,
|
||||
loadingShow,
|
||||
schoolListChange,
|
||||
filterOption,handleFocus
|
||||
filterOption,
|
||||
handleFocus,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
@@ -312,8 +288,8 @@ export default defineComponent({
|
||||
emailCode: ["", "", "", "", "", ""], //邮箱验证码
|
||||
emailNextStep: true,
|
||||
username: "",
|
||||
password: localStorage.getItem("loginPassword") || '',
|
||||
email: localStorage.getItem("loginEmail") || '', //邮箱登录邮箱
|
||||
password: localStorage.getItem("loginPassword") || "",
|
||||
email: localStorage.getItem("loginEmail") || "", //邮箱登录邮箱
|
||||
frogetPasswordStep: 1, //忘记密码的步骤
|
||||
forgetPasswordEmail: "",
|
||||
forgetEmailCode: ["", "", "", "", "", ""], //忘记密码的邮箱验证码
|
||||
@@ -358,16 +334,14 @@ export default defineComponent({
|
||||
email: this.email,
|
||||
operationType: "LOGIN",
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then(
|
||||
(rv: any) => {
|
||||
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then((rv: any) => {
|
||||
if (rv) {
|
||||
this.emailStap = 2;
|
||||
this.time = 60;
|
||||
this.emailCode = ["", "", "", "", "", ""];
|
||||
this.createTimer();
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
//邮箱登录的上一步
|
||||
@@ -390,15 +364,12 @@ export default defineComponent({
|
||||
email: this.forgetPasswordEmail,
|
||||
operationType: "FORGET_PWD",
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then(
|
||||
(rv: any) => {
|
||||
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then((rv: any) => {
|
||||
if (rv) {
|
||||
this.frogetPasswordStep = 2;
|
||||
(this.forgetEmailCode = ["", "", "", "", "", ""]),
|
||||
this.createTimer();
|
||||
(this.forgetEmailCode = ["", "", "", "", "", ""]), this.createTimer();
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
//忘记密码的上一步
|
||||
forgetPasswordLastStepFun() {
|
||||
@@ -407,8 +378,7 @@ export default defineComponent({
|
||||
} else {
|
||||
this.frogetPasswordStep = this.frogetPasswordStep - 1;
|
||||
this.forgetPasswordEmail = "";
|
||||
(this.forgetEmailCode = ["", "", "", "", "", ""]),
|
||||
this.clearTimer();
|
||||
(this.forgetEmailCode = ["", "", "", "", "", ""]), this.clearTimer();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -421,15 +391,13 @@ export default defineComponent({
|
||||
password: "",
|
||||
verifyEmail: true,
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then(
|
||||
(rv: any) => {
|
||||
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then((rv: any) => {
|
||||
if (rv) {
|
||||
this.forgetEmailValue = emailVerifyCode;
|
||||
this.frogetPasswordStep = 3;
|
||||
this.clearTimer();
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
//改变勾选是否是机器人
|
||||
@@ -444,9 +412,7 @@ export default defineComponent({
|
||||
return;
|
||||
} else {
|
||||
if (!this.password) {
|
||||
message.info(
|
||||
"Please enter your account number or password"
|
||||
);
|
||||
message.info("Please enter your account number or password");
|
||||
return;
|
||||
}
|
||||
//输入邮箱
|
||||
@@ -465,14 +431,12 @@ export default defineComponent({
|
||||
}
|
||||
//判断是否同意隐私政策
|
||||
if (!this.checked) {
|
||||
message.info(
|
||||
"Agree to all terms, privacy fees and policies"
|
||||
);
|
||||
message.info("Agree to all terms, privacy fees and policies");
|
||||
return;
|
||||
}
|
||||
let data = {
|
||||
password: md5(this.password + "abc"),
|
||||
userName: 'a',
|
||||
userName: "a",
|
||||
// userName: this.username,
|
||||
organizationName: this.selectEnterprise,
|
||||
email: this.email,
|
||||
@@ -484,7 +448,7 @@ export default defineComponent({
|
||||
Https.axiosPost(Https.httpUrls.enterpriseLogin, data)
|
||||
.then((rv: any) => {
|
||||
if (rv) {
|
||||
this.clearTimer()
|
||||
this.clearTimer();
|
||||
this.time = 60;
|
||||
this.emailStap = 2;
|
||||
this.emailCode = ["", "", "", "", "", ""];
|
||||
@@ -495,8 +459,7 @@ export default defineComponent({
|
||||
localStorage.setItem("loginPassword", this.password);
|
||||
}
|
||||
})
|
||||
.catch((res) => {
|
||||
});
|
||||
.catch((res) => {});
|
||||
setTimeout(() => {
|
||||
this.loginTime = true;
|
||||
}, 2000);
|
||||
@@ -516,39 +479,39 @@ export default defineComponent({
|
||||
emailVerifyCode: emailVerifyCode,
|
||||
loginType: "EMAIL",
|
||||
userId: this.userId,
|
||||
organizationName:this.selectEnterprise
|
||||
organizationName: this.selectEnterprise,
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.accountLogin, data)
|
||||
.then((rv: any) => {
|
||||
this.setSuccessLogin(rv)
|
||||
this.setSuccessLogin(rv);
|
||||
})
|
||||
.catch((res) => {});
|
||||
},
|
||||
isCheckAgreement() {
|
||||
message.info(
|
||||
"Agree to all terms, privacy fees and policies"
|
||||
);
|
||||
message.info("Agree to all terms, privacy fees and policies");
|
||||
},
|
||||
//微信登录
|
||||
wechatLogin(value: any) {
|
||||
let data = {
|
||||
code: value.code,
|
||||
type:2
|
||||
}
|
||||
this.loadingShow = true
|
||||
type: 2,
|
||||
};
|
||||
this.loadingShow = true;
|
||||
Https.axiosGet(Https.httpUrls.parseWeChatCode, { params: data })
|
||||
.then((rv: any) => {
|
||||
this.loadingShow = false
|
||||
this.setSuccessLogin(rv)
|
||||
this.loadingShow = false;
|
||||
this.setSuccessLogin(rv);
|
||||
})
|
||||
.catch((res) => {this.loadingShow = false});
|
||||
.catch((res) => {
|
||||
this.loadingShow = false;
|
||||
});
|
||||
},
|
||||
//谷歌登录
|
||||
googelLogin(value: any) {
|
||||
let data = {credential : value,type:2}
|
||||
let data = { credential: value, type: 2 };
|
||||
Https.axiosGet(Https.httpUrls.parseGoogleCredential, { params: data })
|
||||
.then((rv: any) => {
|
||||
this.setSuccessLogin(rv)
|
||||
this.setSuccessLogin(rv);
|
||||
})
|
||||
.catch((res) => {});
|
||||
},
|
||||
@@ -571,8 +534,8 @@ export default defineComponent({
|
||||
let userid: any = {
|
||||
ueserId: rv.userId,
|
||||
systemUser: rv.systemUser,
|
||||
}
|
||||
if(rv.email)userid.email = rv.email
|
||||
};
|
||||
if (rv.email) userid.email = rv.email;
|
||||
this.store.commit("upUserDetail", userid);
|
||||
|
||||
if (window.innerWidth < 768) {
|
||||
@@ -583,13 +546,9 @@ export default defineComponent({
|
||||
} else {
|
||||
this.turnToHomePage("/home");
|
||||
}
|
||||
sessionStorage.setItem(
|
||||
"isTimeOne",
|
||||
JSON.stringify(false)
|
||||
); //是否需要公告 提示 弹窗
|
||||
sessionStorage.setItem("isTimeOne", JSON.stringify(false)); //是否需要公告 提示 弹窗
|
||||
let randomNum: any =
|
||||
Math.floor(Math.random() * 9000000000000000) +
|
||||
1000000000000000;
|
||||
Math.floor(Math.random() * 9000000000000000) + 1000000000000000;
|
||||
sessionStorage.setItem("sessionId", randomNum);
|
||||
sessionStorage.setItem("record", JSON.stringify([]));
|
||||
}
|
||||
@@ -602,14 +561,12 @@ export default defineComponent({
|
||||
password: md5(this.newPassword + "abc"),
|
||||
verifyEmail: false,
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then(
|
||||
(rv: any) => {
|
||||
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then((rv: any) => {
|
||||
if (rv) {
|
||||
message.success("Changing the password successfully");
|
||||
this.changeIsLogin(1);
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
//创建定时器
|
||||
@@ -655,9 +612,9 @@ export default defineComponent({
|
||||
// },
|
||||
},
|
||||
mounted() {
|
||||
const data = this.$route.query
|
||||
if(data?.state == 'weiXin'){
|
||||
this.wechatLogin(data)
|
||||
const data = this.$route.query;
|
||||
if (data?.state == "weiXin") {
|
||||
this.wechatLogin(data);
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -778,7 +735,7 @@ export default defineComponent({
|
||||
font-size: 1.4rem;
|
||||
box-sizing: border-box;
|
||||
outline: none;
|
||||
transition: all .3s;
|
||||
transition: all 0.3s;
|
||||
&:hover {
|
||||
border: 0.1rem solid #000;
|
||||
}
|
||||
@@ -832,9 +789,9 @@ export default defineComponent({
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
cursor: pointer;
|
||||
transition: all .3s;
|
||||
transition: all 0.3s;
|
||||
&:hover {
|
||||
background: #3C3C3C;
|
||||
background: #3c3c3c;
|
||||
}
|
||||
&[state="2"] {
|
||||
cursor: not-allowed;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
<!-- 账号密码和邮箱登录 start-->
|
||||
<div class="login_content" v-if="isLogin === 1">
|
||||
<div class="login_content_left">
|
||||
|
||||
<!-- v-show="loginType == 'username'" -->
|
||||
<div>
|
||||
<div class="login_form_content" :state="emailStap">
|
||||
@@ -15,9 +14,7 @@
|
||||
v-model="username"
|
||||
/> -->
|
||||
<div v-show="emailStap === 1">
|
||||
<div class="login_form_title marign_top30">
|
||||
Email
|
||||
</div>
|
||||
<div class="login_form_title marign_top30">Email</div>
|
||||
<input
|
||||
class="login_form_input"
|
||||
placeholder="Enter your email address"
|
||||
@@ -42,21 +39,16 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 邮箱登录 start -->
|
||||
<div
|
||||
v-show="emailStap === 2"
|
||||
class="login_form_email"
|
||||
:class="{ active: emailStap === 2 }"
|
||||
>
|
||||
<div
|
||||
v-show="emailStap === 2"
|
||||
class="email_last_step"
|
||||
>
|
||||
<div v-show="emailStap === 2" class="email_last_step">
|
||||
<div class="email_last_step_block">
|
||||
<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"
|
||||
@@ -65,34 +57,23 @@
|
||||
</div>
|
||||
<div class="email_last_step_bottom">
|
||||
<div class="email_last_step_des">
|
||||
<div class="sent_email_content">
|
||||
Sent to {{ email }}
|
||||
</div>
|
||||
<div class="sent_email_content">Sent to {{ email }}</div>
|
||||
<div class="tip_content">
|
||||
<span v-show="time"
|
||||
>{{ time }}s</span
|
||||
>
|
||||
<span
|
||||
v-show="!time"
|
||||
@click="emailNextStepFun()"
|
||||
<span v-show="time">{{ time }}s</span>
|
||||
<span v-show="!time" @click="emailNextStepFun()"
|
||||
>Resend</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<VerificationCodeInput
|
||||
:ct="emailCode"
|
||||
@sendCaptcha="
|
||||
submitEmailLogin($event)
|
||||
"
|
||||
@sendCaptcha="submitEmailLogin($event)"
|
||||
></VerificationCodeInput>
|
||||
|
||||
<div class="email_last_step_des">
|
||||
<div
|
||||
class="sent_email_content email_tip_content"
|
||||
>
|
||||
Please check the junk box if you
|
||||
haven't received verification
|
||||
code
|
||||
<div class="sent_email_content email_tip_content">
|
||||
Please check the junk box if you haven't received
|
||||
verification code
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -102,24 +83,25 @@
|
||||
|
||||
<div class="login_form_title marign_top30">
|
||||
<label :class="{ active: emailStap == 2 }">
|
||||
<input
|
||||
:state="emailStap"
|
||||
type="checkbox"
|
||||
v-model="checked"
|
||||
/>
|
||||
<span
|
||||
>I agree to all Term, Privacy Policy and
|
||||
Fees</span
|
||||
>
|
||||
<input :state="emailStap" type="checkbox" v-model="checked" />
|
||||
<span>I agree to all Term, Privacy Policy and Fees</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="thirdPartyLogin marign_top30">
|
||||
<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>
|
||||
</div>
|
||||
<div class="label">
|
||||
<div class="mask" v-show="!checked" @click="isCheckAgreement"></div>
|
||||
<div
|
||||
class="mask"
|
||||
v-show="!checked"
|
||||
@click="isCheckAgreement"
|
||||
></div>
|
||||
<weiXinLogin></weiXinLogin>
|
||||
</div>
|
||||
<!-- <phoneLogin></phoneLogin> -->
|
||||
@@ -133,10 +115,7 @@
|
||||
</div>
|
||||
|
||||
<div class="login_text">
|
||||
<div
|
||||
class="forget_password_text"
|
||||
@click="changeIsLogin(2)"
|
||||
>
|
||||
<div class="forget_password_text" @click="changeIsLogin(2)">
|
||||
Forgot your password
|
||||
</div>
|
||||
</div>
|
||||
@@ -156,9 +135,7 @@
|
||||
<!-- <span class="icon iconfont fi-br-arrow-left"></span
|
||||
> -->
|
||||
<i class="fi fi-br-arrow-left"></i>
|
||||
<span class="forget_password_content_title"
|
||||
>Retrieve password</span
|
||||
>
|
||||
<span class="forget_password_content_title">Retrieve password</span>
|
||||
</div>
|
||||
<div v-show="frogetPasswordStep === 1">
|
||||
<div class="forget_passored_form_content">
|
||||
@@ -186,9 +163,7 @@
|
||||
</div>
|
||||
<div class="tip_content">
|
||||
<span v-show="time">{{ time }}s</span>
|
||||
<span
|
||||
v-show="!time"
|
||||
@click="forgetPasswordNextStepFun()"
|
||||
<span v-show="!time" @click="forgetPasswordNextStepFun()"
|
||||
>Resend</span
|
||||
>
|
||||
</div>
|
||||
@@ -220,8 +195,6 @@
|
||||
<!-- 忘记密码 end -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- <div class="login_footer">
|
||||
<div class="login_footer_item">
|
||||
<div class="login_footer_item_text">
|
||||
@@ -271,16 +244,19 @@ import phoneLogin from "@/component/LoginPage/phoneLogin.vue";
|
||||
import { useStore } from "vuex";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { setLang } from "@/tool/guide";
|
||||
const md5 = require("md5");
|
||||
import md5 from "md5";
|
||||
export default defineComponent({
|
||||
components: {
|
||||
VerificationCodeInput,googleLogin,weiXinLogin,phoneLogin
|
||||
VerificationCodeInput,
|
||||
googleLogin,
|
||||
weiXinLogin,
|
||||
phoneLogin,
|
||||
},
|
||||
setup() {
|
||||
let timer: any = 0;
|
||||
const { locale } = useI18n();
|
||||
const store = useStore();
|
||||
let loadingShow = ref(false)
|
||||
let loadingShow = ref(false);
|
||||
return {
|
||||
store,
|
||||
timer,
|
||||
@@ -297,8 +273,8 @@ export default defineComponent({
|
||||
emailCode: ["", "", "", "", "", ""], //邮箱验证码
|
||||
emailNextStep: true,
|
||||
username: "",
|
||||
password: localStorage.getItem("loginPassword") || '',
|
||||
email: localStorage.getItem("loginEmail") || '', //邮箱登录邮箱
|
||||
password: localStorage.getItem("loginPassword") || "",
|
||||
email: localStorage.getItem("loginEmail") || "", //邮箱登录邮箱
|
||||
frogetPasswordStep: 1, //忘记密码的步骤
|
||||
forgetPasswordEmail: "",
|
||||
forgetEmailCode: ["", "", "", "", "", ""], //忘记密码的邮箱验证码
|
||||
@@ -343,16 +319,14 @@ export default defineComponent({
|
||||
email: this.email,
|
||||
operationType: "LOGIN",
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then(
|
||||
(rv: any) => {
|
||||
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then((rv: any) => {
|
||||
if (rv) {
|
||||
this.emailStap = 2;
|
||||
this.time = 60;
|
||||
this.emailCode = ["", "", "", "", "", ""];
|
||||
this.createTimer();
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
//邮箱登录的上一步
|
||||
@@ -375,15 +349,12 @@ export default defineComponent({
|
||||
email: this.forgetPasswordEmail,
|
||||
operationType: "FORGET_PWD",
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then(
|
||||
(rv: any) => {
|
||||
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then((rv: any) => {
|
||||
if (rv) {
|
||||
this.frogetPasswordStep = 2;
|
||||
(this.forgetEmailCode = ["", "", "", "", "", ""]),
|
||||
this.createTimer();
|
||||
(this.forgetEmailCode = ["", "", "", "", "", ""]), this.createTimer();
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
//忘记密码的上一步
|
||||
forgetPasswordLastStepFun() {
|
||||
@@ -392,8 +363,7 @@ export default defineComponent({
|
||||
} else {
|
||||
this.frogetPasswordStep = this.frogetPasswordStep - 1;
|
||||
this.forgetPasswordEmail = "";
|
||||
(this.forgetEmailCode = ["", "", "", "", "", ""]),
|
||||
this.clearTimer();
|
||||
(this.forgetEmailCode = ["", "", "", "", "", ""]), this.clearTimer();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -406,15 +376,13 @@ export default defineComponent({
|
||||
password: "",
|
||||
verifyEmail: true,
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then(
|
||||
(rv: any) => {
|
||||
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then((rv: any) => {
|
||||
if (rv) {
|
||||
this.forgetEmailValue = emailVerifyCode;
|
||||
this.frogetPasswordStep = 3;
|
||||
this.clearTimer();
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
//改变勾选是否是机器人
|
||||
@@ -429,9 +397,7 @@ export default defineComponent({
|
||||
return;
|
||||
} else {
|
||||
if (!this.password) {
|
||||
message.info(
|
||||
"Please enter your account number or password"
|
||||
);
|
||||
message.info("Please enter your account number or password");
|
||||
return;
|
||||
}
|
||||
//输入邮箱
|
||||
@@ -446,14 +412,12 @@ export default defineComponent({
|
||||
}
|
||||
//判断是否同意隐私政策
|
||||
if (!this.checked) {
|
||||
message.info(
|
||||
"Agree to all terms, privacy fees and policies"
|
||||
);
|
||||
message.info("Agree to all terms, privacy fees and policies");
|
||||
return;
|
||||
}
|
||||
let data = {
|
||||
password: md5(this.password + "abc"),
|
||||
userName: 'a',
|
||||
userName: "a",
|
||||
// userName: this.username,
|
||||
email: this.email,
|
||||
operationType: "LOGIN",
|
||||
@@ -469,7 +433,7 @@ export default defineComponent({
|
||||
// this.loginType = 'email'
|
||||
// }
|
||||
if (rv) {
|
||||
this.clearTimer()
|
||||
this.clearTimer();
|
||||
this.time = 60;
|
||||
this.emailStap = 2;
|
||||
this.emailCode = ["", "", "", "", "", ""];
|
||||
@@ -482,8 +446,7 @@ export default defineComponent({
|
||||
localStorage.setItem("loginPassword", this.password);
|
||||
}
|
||||
})
|
||||
.catch((res) => {
|
||||
});
|
||||
.catch((res) => {});
|
||||
setTimeout(() => {
|
||||
this.loginTime = true;
|
||||
}, 2000);
|
||||
@@ -506,35 +469,35 @@ export default defineComponent({
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.accountLogin, data)
|
||||
.then((rv: any) => {
|
||||
this.setSuccessLogin(rv)
|
||||
this.setSuccessLogin(rv);
|
||||
})
|
||||
.catch((res) => {});
|
||||
},
|
||||
isCheckAgreement() {
|
||||
message.info(
|
||||
"Agree to all terms, privacy fees and policies"
|
||||
);
|
||||
message.info("Agree to all terms, privacy fees and policies");
|
||||
},
|
||||
//微信登录
|
||||
wechatLogin(value: any) {
|
||||
let data = {
|
||||
code: value.code,
|
||||
type:2
|
||||
}
|
||||
this.loadingShow = true
|
||||
type: 2,
|
||||
};
|
||||
this.loadingShow = true;
|
||||
Https.axiosGet(Https.httpUrls.parseWeChatCode, { params: data })
|
||||
.then((rv: any) => {
|
||||
this.loadingShow = false
|
||||
this.setSuccessLogin(rv)
|
||||
this.loadingShow = false;
|
||||
this.setSuccessLogin(rv);
|
||||
})
|
||||
.catch((res) => {this.loadingShow = false});
|
||||
.catch((res) => {
|
||||
this.loadingShow = false;
|
||||
});
|
||||
},
|
||||
//谷歌登录
|
||||
googelLogin(value: any) {
|
||||
let data = {credential : value,type:2}
|
||||
let data = { credential: value, type: 2 };
|
||||
Https.axiosGet(Https.httpUrls.parseGoogleCredential, { params: data })
|
||||
.then((rv: any) => {
|
||||
this.setSuccessLogin(rv)
|
||||
this.setSuccessLogin(rv);
|
||||
})
|
||||
.catch((res) => {});
|
||||
},
|
||||
@@ -557,8 +520,8 @@ export default defineComponent({
|
||||
let userid: any = {
|
||||
ueserId: rv.userId,
|
||||
systemUser: rv.systemUser,
|
||||
}
|
||||
if(rv.email)userid.email = rv.email
|
||||
};
|
||||
if (rv.email) userid.email = rv.email;
|
||||
this.store.commit("upUserDetail", userid);
|
||||
|
||||
if (window.innerWidth < 768) {
|
||||
@@ -569,13 +532,9 @@ export default defineComponent({
|
||||
} else {
|
||||
this.turnToHomePage("/home");
|
||||
}
|
||||
sessionStorage.setItem(
|
||||
"isTimeOne",
|
||||
JSON.stringify(false)
|
||||
); //是否需要公告 提示 弹窗
|
||||
sessionStorage.setItem("isTimeOne", JSON.stringify(false)); //是否需要公告 提示 弹窗
|
||||
let randomNum: any =
|
||||
Math.floor(Math.random() * 9000000000000000) +
|
||||
1000000000000000;
|
||||
Math.floor(Math.random() * 9000000000000000) + 1000000000000000;
|
||||
sessionStorage.setItem("sessionId", randomNum);
|
||||
sessionStorage.setItem("record", JSON.stringify([]));
|
||||
}
|
||||
@@ -588,14 +547,12 @@ export default defineComponent({
|
||||
password: md5(this.newPassword + "abc"),
|
||||
verifyEmail: false,
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then(
|
||||
(rv: any) => {
|
||||
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then((rv: any) => {
|
||||
if (rv) {
|
||||
message.success("Changing the password successfully");
|
||||
this.changeIsLogin(1);
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
//创建定时器
|
||||
@@ -641,9 +598,9 @@ export default defineComponent({
|
||||
// },
|
||||
},
|
||||
mounted() {
|
||||
const data = this.$route.query
|
||||
if(data?.state == 'weiXin'){
|
||||
this.wechatLogin(data)
|
||||
const data = this.$route.query;
|
||||
if (data?.state == "weiXin") {
|
||||
this.wechatLogin(data);
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -749,7 +706,7 @@ export default defineComponent({
|
||||
font-size: 1.4rem;
|
||||
box-sizing: border-box;
|
||||
outline: none;
|
||||
transition: all .3s;
|
||||
transition: all 0.3s;
|
||||
&:hover {
|
||||
border: 0.1rem solid #000;
|
||||
}
|
||||
@@ -803,9 +760,9 @@ export default defineComponent({
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
cursor: pointer;
|
||||
transition: all .3s;
|
||||
transition: all 0.3s;
|
||||
&:hover {
|
||||
background: #3C3C3C;
|
||||
background: #3c3c3c;
|
||||
}
|
||||
&[state="2"] {
|
||||
cursor: not-allowed;
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
<!-- v-show="loginType == 'username'" -->
|
||||
<div>
|
||||
<div class="login_form_content" :state="emailStap">
|
||||
|
||||
<div v-show="emailStap === 1">
|
||||
<div class="login_form_title marign_top30">
|
||||
School
|
||||
</div>
|
||||
<div class="login_form_title marign_top30">School</div>
|
||||
<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
|
||||
placeholder="Select a school"
|
||||
v-model:value="selectSchool"
|
||||
@@ -36,9 +36,7 @@
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="login_form_title marign_top30">
|
||||
Email
|
||||
</div>
|
||||
<div class="login_form_title marign_top30">Email</div>
|
||||
<input
|
||||
class="login_form_input"
|
||||
placeholder="Enter your email address"
|
||||
@@ -63,21 +61,16 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 邮箱登录 start -->
|
||||
<div
|
||||
v-show="emailStap === 2"
|
||||
class="login_form_email"
|
||||
:class="{ active: emailStap === 2 }"
|
||||
>
|
||||
<div
|
||||
v-show="emailStap === 2"
|
||||
class="email_last_step"
|
||||
>
|
||||
<div v-show="emailStap === 2" class="email_last_step">
|
||||
<div class="email_last_step_block">
|
||||
<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"
|
||||
@@ -86,34 +79,23 @@
|
||||
</div>
|
||||
<div class="email_last_step_bottom">
|
||||
<div class="email_last_step_des">
|
||||
<div class="sent_email_content">
|
||||
Sent to {{ email }}
|
||||
</div>
|
||||
<div class="sent_email_content">Sent to {{ email }}</div>
|
||||
<div class="tip_content">
|
||||
<span v-show="time"
|
||||
>{{ time }}s</span
|
||||
>
|
||||
<span
|
||||
v-show="!time"
|
||||
@click="emailNextStepFun()"
|
||||
<span v-show="time">{{ time }}s</span>
|
||||
<span v-show="!time" @click="emailNextStepFun()"
|
||||
>Resend</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<VerificationCodeInput
|
||||
:ct="emailCode"
|
||||
@sendCaptcha="
|
||||
submitEmailLogin($event)
|
||||
"
|
||||
@sendCaptcha="submitEmailLogin($event)"
|
||||
></VerificationCodeInput>
|
||||
|
||||
<div class="email_last_step_des">
|
||||
<div
|
||||
class="sent_email_content email_tip_content"
|
||||
>
|
||||
Please check the junk box if you
|
||||
haven't received verification
|
||||
code
|
||||
<div class="sent_email_content email_tip_content">
|
||||
Please check the junk box if you haven't received
|
||||
verification code
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -123,15 +105,8 @@
|
||||
|
||||
<div class="login_form_title marign_top30">
|
||||
<label :class="{ active: emailStap == 2 }">
|
||||
<input
|
||||
:state="emailStap"
|
||||
type="checkbox"
|
||||
v-model="checked"
|
||||
/>
|
||||
<span
|
||||
>I agree to all Term, Privacy Policy and
|
||||
Fees</span
|
||||
>
|
||||
<input :state="emailStap" type="checkbox" v-model="checked" />
|
||||
<span>I agree to all Term, Privacy Policy and Fees</span>
|
||||
</label>
|
||||
</div>
|
||||
<!-- <div class="thirdPartyLogin marign_top30">
|
||||
@@ -174,9 +149,7 @@
|
||||
@click="forgetPasswordLastStepFun()"
|
||||
>
|
||||
<i class="fi fi-br-arrow-left"></i>
|
||||
<span class="forget_password_content_title"
|
||||
>Retrieve password</span
|
||||
>
|
||||
<span class="forget_password_content_title">Retrieve password</span>
|
||||
</div>
|
||||
<div v-show="frogetPasswordStep === 1">
|
||||
<div class="forget_passored_form_content">
|
||||
@@ -204,9 +177,7 @@
|
||||
</div>
|
||||
<div class="tip_content">
|
||||
<span v-show="time">{{ time }}s</span>
|
||||
<span
|
||||
v-show="!time"
|
||||
@click="forgetPasswordNextStepFun()"
|
||||
<span v-show="!time" @click="forgetPasswordNextStepFun()"
|
||||
>Resend</span
|
||||
>
|
||||
</div>
|
||||
@@ -256,42 +227,47 @@ import phoneLogin from "@/component/LoginPage/phoneLogin.vue";
|
||||
import { useStore } from "vuex";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { setLang } from "@/tool/guide";
|
||||
const md5 = require("md5");
|
||||
import md5 from "md5";
|
||||
export default defineComponent({
|
||||
components: {
|
||||
VerificationCodeInput,googleLogin,weiXinLogin,phoneLogin
|
||||
VerificationCodeInput,
|
||||
googleLogin,
|
||||
weiXinLogin,
|
||||
phoneLogin,
|
||||
},
|
||||
setup() {
|
||||
let timer: any = 0;
|
||||
const { locale } = useI18n();
|
||||
const store = useStore();
|
||||
let loadingShow = ref(false)
|
||||
let loadingShow = ref(false);
|
||||
const data = reactive({
|
||||
selectSchool:'',
|
||||
selectSchool: "",
|
||||
schoolList: [] as any,
|
||||
})
|
||||
const schoolListChange = (e:any)=>{
|
||||
}
|
||||
});
|
||||
const schoolListChange = (e: any) => {};
|
||||
const filterOption = (e: any) => {
|
||||
let params = {
|
||||
name: e,
|
||||
type:'School'
|
||||
}
|
||||
Https.axiosPost(Https.httpUrls.organizationNameSearch,{},{params:params}).then((rv:any)=>{
|
||||
type: "School",
|
||||
};
|
||||
Https.axiosPost(
|
||||
Https.httpUrls.organizationNameSearch,
|
||||
{},
|
||||
{ params: params }
|
||||
).then((rv: any) => {
|
||||
data.schoolList = rv.map((item: any) => {
|
||||
return {
|
||||
label: item,
|
||||
value: item,
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
};
|
||||
const handleFocus = () => {
|
||||
if (data.schoolList.length == 0) {
|
||||
filterOption('')
|
||||
}
|
||||
filterOption("");
|
||||
}
|
||||
};
|
||||
return {
|
||||
...toRefs(data),
|
||||
store,
|
||||
@@ -299,7 +275,8 @@ export default defineComponent({
|
||||
locale,
|
||||
loadingShow,
|
||||
schoolListChange,
|
||||
filterOption,handleFocus
|
||||
filterOption,
|
||||
handleFocus,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
@@ -311,8 +288,8 @@ export default defineComponent({
|
||||
emailCode: ["", "", "", "", "", ""], //邮箱验证码
|
||||
emailNextStep: true,
|
||||
username: "",
|
||||
password: localStorage.getItem("loginPassword") || '',
|
||||
email: localStorage.getItem("loginEmail") || '', //邮箱登录邮箱
|
||||
password: localStorage.getItem("loginPassword") || "",
|
||||
email: localStorage.getItem("loginEmail") || "", //邮箱登录邮箱
|
||||
frogetPasswordStep: 1, //忘记密码的步骤
|
||||
forgetPasswordEmail: "",
|
||||
forgetEmailCode: ["", "", "", "", "", ""], //忘记密码的邮箱验证码
|
||||
@@ -357,16 +334,14 @@ export default defineComponent({
|
||||
email: this.email,
|
||||
operationType: "LOGIN",
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then(
|
||||
(rv: any) => {
|
||||
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then((rv: any) => {
|
||||
if (rv) {
|
||||
this.emailStap = 2;
|
||||
this.time = 60;
|
||||
this.emailCode = ["", "", "", "", "", ""];
|
||||
this.createTimer();
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
//邮箱登录的上一步
|
||||
@@ -389,15 +364,12 @@ export default defineComponent({
|
||||
email: this.forgetPasswordEmail,
|
||||
operationType: "FORGET_PWD",
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then(
|
||||
(rv: any) => {
|
||||
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then((rv: any) => {
|
||||
if (rv) {
|
||||
this.frogetPasswordStep = 2;
|
||||
(this.forgetEmailCode = ["", "", "", "", "", ""]),
|
||||
this.createTimer();
|
||||
(this.forgetEmailCode = ["", "", "", "", "", ""]), this.createTimer();
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
//忘记密码的上一步
|
||||
forgetPasswordLastStepFun() {
|
||||
@@ -406,8 +378,7 @@ export default defineComponent({
|
||||
} else {
|
||||
this.frogetPasswordStep = this.frogetPasswordStep - 1;
|
||||
this.forgetPasswordEmail = "";
|
||||
(this.forgetEmailCode = ["", "", "", "", "", ""]),
|
||||
this.clearTimer();
|
||||
(this.forgetEmailCode = ["", "", "", "", "", ""]), this.clearTimer();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -420,15 +391,13 @@ export default defineComponent({
|
||||
password: "",
|
||||
verifyEmail: true,
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then(
|
||||
(rv: any) => {
|
||||
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then((rv: any) => {
|
||||
if (rv) {
|
||||
this.forgetEmailValue = emailVerifyCode;
|
||||
this.frogetPasswordStep = 3;
|
||||
this.clearTimer();
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
//改变勾选是否是机器人
|
||||
@@ -443,9 +412,7 @@ export default defineComponent({
|
||||
return;
|
||||
} else {
|
||||
if (!this.password) {
|
||||
message.info(
|
||||
"Please enter your account number or password"
|
||||
);
|
||||
message.info("Please enter your account number or password");
|
||||
return;
|
||||
}
|
||||
//输入邮箱
|
||||
@@ -464,14 +431,12 @@ export default defineComponent({
|
||||
}
|
||||
//判断是否同意隐私政策
|
||||
if (!this.checked) {
|
||||
message.info(
|
||||
"Agree to all terms, privacy fees and policies"
|
||||
);
|
||||
message.info("Agree to all terms, privacy fees and policies");
|
||||
return;
|
||||
}
|
||||
let data = {
|
||||
password: md5(this.password + "abc"),
|
||||
userName: 'a',
|
||||
userName: "a",
|
||||
// userName: this.username,
|
||||
organizationName: this.selectSchool,
|
||||
email: this.email,
|
||||
@@ -484,7 +449,7 @@ export default defineComponent({
|
||||
Https.axiosPost(Https.httpUrls.schoolLogin, data)
|
||||
.then((rv: any) => {
|
||||
if (rv) {
|
||||
this.clearTimer()
|
||||
this.clearTimer();
|
||||
this.time = 60;
|
||||
this.emailStap = 2;
|
||||
this.emailCode = ["", "", "", "", "", ""];
|
||||
@@ -517,39 +482,39 @@ export default defineComponent({
|
||||
emailVerifyCode: emailVerifyCode,
|
||||
loginType: "EMAIL",
|
||||
userId: this.userId,
|
||||
organizationName:this.selectSchool
|
||||
organizationName: this.selectSchool,
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.accountLogin, data)
|
||||
.then((rv: any) => {
|
||||
this.setSuccessLogin(rv)
|
||||
this.setSuccessLogin(rv);
|
||||
})
|
||||
.catch((res) => {});
|
||||
},
|
||||
isCheckAgreement() {
|
||||
message.info(
|
||||
"Agree to all terms, privacy fees and policies"
|
||||
);
|
||||
message.info("Agree to all terms, privacy fees and policies");
|
||||
},
|
||||
//微信登录
|
||||
wechatLogin(value: any) {
|
||||
let data = {
|
||||
code: value.code,
|
||||
type:2
|
||||
}
|
||||
this.loadingShow = true
|
||||
type: 2,
|
||||
};
|
||||
this.loadingShow = true;
|
||||
Https.axiosGet(Https.httpUrls.parseWeChatCode, { params: data })
|
||||
.then((rv: any) => {
|
||||
this.loadingShow = false
|
||||
this.setSuccessLogin(rv)
|
||||
this.loadingShow = false;
|
||||
this.setSuccessLogin(rv);
|
||||
})
|
||||
.catch((res) => {this.loadingShow = false});
|
||||
.catch((res) => {
|
||||
this.loadingShow = false;
|
||||
});
|
||||
},
|
||||
//谷歌登录
|
||||
googelLogin(value: any) {
|
||||
let data = {credential : value,type:2}
|
||||
let data = { credential: value, type: 2 };
|
||||
Https.axiosGet(Https.httpUrls.parseGoogleCredential, { params: data })
|
||||
.then((rv: any) => {
|
||||
this.setSuccessLogin(rv)
|
||||
this.setSuccessLogin(rv);
|
||||
})
|
||||
.catch((res) => {});
|
||||
},
|
||||
@@ -572,8 +537,8 @@ export default defineComponent({
|
||||
let userid: any = {
|
||||
ueserId: rv.userId,
|
||||
systemUser: rv.systemUser,
|
||||
}
|
||||
if(rv.email)userid.email = rv.email
|
||||
};
|
||||
if (rv.email) userid.email = rv.email;
|
||||
this.store.commit("upUserDetail", userid);
|
||||
|
||||
if (window.innerWidth < 768) {
|
||||
@@ -584,13 +549,9 @@ export default defineComponent({
|
||||
} else {
|
||||
this.turnToHomePage("/home");
|
||||
}
|
||||
sessionStorage.setItem(
|
||||
"isTimeOne",
|
||||
JSON.stringify(false)
|
||||
); //是否需要公告 提示 弹窗
|
||||
sessionStorage.setItem("isTimeOne", JSON.stringify(false)); //是否需要公告 提示 弹窗
|
||||
let randomNum: any =
|
||||
Math.floor(Math.random() * 9000000000000000) +
|
||||
1000000000000000;
|
||||
Math.floor(Math.random() * 9000000000000000) + 1000000000000000;
|
||||
sessionStorage.setItem("sessionId", randomNum);
|
||||
sessionStorage.setItem("record", JSON.stringify([]));
|
||||
}
|
||||
@@ -603,14 +564,12 @@ export default defineComponent({
|
||||
password: md5(this.newPassword + "abc"),
|
||||
verifyEmail: false,
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then(
|
||||
(rv: any) => {
|
||||
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then((rv: any) => {
|
||||
if (rv) {
|
||||
message.success("Changing the password successfully");
|
||||
this.changeIsLogin(1);
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
//创建定时器
|
||||
@@ -656,9 +615,9 @@ export default defineComponent({
|
||||
// },
|
||||
},
|
||||
mounted() {
|
||||
const data = this.$route.query
|
||||
if(data?.state == 'weiXin'){
|
||||
this.wechatLogin(data)
|
||||
const data = this.$route.query;
|
||||
if (data?.state == "weiXin") {
|
||||
this.wechatLogin(data);
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -779,7 +738,7 @@ export default defineComponent({
|
||||
font-size: 1.4rem;
|
||||
box-sizing: border-box;
|
||||
outline: none;
|
||||
transition: all .3s;
|
||||
transition: all 0.3s;
|
||||
&:hover {
|
||||
border: 0.1rem solid #000;
|
||||
}
|
||||
@@ -833,9 +792,9 @@ export default defineComponent({
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
cursor: pointer;
|
||||
transition: all .3s;
|
||||
transition: all 0.3s;
|
||||
&:hover {
|
||||
background: #3C3C3C;
|
||||
background: #3c3c3c;
|
||||
}
|
||||
&[state="2"] {
|
||||
cursor: not-allowed;
|
||||
|
||||
@@ -17,12 +17,33 @@
|
||||
<div class="generalModel_btn">
|
||||
<div class="generalModel_closeIcon" @click.stop="cancelDsign()">
|
||||
<!-- <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" />
|
||||
<rect 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"/>
|
||||
<rect
|
||||
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>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="login_page">
|
||||
@@ -33,7 +54,8 @@
|
||||
<div class="login_type_list">
|
||||
<div
|
||||
:class="[
|
||||
'login_type_item','username_login_item',
|
||||
'login_type_item',
|
||||
'username_login_item',
|
||||
'login_active',
|
||||
]"
|
||||
>
|
||||
@@ -61,40 +83,70 @@
|
||||
<div v-show="passwordConditionShow" class="conditionShow">
|
||||
<div class="item">
|
||||
<div class="icon">
|
||||
<i v-show="!passwordCondition.length" class="fi fi-br-cross-small"></i>
|
||||
<i v-show="passwordCondition.length" class="fi fi-br-check"></i>
|
||||
<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 class="text">At least 8 characters long</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="icon">
|
||||
<i v-show="!passwordCondition.special" class="fi fi-br-cross-small"></i>
|
||||
<i v-show="passwordCondition.special" class="fi fi-br-check"></i>
|
||||
<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 class="text">Must contain special characters</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="icon">
|
||||
<i v-show="!passwordCondition.group" class="fi fi-br-cross-small"></i>
|
||||
<i v-show="passwordCondition.group" class="fi fi-br-check"></i>
|
||||
<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 class="text">Mix of uppercase, lowercase and numbers</div>
|
||||
</div>
|
||||
</div>
|
||||
<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"
|
||||
placeholder="Enter your password"
|
||||
v-model="password"
|
||||
@keydown.enter="submitPerLogin()"
|
||||
@input="passwordInput"
|
||||
@focus="()=>passwordConditionShow = true"
|
||||
@blur="()=>passwordConditionShow = false"
|
||||
@focus="() => (passwordConditionShow = true)"
|
||||
@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>
|
||||
<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>
|
||||
<input
|
||||
class="login_form_input"
|
||||
@@ -104,7 +156,10 @@
|
||||
/>
|
||||
|
||||
<!-- 邮箱登录 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="emailStap === 1" class="forget_password_content">
|
||||
<div class="forget_password_content_block" @click="changeLoginType('username')">
|
||||
@@ -131,12 +186,14 @@
|
||||
</div> -->
|
||||
|
||||
<div v-show="emailStap === 2" class="email_last_step">
|
||||
|
||||
<div class="email_last_step_block">
|
||||
<span class="email_last_step_content"
|
||||
>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 class="email_last_step_bottom">
|
||||
<div class="email_last_step_des">
|
||||
@@ -157,7 +214,8 @@
|
||||
|
||||
<div class="email_last_step_des">
|
||||
<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>
|
||||
@@ -167,24 +225,35 @@
|
||||
|
||||
<div class="login_form_title marign_top30">
|
||||
<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>
|
||||
</label>
|
||||
</div>
|
||||
<div class="thirdPartyLogin marign_top30">
|
||||
<div class="label">
|
||||
<div class="mask" v-show="!checked" @click="isCheckAgreement"></div>
|
||||
<googleLogin @googelLogin="googelLogin" text="Register with Google"></googleLogin>
|
||||
<div
|
||||
class="mask"
|
||||
v-show="!checked"
|
||||
@click="isCheckAgreement"
|
||||
></div>
|
||||
<googleLogin
|
||||
@googelLogin="googelLogin"
|
||||
text="Register with Google"
|
||||
></googleLogin>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<!-- <phoneLogin></phoneLogin> -->
|
||||
</div>
|
||||
<div
|
||||
class="login_submit_button marign_top40"
|
||||
style="width: 100%;"
|
||||
style="width: 100%"
|
||||
:state="emailStap"
|
||||
@click="submitPerLogin()"
|
||||
>
|
||||
@@ -194,10 +263,8 @@
|
||||
<!-- <div class="login_text" >
|
||||
<div class="forget_password_text" @click="changeIsLogin(2)">Forgot your password</div>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
<!-- 账号密码登录 end -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 邮箱登录 end -->
|
||||
@@ -205,13 +272,14 @@
|
||||
|
||||
<!-- 忘记密码 start -->
|
||||
<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
|
||||
> -->
|
||||
<i class="fi fi-br-arrow-left"></i>
|
||||
<span class="forget_password_content_title"
|
||||
>Retrieve password</span
|
||||
>
|
||||
<span class="forget_password_content_title">Retrieve password</span>
|
||||
</div>
|
||||
<div v-show="frogetPasswordStep === 1">
|
||||
<div class="forget_passored_form_content">
|
||||
@@ -239,9 +307,7 @@
|
||||
</div>
|
||||
<div class="tip_content">
|
||||
<span v-show="time">{{ time }}s</span>
|
||||
<span
|
||||
v-show="!time"
|
||||
@click="forgetPasswordNextStepFun()"
|
||||
<span v-show="!time" @click="forgetPasswordNextStepFun()"
|
||||
>Resend</span
|
||||
>
|
||||
</div>
|
||||
@@ -267,11 +333,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 忘记密码 end -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@@ -287,32 +351,35 @@ import phoneLogin from "@/component/LoginPage/phoneLogin.vue";
|
||||
import { useStore } from "vuex";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { setLang } from "@/tool/guide";
|
||||
const md5 = require("md5");
|
||||
import md5 from "md5";
|
||||
export default defineComponent({
|
||||
components: {
|
||||
VerificationCodeInput,googleLogin,weiXinLogin,phoneLogin
|
||||
VerificationCodeInput,
|
||||
googleLogin,
|
||||
weiXinLogin,
|
||||
phoneLogin,
|
||||
},
|
||||
setup() {
|
||||
let timer: any = 0;
|
||||
const {locale} = useI18n()
|
||||
const { locale } = useI18n();
|
||||
const store = useStore();
|
||||
let register = reactive({
|
||||
registerModel: false,
|
||||
registerModelMask: true,
|
||||
pageWidth:'50%',
|
||||
pageWidth: "50%",
|
||||
passwordConditionShow: false,
|
||||
passwordCondition: {
|
||||
length: false,
|
||||
special: false,
|
||||
group: false,
|
||||
},
|
||||
})
|
||||
});
|
||||
return {
|
||||
store,
|
||||
timer,
|
||||
...toRefs(register),
|
||||
locale
|
||||
}
|
||||
locale,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -332,22 +399,21 @@ export default defineComponent({
|
||||
newPassword: "", //新密码
|
||||
isCheckRobot: false,
|
||||
time: 60, //60秒倒计时
|
||||
passwordType:'password',
|
||||
userId:'',
|
||||
loginTime:true
|
||||
passwordType: "password",
|
||||
userId: "",
|
||||
loginTime: true,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
const data = this.$route.query
|
||||
if(data?.state == 'weiXin'){
|
||||
this.wechatLogin(data)
|
||||
const data = this.$route.query;
|
||||
if (data?.state == "weiXin") {
|
||||
this.wechatLogin(data);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.registerModel = true
|
||||
this.emailLastStepFun()
|
||||
|
||||
this.registerModel = true;
|
||||
this.emailLastStepFun();
|
||||
},
|
||||
changeLoginType(type: string) {
|
||||
this.loginType = type;
|
||||
@@ -380,27 +446,24 @@ export default defineComponent({
|
||||
operationType: "LOGIN",
|
||||
};
|
||||
|
||||
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then(
|
||||
(rv: any) => {
|
||||
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then((rv: any) => {
|
||||
if (rv) {
|
||||
this.emailStap = 2;
|
||||
this.time = 60;
|
||||
this.emailCode = ["", "", "", "", "", ""]
|
||||
this.emailCode = ["", "", "", "", "", ""];
|
||||
this.createTimer();
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
//邮箱登录的上一步
|
||||
emailLastStepFun() {
|
||||
this.emailStap = 1;
|
||||
this.username = "",
|
||||
this.password = "",
|
||||
this.email = "";
|
||||
this.checked=false,
|
||||
this.loginType = "username",
|
||||
(this.emailCode = ["", "", "", "", "", ""]), this.clearTimer();
|
||||
(this.username = ""), (this.password = ""), (this.email = "");
|
||||
(this.checked = false),
|
||||
(this.loginType = "username"),
|
||||
(this.emailCode = ["", "", "", "", "", ""]),
|
||||
this.clearTimer();
|
||||
},
|
||||
|
||||
//忘记密码的下一步
|
||||
@@ -413,15 +476,12 @@ export default defineComponent({
|
||||
email: this.forgetPasswordEmail,
|
||||
operationType: "FORGET_PWD",
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then(
|
||||
(rv: any) => {
|
||||
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then((rv: any) => {
|
||||
if (rv) {
|
||||
this.frogetPasswordStep = 2;
|
||||
(this.forgetEmailCode = ["", "", "", "", "", ""]),
|
||||
this.createTimer();
|
||||
(this.forgetEmailCode = ["", "", "", "", "", ""]), this.createTimer();
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
//忘记密码的上一步
|
||||
forgetPasswordLastStepFun() {
|
||||
@@ -430,35 +490,37 @@ export default defineComponent({
|
||||
} else {
|
||||
this.frogetPasswordStep = this.frogetPasswordStep - 1;
|
||||
this.forgetPasswordEmail = "";
|
||||
(this.forgetEmailCode = ["", "", "", "", "", ""]),
|
||||
this.clearTimer();
|
||||
(this.forgetEmailCode = ["", "", "", "", "", ""]), this.clearTimer();
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//改变勾选是否是机器人
|
||||
checkRobot() {
|
||||
this.isCheckRobot = !this.isCheckRobot;
|
||||
},
|
||||
passwordInput() {
|
||||
this.isPassword(this.password)
|
||||
this.isPassword(this.password);
|
||||
},
|
||||
isPassword(password: any) {
|
||||
this.passwordCondition.length = /.{8,}/.test(password)
|
||||
this.passwordCondition.special = /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(password)
|
||||
this.passwordCondition.group = /[a-z]/.test(password) && /[A-Z]/.test(password) && /\d/.test(password)
|
||||
return Object.values(this.passwordCondition).filter(value => value === true).length;
|
||||
this.passwordCondition.length = /.{8,}/.test(password);
|
||||
this.passwordCondition.special =
|
||||
/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(password);
|
||||
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() {
|
||||
|
||||
|
||||
//输入账号密码
|
||||
if (this.emailStap >= 2) {
|
||||
return;
|
||||
} else {
|
||||
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;
|
||||
}
|
||||
if (!this.username || !this.password) {
|
||||
@@ -482,79 +544,77 @@ export default defineComponent({
|
||||
}
|
||||
if (this.isPassword(this.password) < 3) {
|
||||
message.info("You must satisfy ALL password conditions to register.");
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
let data = {
|
||||
userPassword: md5(this.password + "abc"),
|
||||
userName: this.username,
|
||||
userEmail: this.email,
|
||||
"browserIdentifiers": "",
|
||||
"country": "",
|
||||
"createDate": "",
|
||||
"credits": 0,
|
||||
"id": 0,
|
||||
"isBeginner": 0,
|
||||
"isTrial": 0,
|
||||
"language": "",
|
||||
"systemUser": 0,
|
||||
"updateDate": "",
|
||||
"validEndTime": 0,
|
||||
"validStartTime": 0
|
||||
browserIdentifiers: "",
|
||||
country: "",
|
||||
createDate: "",
|
||||
credits: 0,
|
||||
id: 0,
|
||||
isBeginner: 0,
|
||||
isTrial: 0,
|
||||
language: "",
|
||||
systemUser: 0,
|
||||
updateDate: "",
|
||||
validEndTime: 0,
|
||||
validStartTime: 0,
|
||||
};
|
||||
// this.loginType = 'email'
|
||||
if (this.loginTime) {
|
||||
this.loginTime = false
|
||||
Https.axiosPost(Https.httpUrls.designWorksRegister, data).then(
|
||||
(rv: any) => {
|
||||
this.loginTime = false;
|
||||
Https.axiosPost(Https.httpUrls.designWorksRegister, data)
|
||||
.then((rv: any) => {
|
||||
// if (rv) {
|
||||
// this.loginType = 'email'
|
||||
// }
|
||||
this.emailStap = 2;
|
||||
if (rv) {
|
||||
this.userId = rv.userId
|
||||
this.loginType = 'email'
|
||||
this.userId = rv.userId;
|
||||
this.loginType = "email";
|
||||
this.time = 60;
|
||||
this.emailCode = ["", "", "", "", "", ""]
|
||||
this.emailCode = ["", "", "", "", "", ""];
|
||||
this.createTimer();
|
||||
}
|
||||
}
|
||||
).catch(res=>{
|
||||
})
|
||||
.catch((res) => {
|
||||
this.emailStap = 1;
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.loginTime = true
|
||||
this.loginTime = true;
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
isCheckAgreement() {
|
||||
message.info(
|
||||
"Agree to all terms, privacy fees and policies"
|
||||
);
|
||||
message.info("Agree to all terms, privacy fees and policies");
|
||||
},
|
||||
changePasswordType() {
|
||||
this.passwordType = this.passwordType === 'password' ? 'text' : 'password'
|
||||
this.passwordType =
|
||||
this.passwordType === "password" ? "text" : "password";
|
||||
},
|
||||
//微信登录
|
||||
wechatLogin(value: any) {
|
||||
let data = {
|
||||
code: value.code,
|
||||
type:1
|
||||
}
|
||||
type: 1,
|
||||
};
|
||||
Https.axiosGet(Https.httpUrls.parseWeChatCode, { params: data })
|
||||
.then((rv: any) => {
|
||||
this.setSuccessLogin(rv)
|
||||
this.setSuccessLogin(rv);
|
||||
})
|
||||
.catch((res) => {});
|
||||
},
|
||||
//谷歌登录
|
||||
googelLogin(value: any) {
|
||||
let data = {credential : value,type:1}
|
||||
let data = { credential: value, type: 1 };
|
||||
Https.axiosGet(Https.httpUrls.parseGoogleCredential, { params: data })
|
||||
.then((rv: any) => {
|
||||
this.setSuccessLogin(rv)
|
||||
this.setSuccessLogin(rv);
|
||||
})
|
||||
.catch((res) => {});
|
||||
},
|
||||
@@ -574,9 +634,9 @@ export default defineComponent({
|
||||
setCookie("userInfo", JSON.stringify(rv));
|
||||
let userid: any = {
|
||||
ueserId: rv.userId,
|
||||
systemUser:rv.systemUser
|
||||
}
|
||||
if(rv.email)userid.email = rv.email
|
||||
systemUser: rv.systemUser,
|
||||
};
|
||||
if (rv.email) userid.email = rv.email;
|
||||
this.store.commit("upUserDetail", userid);
|
||||
|
||||
if (window.innerWidth < 768) {
|
||||
@@ -587,36 +647,31 @@ export default defineComponent({
|
||||
} else {
|
||||
this.turnToHomePage("/home");
|
||||
}
|
||||
sessionStorage.setItem(
|
||||
"isTimeOne",
|
||||
JSON.stringify(false)
|
||||
); //是否需要公告 提示 弹窗
|
||||
sessionStorage.setItem("isTimeOne", JSON.stringify(false)); //是否需要公告 提示 弹窗
|
||||
let randomNum: any =
|
||||
Math.floor(Math.random() * 9000000000000000) +
|
||||
1000000000000000;
|
||||
Math.floor(Math.random() * 9000000000000000) + 1000000000000000;
|
||||
sessionStorage.setItem("sessionId", randomNum);
|
||||
sessionStorage.setItem("record", JSON.stringify([]));
|
||||
}
|
||||
},
|
||||
//邮箱登录提交
|
||||
submitEmailLogin(emailVerifyCode: any) {
|
||||
let affiliateRef = sessionStorage.getItem('affiliateRef');
|
||||
let affiliateRef = sessionStorage.getItem("affiliateRef");
|
||||
let data = {
|
||||
email: this.email,
|
||||
emailVerifyCode: emailVerifyCode,
|
||||
loginType: "EMAIL",
|
||||
userId: this.userId,
|
||||
"userEmail": this.email,
|
||||
"userName": this.username,
|
||||
"userPassword": md5(this.password + "abc"),
|
||||
invitationCode:affiliateRef?affiliateRef:'',
|
||||
userEmail: this.email,
|
||||
userName: this.username,
|
||||
userPassword: md5(this.password + "abc"),
|
||||
invitationCode: affiliateRef ? affiliateRef : "",
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.designWorksRegisterCode, data).then(
|
||||
(rv: any) => {
|
||||
this.setSuccessLogin(rv)
|
||||
}
|
||||
).catch(res=>{
|
||||
});
|
||||
Https.axiosPost(Https.httpUrls.designWorksRegisterCode, data)
|
||||
.then((rv: any) => {
|
||||
this.setSuccessLogin(rv);
|
||||
})
|
||||
.catch((res) => {});
|
||||
},
|
||||
|
||||
//修改密码提交
|
||||
@@ -627,14 +682,12 @@ export default defineComponent({
|
||||
password: md5(this.newPassword + "abc"),
|
||||
verifyEmail: false,
|
||||
};
|
||||
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then(
|
||||
(rv: any) => {
|
||||
Https.axiosPost(Https.httpUrls.accountResetPwd, data).then((rv: any) => {
|
||||
if (rv) {
|
||||
message.success("Changing the password successfully");
|
||||
this.changeIsLogin(1);
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
//创建定时器
|
||||
@@ -657,7 +710,7 @@ export default defineComponent({
|
||||
|
||||
//跳转到首页
|
||||
turnToHomePage(str: any) {
|
||||
this.getLang()
|
||||
this.getLang();
|
||||
// this.$router.push("/home");
|
||||
// console.log(window.location.search.substring(1));
|
||||
this.store.commit("clearAllData");
|
||||
@@ -668,22 +721,20 @@ export default defineComponent({
|
||||
},
|
||||
//获取当前语言
|
||||
getLang() {
|
||||
let data ={}
|
||||
Https.axiosPost(Https.httpUrls.getUserLanguage, data).then(
|
||||
(rv: any) => {
|
||||
let data = {};
|
||||
Https.axiosPost(Https.httpUrls.getUserLanguage, data).then((rv: any) => {
|
||||
if (rv) {
|
||||
this.locale = rv
|
||||
setLang(rv)
|
||||
this.locale = rv;
|
||||
setLang(rv);
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
turnToWindow(url: any) {
|
||||
window.open(url);
|
||||
},
|
||||
cancelDsign() {
|
||||
this.registerModel = false
|
||||
}
|
||||
this.registerModel = false;
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
@@ -719,7 +770,7 @@ export default defineComponent({
|
||||
// transform: translate(-50%,-50%);
|
||||
// width: 60rem;
|
||||
// width: 80%;
|
||||
background: #FFFFFF;
|
||||
background: #ffffff;
|
||||
// box-shadow: -0.3rem 2rem 5.9rem 0px rgba(200,200,200,0.3);
|
||||
padding: 2rem 6rem 2rem;
|
||||
box-sizing: border-box;
|
||||
@@ -739,7 +790,7 @@ export default defineComponent({
|
||||
top: 0;
|
||||
background: #fff;
|
||||
transform: scale(0);
|
||||
transition: .3s all;
|
||||
transition: 0.3s all;
|
||||
border: 2px solid;
|
||||
border-radius: 20px;
|
||||
.email_last_step {
|
||||
@@ -762,7 +813,7 @@ export default defineComponent({
|
||||
text-align: center;
|
||||
font-size: 3.6rem;
|
||||
font-weight: bold;
|
||||
color: #D7D7D7;
|
||||
color: #d7d7d7;
|
||||
cursor: pointer;
|
||||
height: 4rem;
|
||||
line-height: 4rem;
|
||||
@@ -824,14 +875,14 @@ export default defineComponent({
|
||||
left: auto;
|
||||
transform: translateY(-5rem);
|
||||
background: #404040;
|
||||
color: #FFF;
|
||||
color: #fff;
|
||||
font-size: 1.4rem;
|
||||
padding: 2rem;
|
||||
border-radius: 2rem;
|
||||
> .item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: .5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
@@ -859,7 +910,7 @@ export default defineComponent({
|
||||
font-size: 1.4rem;
|
||||
box-sizing: border-box;
|
||||
outline: none;
|
||||
transition: all .3s;
|
||||
transition: all 0.3s;
|
||||
&:hover {
|
||||
border: 0.1rem solid #000;
|
||||
}
|
||||
@@ -904,8 +955,6 @@ export default defineComponent({
|
||||
transform: translateY(1rem);
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.login_submit_button {
|
||||
@@ -918,9 +967,9 @@ export default defineComponent({
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
cursor: pointer;
|
||||
transition: all .3s;
|
||||
transition: all 0.3s;
|
||||
&:hover {
|
||||
background: #3C3C3C;
|
||||
background: #3c3c3c;
|
||||
}
|
||||
&[state="2"] {
|
||||
cursor: not-allowed;
|
||||
@@ -945,7 +994,7 @@ export default defineComponent({
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 60rem;
|
||||
background: #FFFFFF;
|
||||
background: #ffffff;
|
||||
box-shadow: -0.3rem 2rem 5.9rem 0px rgba(200, 200, 200, 0.3);
|
||||
border-radius: 1rem;
|
||||
padding: 3rem 6rem 6.5rem;
|
||||
@@ -985,7 +1034,7 @@ export default defineComponent({
|
||||
width: 100%;
|
||||
height: 5rem;
|
||||
margin-top: 1rem;
|
||||
border: 0.1rem solid #DFDFDF;
|
||||
border: 0.1rem solid #dfdfdf;
|
||||
border-radius: 2.5rem;
|
||||
padding-left: 2.1rem;
|
||||
line-height: 5rem;
|
||||
@@ -1020,7 +1069,6 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.marign_top20 {
|
||||
margin-top: 2rem;
|
||||
}
|
||||
@@ -1078,5 +1126,4 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user