| | |
| | | data() { |
| | | return { |
| | | codeUrl: "", |
| | | cookiePassword: "", |
| | | cookiePassword: "", |
| | | loginForm: { |
| | | username: "", |
| | | password: "", |
| | |
| | | } |
| | | 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) { |
| | |
| | | align-items: center; |
| | | height: 100%; |
| | | background-position: center center; |
| | | /* 背景图不平铺 */ |
| | | background-repeat: no-repeat; |
| | | /* 当内容高度大于图片高度时,背景图像的位置相对于viewport固定 */ |
| | | background-attachment: fixed; |
| | | /* 让背景图基于容器大小伸缩 */ |
| | | background-size: cover; |
| | | /* 设置背景颜色,背景图加载过程中会显示背景色 */ |
| | | background-color: #464646; |
| | | /* 背景图不平铺 */ |
| | | background-repeat: no-repeat; |
| | | /* 当内容高度大于图片高度时,背景图像的位置相对于viewport固定 */ |
| | | background-attachment: fixed; |
| | | /* 让背景图基于容器大小伸缩 */ |
| | | background-size: cover; |
| | | /* 设置背景颜色,背景图加载过程中会显示背景色 */ |
| | | background-color: #464646; |
| | | background-image: url("../assets/images/login-bgc.jpg"); |
| | | background-size: cover; |
| | | } |