diff --git a/.env.development b/.env.development index 3d5a50f..7d38ab8 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,5 @@ # 页面标题 -VUE_APP_TITLE = 供应商自助管理系统 +VUE_APP_TITLE = 供应商自助管理平台 # 开发环境配置 ENV = 'development' diff --git a/src/views/myLogin.vue b/src/views/myLogin.vue index 4496eea..463b006 100644 --- a/src/views/myLogin.vue +++ b/src/views/myLogin.vue @@ -95,13 +95,15 @@ style=" position: absolute; bottom: 0; - margin-left: 36%; - font-size: 18px; + font-size: 12px; color: white; + width: 100%; + display: flex; + justify-content: center; " > - 软件名称: 医院UDI管理系统 + 软件名称: 供应商自助管理平台 { if (valid) { - this.loading = true; - if (this.loginForm.rememberMe) { - Cookies.set("username", this.loginForm.username, { expires: 30 }); - Cookies.set("password", encrypt(this.loginForm.password), { - expires: 30, - }); - // Cookies.set('rememberMe', this.loginForm.rememberMe, {expires: 30}); + if (this.loginForm.verificationCode) { + this.loading = true; + if (this.loginForm.rememberMe) { + Cookies.set("username", this.loginForm.username, { expires: 30 }); + Cookies.set("password", encrypt(this.loginForm.password), { + expires: 30, + }); + // Cookies.set('rememberMe', this.loginForm.rememberMe, {expires: 30}); + } else { + Cookies.remove("username"); + Cookies.remove("password"); + // Cookies.remove('rememberMe'); + } + + this.$store + .dispatch("Login", this.loginForm) + .then((res) => { + this.$router + .push({ path: this.redirect || "/" }) + .catch((res) => {}); + }) + .catch((res) => { + this.loading = false; + this.$refs.checkV.refresh(); + this.$message.error(res); + if (this.captchaEnabled) { + this.getCode(); + } + }); } else { - Cookies.remove("username"); - Cookies.remove("password"); - // Cookies.remove('rememberMe'); - } - this.$store - .dispatch("Login", this.loginForm) - .then((res) => { - this.$router - .push({ path: this.redirect || "/" }) - .catch((res) => {}); - }) - .catch((res) => { - this.loading = false; - this.$refs.checkV.refresh(); - this.$message.error(res); - if (this.captchaEnabled) { - this.getCode(); - } + this.$message({ + message: "请向右滑动完成验证", + type: "warning", }); + } } }); }, @@ -287,6 +298,7 @@ $light_gray: #eee; background-image: url("../assets/login.jpg"); background-size: 100vw 100vh; height: 100%; + overflow: hidden; input:-webkit-autofill, input:-webkit-autofill:hover, @@ -388,12 +400,6 @@ $light_gray: #eee; cursor: pointer; } - .thirdparty-button { - /*position: absolute;*/ - /*right: .4666rem;*/ - /*bottom: .37333rem;*/ - } - .box-card { margin-top: -20px; height: 550px; diff --git a/src/views/register.vue b/src/views/register.vue index 6171533..23b3ad3 100644 --- a/src/views/register.vue +++ b/src/views/register.vue @@ -594,6 +594,19 @@ export default { callback(); } }; + //限制统一信用号 + const validatePatt = (rule, value, callback) => { + if ( + /^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$/.test( + value + ) === false + ) { + callback(new Error("请输入有效的的社会统一信用号")); + } else { + // 校验通过 + callback(); + } + }; return { inputQuery: { nickName: null, @@ -678,6 +691,7 @@ export default { creditNum: [ { required: true, message: "请输入统一社会信用号", trigger: "blur" }, + { validator: validatePatt, trigger: "blur" }, ], area: [{ required: true, message: "请选择所属地区", trigger: "blur" }], detailAddr: [