1
jhzh
2025-07-22 421087f05bbcee88211f2b95afd4843da521998b
src/page/login/login.vue
@@ -2,21 +2,22 @@
  <div class="login_page">
    <headers />
    <div class="login_title animated slideInDown">
      <span>{{ $t("登錄賬號") }}</span>
      <span style="font-size: 32px;">{{ $t("登錄賬號") }}</span>
    </div>
    <div class="logins_content">
      <div class="login_forms">
        <div class="top_forms">
          <el-input
          <span style="margin-bottom: 20px;font-size: 16px;">{{ $t("hj27") }}</span>
          <el-input style="margin-bottom: 20px;border-radius: 4px;border: 1px solid #ECE9F2;"
            :placeholder="$t('hj9')"
            :size="medium"
            maxlength="11"
            v-model="userName"
            clearable
          >
          </el-input>
          <span style="margin-bottom: 5px;font-size: 16px;">{{ $t("hj10") }}</span>
          <el-input
            style="margin-top: 0.46rem"
            style="margin-top: 0.46rem;border: 1px solid #ECE9F2;border-radius: 4px;"
            show-password
            :placeholder="$t('hj10')"
            :size="medium"
@@ -33,28 +34,36 @@
            @click="loginIN"
            >{{ $t("立即登录") }}</van-button
          >
          <div class="password-operate" data-v-8cc76a7b="">
            <div class="forget" data-v-8cc76a7b="" @click="getApp()">
              {{ $t("hj12") }}
          <div class="password-operate" >
            <div class="register" data-v-8cc76a7b="">
              {{ $t("還沒賬號?")
              }}<span
                @click="$router.push('/register')"
                >{{ $t("免費註冊") }}</span
              >
            </div>
            <div class="remember" data-v-8cc76a7b="">
            <!-- <div class="remember" data-v-8cc76a7b="">
              <van-checkbox @change="checkboxChange" v-model="checked">{{
                $t("記住帳戶密碼")
              }}</van-checkbox>
            </div> -->
            <div class="forget" data-v-8cc76a7b="" @click="getApp()">
              {{ $t("hj12") }}
            </div>
          </div>
        </div>
      </div>
      <div class="register" data-v-8cc76a7b="">
      <!-- <div class="register" data-v-8cc76a7b="">
        {{ $t("還沒賬號?")
        }}<span
          @click="$router.push('/register')"
          data-v-8cc76a7b=""
          style="color: rgb(5, 106, 239)"
          >{{$t('免費註冊')}}</span
          >{{ $t("免費註冊") }}</span
        >
      </div>
      </div> -->
    </div>
  </div>
</template>
@@ -62,6 +71,7 @@
import headers from "./components/header.vue";
import * as api from "@/axios/api";
import { Notify } from "vant";
import { mapActions, mapMutations } from "vuex";
export default {
  name: "newLogin",
@@ -91,6 +101,8 @@
  },
  methods: {
    ...mapActions(["setUseInfo"]),
    ...mapMutations(["undataToken"]),
    checkboxChange(e) {
      window.localStorage.setItem("login_checked", e);
    },
@@ -114,6 +126,7 @@
      let data = await api.login(opts);
      if (data.status === 0) {
        this.setUseInfo();
        if (this.checked) {
          window.localStorage.setItem(
            "login_admin",
@@ -127,14 +140,13 @@
        }
        this.$store.state.userInfo.phone = this.userName;
        this.$store.state.userInfo.token = data.data.token;
        this.undataToken(data.data.token);
        window.localStorage.setItem("USERTOKEN", data.data.token);
        Notify({ type: "success", message: this.$t("hj36") });
        setTimeout(() => {
          this.$router.push("/home");
        }, 1000);
        window.localStorage.setItem("USERTOKEN", data.data.token);
      } else {
        Notify({ type: "warning", message: data.msg });
      }
@@ -168,10 +180,13 @@
  font-weight: 400;
  font-size: 0.37333rem;
  color: #8c9fad;
  margin: 0 auto;
  padding: 0.34667rem 0.4rem;
  // margin: 0.4rem auto;
  // padding: 0.34667rem 0.4rem;
  // width: 100%;
  // height: 6rem;
  text-align: center;
  span {
    color: rgb(5, 106, 239);
    color: #185546;
  }
}
.login_title {
@@ -198,6 +213,7 @@
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color:#F8FAF9;
}
.logins_content {
@@ -207,7 +223,7 @@
  width: 100%;
  height: 9.7436rem;
  margin-top: 0.4359rem;
  background: #fff;
  // background: #fff;
  // padding: 0 0.4564rem;
  .login_forms {
@@ -219,7 +235,7 @@
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    .top_forms {
      width: 100%;
      height: auto;
@@ -231,7 +247,7 @@
      .password {
        width: 100%;
        height: 50px;
        background: rgb(246, 246, 247);
        background: rgb(254, 254, 255);
        // background: #1e1e1e;
        border-radius: 0.3564rem;
@@ -247,7 +263,7 @@
    /deep/.el-input__inner {
      width: 100%;
      height: 70px;
      background-color: rgb(246, 246, 247) !important;
      background-color: #fff !important;
      // background: #1e1e1e;
      border-radius: 8px;
      font-size: 0.45rem !important;
@@ -263,13 +279,15 @@
        margin-top: 40px;
        height: 60px;
        border-radius: 8px;
        background-color: #185546;
        border: 0.018519rem solid #185546;
      }
      .top_btn {
        border: none;
        width: 100%;
        height: 1.25rem;
        border-radius: 8px;
        background: #0066ed;
        background-color: #185546;
        color: #fff;
        display: flex;
        align-items: center;