管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-05-16 dae8fb08b9ff7327da86ed249c9c97a87c90e6f2
src/components/login.vue
@@ -44,7 +44,7 @@
        <el-form-item prop="uid">
          <el-input
            v-model="loginForm.uid"
            placeholder="输入您的账号或手机号"
            placeholder="输入登录账号"
            class="nobr"
            size="meddle"
            autocomplete="off"
@@ -60,7 +60,7 @@
          <el-input
            show-password
            v-model="loginForm.pwd"
            placeholder="输入您的密码"
            placeholder="请输入登录密码"
            class="nobr"
            autocomplete="off"
          >
@@ -76,7 +76,7 @@
            <el-form-item prop="validCode">
              <el-input
                v-model="loginForm.validCode"
                placeholder="输入验证码(忽略大小写)"
                placeholder="请输入验证码(忽略大小写)"
                class="nobr"
              ></el-input>
            </el-form-item>
@@ -108,13 +108,8 @@
        <el-form-item>
          <el-button
            type="primary"
            class="nobr"
            style="
              width: 384px;
              height: 50px;
              background: #3b4d6e;
              border-radius: 5px;
            "
            class="nobr loginbtn"
            style=""
            :loading="loading"
            @click="submitForm('loginForm')"
          >登录</el-button>
@@ -158,13 +153,16 @@
        callback();
      }
    };
    // loginForm: {
    //     uid: "admin",
    //     pwd: "Admin@1234_lf",
    //   }
    return {
      validCode: "",
      loading: false,
      loginForm: {
        uid: "admin",
        pwd: "Admin@1234_lf",
        uid: "",
        pwd: "",
      },
      rules: {
        uid: [{ validator: validUserName, trigger: "blur" }],
@@ -179,6 +177,9 @@
    this.getpublickey();
  },
  methods: {
    handlePaste(e) {
      e.preventDefault();
    },
    //   获取vuex中Actions里的方法
    ...mapActions(["login", "getpublickey"]),
    getCode(data) {
@@ -193,11 +194,15 @@
            .then((response) => {
              if (response.code != 200) {
                this.loading = false;
                Message({
                this.$message({
                  message: response.msg,
                  type: "error",
                  duration: 5 * 1000,
                });
                // Message({
                //   message: response.msg,
                //   type: "error",
                //   duration: 5 * 1000,
                // });
                return;
              }
@@ -217,6 +222,11 @@
                    sessionStorage.setItem("routerName", "/Thematic");
                    sessionStorage.setItem("changeSelectStyle", 1);
                    this.$router.push("/");
                  } else {
                    this.$message({
                      message: "请您联系管理员分配角色菜单",
                      type: "error",
                    });
                  }
                  this.loading = false;
                } else {
@@ -249,6 +259,7 @@
        time: timeData,
        userid: res.result.createUser,
        expire: res.result.expire,
        autoLogOut: res.result.autoLogOut,
      };
      LfPrems = JSON.stringify(LfPrems);
      localStorage.setItem("LFToken", LfPrems);
@@ -307,7 +318,7 @@
}
.title_img {
  position: absolute;
  left: 17%;
  left: 20%;
  top: 8%;
  width: 20%;
  /* transform: translateX(-50%); */
@@ -364,4 +375,10 @@
  border: 0;
  padding: 0 !important;
}
.loginbtn {
  width: 384px;
  height: 50px;
  background: #3b4d6e;
  border-radius: 5px;
}
</style>