XiGuaSSR
2022-11-14 b18fc26a095ca2855d71b59975dab70d72501451
src/page/login/register.vue
@@ -30,17 +30,17 @@
          <div class="user_name">
            <input type="text" placeholder="机构代码" v-model="userName" />
          </div> -->
          <el-input :placeholder="placeholder" :size="medium" v-model="phone" clearable @input="handleInput()">
          <el-input :placeholder="placeholder" size="medium" v-model="phone" clearable @input="handleInput()" maxlength="11">
          </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="密码为6~12位数字、字母或符号" :size="medium"
          <el-input style="margin-top: 0.46rem;" show-password placeholder="密码为6~12位数字、字母或符号" size="medium"
            v-model="userPassword" @input="handleInput()">
          </el-input>
          <el-input style="margin-top: 0.46rem;" show-password placeholder="请再次确认密码" :size="medium" v-model="rePassword"
          <el-input style="margin-top: 0.46rem;" show-password placeholder="请再次确认密码" size="medium" v-model="rePassword"
            @input="handleInput()">
          </el-input>
          <el-input style="margin-top: 0.46rem;" placeholder="邀请码" :size="medium" v-model="userName" clearable
          <el-input style="margin-top: 0.46rem;" placeholder="邀请码" size="medium" v-model="userName" clearable
            @input="handleInput()">
          </el-input>
        </div>
@@ -187,7 +187,6 @@
              setTimeout(() => {
                this.alertShow = false
                this.elType = "warning"
              }, 2000)
            }
          } else {
@@ -236,15 +235,7 @@
          this.alertShow = false
        }, 2000)
        this.loginBtn = false;
      } else
        //   if (isNull(this.code)) {
        //     this.texts="请输入验证码"
        // this.alertShow=true
        // setTimeout(()=>{
        //   this.alertShow=false
        // },2000)
        //     this.loginBtn = false;
        //   } else
      } else {
        if (this.userPassword !== this.rePassword) {
          this.texts = "两次输入的密码不一致"
          this.alertShow = true
@@ -279,16 +270,16 @@
          }
          let data = await api.register(opts)
          if (data.status === 0) {
            this.texts = "注册成功,请登录"
            this.elType = "success"
            this.alertShow = true
            setTimeout(() => {
              this.$router.push('/login')
              this.alertShow = false
              this.elType = "warning"
            }, 2000)
            }, 1000)
            this.loginBtn = false;
            this.$router.push('/login')
          } else {
            this.texts = data.msg
            this.alertShow = true
@@ -298,6 +289,20 @@
            this.loginBtn = false;
          }
        }
      }
      if (navigator.vibrate) {
          // 支持
        navigator.vibrate([55]);
      }
        //   if (isNull(this.code)) {
        //     this.texts="请输入验证码"
        // this.alertShow=true
        // setTimeout(()=>{
        //   this.alertShow=false
        // },2000)
        //     this.loginBtn = false;
        //   } else
    },
    isAgree() {
      this.agree = !this.agree