From bb8e69f5322ff24edc70e5f2da502e74e4d5eb2e Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期一, 13 五月 2024 18:02:26 +0800 Subject: [PATCH] 11 --- src/views/login.vue | 25 ++++++++++++++++++++++--- 1 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/views/login.vue b/src/views/login.vue index c529a77..df7a011 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -182,10 +182,20 @@ } this.$store .dispatch("Login", this.loginForm) - .then(() => { - this.$router.push({ path: this.redirect || "/" }).catch(() => {}); + .then(res => { + console.log(this.$store.state.user.code, "44"); + console.log(this.$store.state.user.msg, "22"); + if (this.$store.state.user.code == 200) { + this.$router + .push({ path: this.redirect || "/" }) + .catch(() => {}); + } else { + this.loading = false; + this.$message.error(this.$store.state.user.msg); + } }) - .catch(() => { + .catch(err => { + console.log(err); this.loading = false; // this.$message.error("鐧婚檰澶辫触璇烽噸璇曘��"); if (this.captchaOnOff) { @@ -205,6 +215,15 @@ justify-content: center; align-items: center; height: 100%; + background-position: center center; + /* 鑳屾櫙鍥句笉骞抽摵 */ + background-repeat: no-repeat; + /* 褰撳唴瀹归珮搴﹀ぇ浜庡浘鐗囬珮搴︽椂锛岃儗鏅浘鍍忕殑浣嶇疆鐩稿浜巚iewport鍥哄畾 */ + background-attachment: fixed; + /* 璁╄儗鏅浘鍩轰簬瀹瑰櫒澶у皬浼哥缉 */ + background-size: cover; + /* 璁剧疆鑳屾櫙棰滆壊锛岃儗鏅浘鍔犺浇杩囩▼涓細鏄剧ず鑳屾櫙鑹� */ + background-color: #464646; background-image: url("../assets/images/login-bgc.jpg"); background-size: cover; } -- Gitblit v1.9.3