@@ -302,6 +348,12 @@ export default defineComponent({
passwordType: "password",
userId: "",
loginTime: true,
+ passwordConditionShow:false,
+ passwordCondition: {
+ length: false,
+ special: false,
+ group: false,
+ },
};
},
onBeforeUnmount() {
@@ -544,9 +596,26 @@ export default defineComponent({
sessionStorage.setItem("sessionId", randomNum);
sessionStorage.setItem("record", JSON.stringify([]));
}
+ },
+ passwordInput(e) {
+ this.isPassword(this.newPassword);
+ },
+ 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;
},
//修改密码提交
submitResetPassword() {
+ if (this.isPassword(this.newPassword) < 3) {
+ message.info("You must satisfy ALL password conditions to register.");
+ return;
+ }
let data = {
email: this.forgetPasswordEmail,
emailVerifyCode: this.forgetEmailValue,
@@ -563,6 +632,8 @@ export default defineComponent({
//创建定时器
createTimer() {
+ clearInterval(this.timer);
+ this.time = 60;
this.timer = setInterval(() => {
this.time--;
if (this.time <= 0) this.clearTimer(0);
@@ -607,6 +678,36 @@ export default defineComponent({
.login_page {
width: 100%;
height: 100%;
+ .conditionShow {
+ bottom: 0;
+ position: absolute;
+ right: 0;
+ left: auto;
+ transform: translateY(-5rem);
+ background: #404040;
+ color: #fff;
+ font-size: 1.4rem;
+ padding: 2rem;
+ border-radius: 2rem;
+ z-index: 2;
+ > .item {
+ display: flex;
+ align-items: center;
+ margin-bottom: 0.5rem;
+ &:last-child {
+ margin-bottom: 0;
+ }
+ > .icon {
+ margin-right: 1rem;
+ i {
+ display: flex;
+ // &.fi-br-cross-small{
+ // color: red;
+ // }
+ }
+ }
+ }
+ }
.page_content {
.login_content {
margin: 0 auto;
diff --git a/src/component/LoginPage/login/personal.vue b/src/component/LoginPage/login/personal.vue
index 33e569ff..7fc3cddb 100644
--- a/src/component/LoginPage/login/personal.vue
+++ b/src/component/LoginPage/login/personal.vue
@@ -189,10 +189,56 @@
Password
+
+
+
+
+
+
+
At least 8 characters long
+
+
+
+
+
+
+
Must contain special characters
+
+
+
+
+
+
+
+ Mix of uppercase, lowercase and numbers
+
+
+
(passwordConditionShow = true)"
+ @blur="() => (passwordConditionShow = false)"
+ @input="passwordInput"
@keydown.enter="submitResetPassword()"
/>
@@ -258,6 +304,7 @@ import { useI18n } from "vue-i18n";
import { setLang } from "@/tool/guide";
import md5 from "md5";
import router from "@/router";
+import { pass } from "three/tsl";
export default defineComponent({
components: {
VerificationCodeInput,
@@ -307,6 +354,12 @@ export default defineComponent({
loginTime: true,
animation: false,
inputCodeTime: null as any,
+ passwordConditionShow:false,
+ passwordCondition: {
+ length: false,
+ special: false,
+ group: false,
+ },
};
},
onBeforeUnmount() {
@@ -373,8 +426,6 @@ export default defineComponent({
email: this.forgetPasswordEmail,
operationType: "FORGET_PWD",
};
- this.frogetPasswordStep = 2;
- (this.forgetEmailCode = ["", "", "", "", "", ""]), this.createTimer();
Https.axiosPost(Https.httpUrls.accountSendEmail, data).then((rv: any) => {
if (rv) {
this.frogetPasswordStep = 2;
@@ -415,14 +466,12 @@ export default defineComponent({
checkRobot() {
this.isCheckRobot = !this.isCheckRobot;
},
-
//提交账号密码预先登录
submitPerLogin() {
//输入账号密码
if (this.emailStap >= 2) {
let verificationCodeInputDom:any = this.$refs.verificationCodeInputDom
let code = verificationCodeInputDom.getCtData.map(item => item).join('');
- console.log(code)
if(code.length !== this.emailCode.length){
message.info("Please enter the complete verification code.");
}else{
@@ -564,9 +613,26 @@ export default defineComponent({
sessionStorage.setItem("sessionId", randomNum);
sessionStorage.setItem("record", JSON.stringify([]));
}
+ },
+ passwordInput(e) {
+ this.isPassword(this.newPassword);
+ },
+ 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;
},
//修改密码提交
submitResetPassword() {
+ if (this.isPassword(this.newPassword) < 3) {
+ message.info("You must satisfy ALL password conditions to register.");
+ return;
+ }
let data = {
email: this.forgetPasswordEmail,
emailVerifyCode: this.forgetEmailValue,
@@ -583,6 +649,8 @@ export default defineComponent({
//创建定时器
createTimer() {
+ clearInterval(this.timer);
+ this.time = 60;
this.timer = setInterval(() => {
this.time--;
if (this.time <= 0) this.clearTimer(0);
@@ -635,6 +703,36 @@ export default defineComponent({
.login_page {
width: 100%;
height: 100%;
+ .conditionShow {
+ bottom: 0;
+ position: absolute;
+ right: 0;
+ left: auto;
+ transform: translateY(-5rem);
+ background: #404040;
+ color: #fff;
+ font-size: 1.4rem;
+ padding: 2rem;
+ border-radius: 2rem;
+ z-index: 2;
+ > .item {
+ display: flex;
+ align-items: center;
+ margin-bottom: 0.5rem;
+ &:last-child {
+ margin-bottom: 0;
+ }
+ > .icon {
+ margin-right: 1rem;
+ i {
+ display: flex;
+ // &.fi-br-cross-small{
+ // color: red;
+ // }
+ }
+ }
+ }
+ }
.page_content {
.login_content {
margin: 0 auto;
@@ -720,7 +818,6 @@ export default defineComponent({
cursor: pointer;
}
}
-
.login_form_input {
width: 100%;
height: 6.75rem;
@@ -887,7 +984,7 @@ export default defineComponent({
.forget_passored_form_content {
margin-top: 3.5rem;
-
+ position: relative;
.forget_passored_form_title {
font-size: 2.4rem;
font-weight: bold;
diff --git a/src/component/LoginPage/login/school.vue b/src/component/LoginPage/login/school.vue
index 9c5dfe03..af38c27f 100644
--- a/src/component/LoginPage/login/school.vue
+++ b/src/component/LoginPage/login/school.vue
@@ -200,10 +200,56 @@
Password
+
+
+
+
+
+
+
At least 8 characters long
+
+
+
+
+
+
+
Must contain special characters
+
+
+
+
+
+
+
+ Mix of uppercase, lowercase and numbers
+
+
+
(passwordConditionShow = true)"
+ @blur="() => (passwordConditionShow = false)"
+ @input="passwordInput"
@keydown.enter="submitResetPassword()"
/>
@@ -315,6 +361,12 @@ export default defineComponent({
loginTime: true,
animation: false,
inputCodeTime: null as any,
+ passwordConditionShow:false,
+ passwordCondition: {
+ length: false,
+ special: false,
+ group: false,
+ },
};
},
onBeforeUnmount() {
@@ -572,9 +624,26 @@ export default defineComponent({
sessionStorage.setItem("sessionId", randomNum);
sessionStorage.setItem("record", JSON.stringify([]));
}
+ },
+ passwordInput(e) {
+ this.isPassword(this.newPassword);
+ },
+ 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;
},
//修改密码提交
submitResetPassword() {
+ if (this.isPassword(this.newPassword) < 3) {
+ message.info("You must satisfy ALL password conditions to register.");
+ return;
+ }
let data = {
email: this.forgetPasswordEmail,
emailVerifyCode: this.forgetEmailValue,
@@ -591,6 +660,8 @@ export default defineComponent({
//创建定时器
createTimer() {
+ clearInterval(this.timer);
+ this.time = 60;
this.timer = setInterval(() => {
this.time--;
if (this.time <= 0) this.clearTimer(0);
@@ -643,6 +714,36 @@ export default defineComponent({
.login_page {
width: 100%;
height: 100%;
+ .conditionShow {
+ bottom: 0;
+ position: absolute;
+ right: 0;
+ left: auto;
+ transform: translateY(-5rem);
+ background: #404040;
+ color: #fff;
+ font-size: 1.4rem;
+ padding: 2rem;
+ border-radius: 2rem;
+ z-index: 2;
+ > .item {
+ display: flex;
+ align-items: center;
+ margin-bottom: 0.5rem;
+ &:last-child {
+ margin-bottom: 0;
+ }
+ > .icon {
+ margin-right: 1rem;
+ i {
+ display: flex;
+ // &.fi-br-cross-small{
+ // color: red;
+ // }
+ }
+ }
+ }
+ }
.page_content {
.login_content {
margin: 0 auto;
diff --git a/src/component/mainPage/signUp/registerModel.vue b/src/component/mainPage/signUp/registerModel.vue
index 308dd0c1..210742fd 100644
--- a/src/component/mainPage/signUp/registerModel.vue
+++ b/src/component/mainPage/signUp/registerModel.vue
@@ -742,6 +742,8 @@ export default defineComponent({
//创建定时器
createTimer() {
+ clearInterval(this.timer);
+ this.time = 60;
this.timer = setInterval(() => {
this.time--;
if (!this.time) {