Merge branch 'CTP'

ywj_dev
CTP 2 years ago
commit 1bb61a936d

@ -1,5 +1,5 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 供应商自助管理系统 VUE_APP_TITLE = 供应商自助管理平台
# 开发环境配置 # 开发环境配置
ENV = 'development' ENV = 'development'

@ -95,13 +95,15 @@
style=" style="
position: absolute; position: absolute;
bottom: 0; bottom: 0;
margin-left: 36%; font-size: 12px;
font-size: 18px;
color: white; color: white;
width: 100%;
display: flex;
justify-content: center;
" "
> >
<a href="http://www.xmglxp.com/" target="_blank"> <a href="http://www.xmglxp.com/" target="_blank">
软件名称: 医院UDI管理系统 软件名称: 供应商自助管理平台
</a> </a>
<a <a
href="http://www.xmglxp.com/" href="http://www.xmglxp.com/"
@ -158,6 +160,7 @@ export default {
}; };
}, },
methods: { methods: {
//
verifyAlert(text) { verifyAlert(text) {
if (text === "success") { if (text === "success") {
this.loginForm.verificationCode = true; this.loginForm.verificationCode = true;
@ -165,7 +168,7 @@ export default {
this.loginForm.verificationCode = false; this.loginForm.verificationCode = false;
} }
}, },
// handleLogin() { /* // handleLogin() {
// if (!this.ruleForm.verificationCode) { // if (!this.ruleForm.verificationCode) {
// this.$message({ // this.$message({
// message: '', // message: '',
@ -208,7 +211,7 @@ export default {
// return false; // return false;
// } // }
// }); // });
// }, // }, */
getCookie() { getCookie() {
const username = Cookies.get("username"); const username = Cookies.get("username");
@ -224,33 +227,41 @@ export default {
handleLogin() { handleLogin() {
this.$refs.ruleForm.validate((valid) => { this.$refs.ruleForm.validate((valid) => {
if (valid) { if (valid) {
this.loading = true; if (this.loginForm.verificationCode) {
if (this.loginForm.rememberMe) { this.loading = true;
Cookies.set("username", this.loginForm.username, { expires: 30 }); if (this.loginForm.rememberMe) {
Cookies.set("password", encrypt(this.loginForm.password), { Cookies.set("username", this.loginForm.username, { expires: 30 });
expires: 30, Cookies.set("password", encrypt(this.loginForm.password), {
}); expires: 30,
// Cookies.set('rememberMe', this.loginForm.rememberMe, {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 { } else {
Cookies.remove("username"); this.$message({
Cookies.remove("password"); message: "请向右滑动完成验证",
// Cookies.remove('rememberMe'); type: "warning",
}
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();
}
}); });
}
} }
}); });
}, },
@ -287,6 +298,7 @@ $light_gray: #eee;
background-image: url("../assets/login.jpg"); background-image: url("../assets/login.jpg");
background-size: 100vw 100vh; background-size: 100vw 100vh;
height: 100%; height: 100%;
overflow: hidden;
input:-webkit-autofill, input:-webkit-autofill,
input:-webkit-autofill:hover, input:-webkit-autofill:hover,
@ -388,12 +400,6 @@ $light_gray: #eee;
cursor: pointer; cursor: pointer;
} }
.thirdparty-button {
/*position: absolute;*/
/*right: .4666rem;*/
/*bottom: .37333rem;*/
}
.box-card { .box-card {
margin-top: -20px; margin-top: -20px;
height: 550px; height: 550px;

@ -594,6 +594,19 @@ export default {
callback(); 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 { return {
inputQuery: { inputQuery: {
nickName: null, nickName: null,
@ -678,6 +691,7 @@ export default {
creditNum: [ creditNum: [
{ required: true, message: "请输入统一社会信用号", trigger: "blur" }, { required: true, message: "请输入统一社会信用号", trigger: "blur" },
{ validator: validatePatt, trigger: "blur" },
], ],
area: [{ required: true, message: "请选择所属地区", trigger: "blur" }], area: [{ required: true, message: "请选择所属地区", trigger: "blur" }],
detailAddr: [ detailAddr: [

Loading…
Cancel
Save