| | |
| | | var regex = /(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[\W_])/; |
| | | if (value.length < 8 || value.length > 10) { |
| | | callback(new Error('请输入8-10位大写字母+小写字母+数字+特殊字符')); |
| | | } |
| | | else if (!regex.test(value)) { |
| | | } else if (!regex.test(value)) { |
| | | callback(new Error("请输入8-10位大写字母+小写字母+数字+特殊字符")); |
| | | } else { |
| | | callback(); |
| | |
| | | if (this.loginInfo.firstLogin == 1) { |
| | | // this.$router.push({ path: "/" }).catch(() => { }); |
| | | // return; |
| | | this.$router.push({ path: this.redirect || "/screen" }).catch(() => { }); |
| | | if (this.loginInfo.roles.includes("admin") || this.loginInfo.roles.includes("city_leader") || this.loginInfo.roles.includes("county_leader")) { |
| | | this.$router.push({path: this.redirect || "/screen"}).catch(() => { |
| | | }); |
| | | } else { |
| | | this.$router.push({path: this.redirect || "/index"}).catch(() => { |
| | | }); |
| | | } |
| | | } else { |
| | | localStorage.setItem('firstLogin', 0) |
| | | } |
| | | }).catch(() => { }) |
| | | }).catch(() => { |
| | | }) |
| | | }).catch(() => { |
| | | this.loading = false; |
| | | if (this.captchaEnabled) { |
| | |
| | | // 修改完成将firstLogin改为1 |
| | | localStorage.setItem('firstLogin', 1) |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.$router.push({ path: this.redirect || "/" }).catch(() => { }); |
| | | this.$router.push({path: this.redirect || "/"}).catch(() => { |
| | | }); |
| | | }).catch((e) => { |
| | | console.info(e) |
| | | }); |
| | |
| | | animation-delay: 0.1s; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | .login-form { |