11
WXL
2024-03-25 9f468e0447a71eb7fcc4f1d78df3be9d348f6fe0
src/views/login.vue
@@ -96,7 +96,7 @@
  data() {
    return {
      codeUrl: "",
      cookiePassword: "",
      cookiePassword: "",
      loginForm: {
        username: "",
        password: "",
@@ -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) {
@@ -206,14 +216,14 @@
  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;
}