jhzh
2024-03-23 0d29d9a2bf0d893a67f1263bb9525131a50a2128
src/page/login/register.vue
@@ -30,15 +30,15 @@
          <div class="user_name">
            <input type="text" placeholder="机构代码" v-model="userName" />
          </div> -->
          <el-input :placeholder="placeholder" size="medium" v-model="phone" clearable @input="handleInput()" maxlength="11">
          <el-input :placeholder="placeholder" size="medium" v-model="phone" clearable @input="handleInput()">
          </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>
          <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()">
@@ -103,7 +103,7 @@
    }
  },
  mounted() {
    this.userName = this.$route.query.agentCode ? this.$route.query.agentCode : ''
  },
  methods: {
    handleInput() {
@@ -213,7 +213,7 @@
      //   Toast('需同意注册协议才能注册!')
      //   this.loginBtn = false;
      // } else
      if (isNull(this.phone) || !isPhone(this.phone)) {
      if (isNull(this.phone)) {
        this.texts = this.$t('hj28')
        this.alertShow = true
@@ -236,7 +236,23 @@
        }, 2000)
        this.loginBtn = false;
      } else {
        if (this.userPassword !== this.rePassword) {
        if (!(/(^[1-9]\d*$)/.test(this.phone))) {
          this.texts = this.$t('hj28')
          this.alertShow = true
          setTimeout(() => {
            this.alertShow = false
          }, 2000)
          this.loginBtn = false;
        }
        else if (this.phone.toString().length != 10) {
          this.texts = this.$t('hj28')
          this.alertShow = true
          setTimeout(() => {
            this.alertShow = false
          }, 2000)
          this.loginBtn = false;
        }
        else if (this.userPassword !== this.rePassword) {
          this.texts = this.$t('hj32')
          this.alertShow = true
          setTimeout(() => {