1
PC-20250623MANY\Administrator
2025-08-09 7043590a8a1d24a4c86472051c103a8e4dc2ddb4
src/page/login/register.vue
@@ -7,68 +7,40 @@
    <div class="logins_content">
      <div class="login_forms">
        <div class="top_forms">
          <el-input
            :placeholder="placeholder"
            size="medium"
            v-model="phone"
            clearable
            @input="handleInput()"
          >
          <el-input :placeholder="placeholder" size="medium" v-model="phone" maxlength="10" clearable
            @input="handleInput()">
            <template slot="prepend">+91</template>
          </el-input>
          <!-- <el-input style="margin-top: 0.46rem;" :placeholder="verification" :size="medium" v-model="code" clearable>
          </el-input> -->
          <el-input
            style="margin-top: 0.46rem"
            show-password
            :placeholder="$t('hj19')"
            size="medium"
            v-model="userPassword"
            @input="handleInput()"
          >
          <el-input style="margin-top: 0.46rem" show-password :placeholder="$t('hj19')" size="medium"
            v-model="userPassword" @input="handleInput()">
          </el-input>
          <el-input
            style="margin-top: 0.46rem"
            show-password
            :placeholder="$t('hj20')"
            size="medium"
            v-model="rePassword"
            @input="handleInput()"
          >
          <el-input style="margin-top: 0.46rem" show-password :placeholder="$t('hj20')" size="medium"
            v-model="rePassword" @input="handleInput()">
          </el-input>
          <el-input
            style="margin-top: 0.46rem"
            :placeholder="$t('hj21')"
            size="medium"
            v-model="userName"
            clearable
            @input="handleInput()"
          >
          <el-input style="margin-top: 0.46rem" :placeholder="$t('hj21')" size="medium" v-model="userName" clearable
            @input="handleInput()">
          </el-input>
        </div>
        <div
          class="radio-con"
          style="display: flex; align-items: center; font-size: 14px"
        >
        <div class="radio-con" style="display: flex; align-items: center; font-size: 14px">
          <van-checkbox v-model="checked">{{
            $t("我已閱讀並同意")
          }}</van-checkbox>
          <span style="color: rgb(5, 106, 239)">{{
          <span @click="gotoxy" style="color: #c4d600">{{
            $t("《用戶服務協議》")
          }}</span>
        </div>
        <div class="bottom_btns" :class="btnClass ? 'on' : 'off'">
          <van-button
            type="info"
            :disabled="!btnClass"
            class="butn"
            @click="gook"
            >{{ $t("立即注册") }}</van-button
          >
          <van-button type="info" :disabled="!btnClass" class="butn" @click="gook">{{ $t("立即注册") }}</van-button>
          <div class="register" @click="$router.push('/login')">
          <van-button type="info" class="butn_2" plain @click="$router.push('/login')">
            {{ $t("已有賬號?") + $t("馬上登錄") }}
          </van-button>
          <!-- <div class="register" @click="$router.push('/login')">
            {{ $t("已有賬號?")
            }}<span style="color: rgb(5, 106, 239)">{{ $t("馬上登錄") }}</span>
          </div>
            }}<span style="color: #c4d600">{{ $t("馬上登錄") }}</span>
          </div> -->
        </div>
      </div>
    </div>
