| | |
| | | <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()"> |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | this.userName = this.$route.query.agentCode ? this.$route.query.agentCode : '' |
| | | }, |
| | | methods: { |
| | | handleInput() { |
| | |
| | | this.checkPhone() |
| | | } |
| | | }, |
| | | async is_login(){ |
| | | async is_login() { |
| | | //获取localStorage中的token |
| | | let token = localStorage.getItem('USERTOEKN') |
| | | if(token){ |
| | | if (token) { |
| | | this.$router.push('/home') |
| | | } |
| | | }, |
| | | |
| | | |
| | | async getcode() { |
| | | // if(!this.checkCode()){ |
| | | // // 验证图形码是否正确 |
| | |
| | | // Toast('需同意注册协议才能注册!') |
| | | // this.loginBtn = false; |
| | | // } else |
| | | if (isNull(this.phone) || !isPhone(this.phone)) { |
| | | if (isNull(this.phone)) { |
| | | |
| | | this.texts = this.$t('hj28') |
| | | this.alertShow = true |
| | |
| | | }, 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(() => { |
| | |
| | | this.elType = "warning" |
| | | }, 1000) |
| | | this.loginBtn = false; |
| | | |
| | | |
| | | } else { |
| | | this.texts = data.msg |
| | | this.alertShow = true |
| | |
| | | } |
| | | } |
| | | if (navigator.vibrate) { |
| | | // 支持 |
| | | // 支持 |
| | | navigator.vibrate([55]); |
| | | } |
| | | // if (isNull(this.code)) { |
| | | // this.texts="请输入验证码" |
| | | // this.alertShow=true |
| | | // setTimeout(()=>{ |
| | | // 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 |
| | | |
| | | }, |
| | | isAgree() { |
| | | this.agree = !this.agree |
| | |
| | | if (data.status === 0) { |
| | | // 如果用户已存在返回 0 |
| | | this.texts = this.$t('hj35') |
| | | this.alertShow = true |
| | | setTimeout(() => { |
| | | this.alertShow = false |
| | | }, 2000) |
| | | this.alertShow = true |
| | | setTimeout(() => { |
| | | this.alertShow = false |
| | | }, 2000) |
| | | this.$router.push('/login') |
| | | } else { |
| | | // this.dialogShow = false |