@@ -84,7 +56,7 @@
export default {
  components: {
    headers,
    headers
  },
  name: "newRegister",
  data() {
@@ -99,7 +71,7 @@
      code: "",
      userPassword: "",
      btnClass: false,
      rePassword: "",
      rePassword: ""
    };
  },
  mounted() {
@@ -108,6 +80,9 @@
      : "";
  },
  methods: {
    gotoxy() {
      this.$router.push("/help_fwxy");
    },
    handleInput() {
      if (
        this.userPassword !== "" &&
@@ -122,18 +97,14 @@
    },
    async gook() {
      if (isNull(this.phone)) {
      if (this.phone.length == 0) {
        Notify({ type: "warning", message: this.$t("hj28") });
      } else if (isNull(this.userPassword)) {
        Notify({ type: "warning", message: this.$t("hj30") });
      } else if (isNull(this.rePassword)) {
        Notify({ type: "warning", message: this.$t("hj31") });
      } else {
        if (!/(^[1-9]\d*$)/.test(this.phone)) {
          Notify({ type: "warning", message: this.$t("hj28") });
        } else if (this.phone.toString().length != 10) {
          Notify({ type: "warning", message: this.$t("hj28") });
        } else if (this.userPassword !== this.rePassword) {
        if (this.userPassword !== this.rePassword) {
          this.password = 0;
          this.password2 = 0;
          Notify({ type: "warning", message: this.$t("hj32") });
@@ -147,7 +118,7 @@
            phone: this.phone,
            yzmCode: "6666",
            userPwd: this.userPassword,
            agentCode: this.userName,
            agentCode: this.userName
          };
          let data = await api.register(opts);
          if (data.status === 0) {
@@ -163,35 +134,46 @@
        // 支持
        navigator.vibrate([55]);
      }
    },
  },
    }
  }
};
</script>
<style  scoped lang="less">
<style scoped lang="less">
@green: #c4d600;
.register {
  font-style: normal;
  font-weight: 400;
  font-weight: 500;
  font-size: 0.37333rem;
  color: #8c9fad;
  text-align: center;
  margin: 0 auto;
  margin-top: 10px;
  margin: 20px auto;
  // margin-top: 10px;
}
.radio-con {
  margin-top: 0.32rem;
}
/deep/ .van-checkbox__icon--checked .van-icon {
  background: @green;
  border-color: @green;
}
/deep/ .van-checkbox__label {
  font-style: normal;
  font-weight: 400;
  font-weight: 500;
  font-size: 0.37333rem;
  line-height: 0.53333rem;
  color: #8c9fad;
}
/deep/ .van-button__text {
  font-size: 24px;
  font-family: "DINPro";
}
.login_title {
  font-family: "DINPro", serif;
  font-style: normal;
@@ -201,6 +183,7 @@
  color: #14181f;
  margin-left: 0.53333rem;
}
.login_page {
  position: relative;
  width: 100%;
@@ -233,7 +216,7 @@
    color: #000;
    font-weight: 600 !important;
    > span {
    >span {
      font-weight: 600 !important;
    }
  }
@@ -263,7 +246,7 @@
        // background: #1e1e1e;
        border-radius: 0.3564rem;
        > input {
        >input {
          width: 100%;
          height: 100%;
          padding-left: 0.3564rem;
@@ -277,7 +260,7 @@
      height: 70px;
      background-color: rgb(246, 246, 247) !important;
      // background: #1e1e1e;
      border-radius: 8px;
      // border-radius: 8px;
      font-size: 0.45rem !important;
      border: none;
    }
@@ -285,13 +268,27 @@
    .bottom_btns {
      width: 100%;
      height: 3.3333rem;
      // margin-top: 0.8528rem;
      .butn {
        width: 100%;
        margin-top: 40px;
        height: 60px;
        border-radius: 8px;
        background-color: @green;
        border-color: @green;
      }
      .butn_2 {
        width: 100%;
        margin-top: 40px;
        height: 60px;
        border-radius: 8px;
        color: @green;
        border-color: @green;
        margin-top: .4rem;
      }
      .mes {
        width: 100%;
        height: 20%;
@@ -336,7 +333,7 @@
    align-items: center;
    justify-content: center;
    > span {
    >span {
      font-size: 0.3046rem;
      color: #000;
      background-color: #fff;
@@ -397,7 +394,7 @@
    width: 3rem;
    height: 3.5769rem;
    > img {
    >img {
      width: 100%;
      height: 100%;
    }
@@ -440,6 +437,12 @@
  font-size: 0.5rem !important;
}
/deep/ .el-input-group__prepend {
  border: none !important;
  border-radius: 0 !important;
  font-size: 0.45rem !important;
}
.on .top_btn {
  background: #2d8cf0 !important;
}