| | |
| | | </div> --> |
| | | <div class="logins_content"> |
| | | <div class="login_title animated slideInDown"> |
| | | <span>{{ '手机注册' }}</span> |
| | | <span>{{ $t('hj18') }}</span> |
| | | </div> |
| | | <div class="login_forms"> |
| | | <div class="top_forms"> |
| | |
| | | </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="$t('hj19')" 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="$t('hj20')" 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="$t('hj21')" size="medium" v-model="userName" clearable |
| | | @input="handleInput()"> |
| | | </el-input> |
| | | </div> |
| | | <div class="bottom_btns" :class="btnClass ? 'on' : 'off'"> |
| | | <div class="top_btn " @click="gook" :class="dengl ? 'animated pulse' : ''"> |
| | | <span>{{ '安全注册' }}</span> |
| | | <span>{{ $t('hj22') }}</span> |
| | | </div> |
| | | <!-- <div |
| | | class="register-form-item agree-model" |
| | |
| | | <a style="color:#fff">《注册协议》</a> |
| | | </div> --> |
| | | <div class="mes"> |
| | | <span>{{ '已有账户?' }}</span> |
| | | <span @click="$router.push('/login')" style="color: rgb(54,124,248);">{{ '登录>' }}</span> |
| | | <span>{{ $t('hj23') }}?</span> |
| | | <span @click="$router.push('/login')" style="color: rgb(54,124,248);"> {{ $t('hj24') }} ></span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | name: "newRegister", |
| | | data() { |
| | | return { |
| | | verification: "验证码", |
| | | loginWay: "手机号注册", |
| | | loginWay: "手机号注册", |
| | | placeholder: "手机号", |
| | | verification: this.$t('hj25'), |
| | | loginWay: this.$t('hj26'), |
| | | loginWay: this.$t('hj26'), |
| | | placeholder: this.$t('hj27'), |
| | | Logo, |
| | | phone: "", |
| | | userName: "", |
| | |
| | | checkCodeBox() { |
| | | if (isNull(this.phone) || !isPhone(this.phone)) { |
| | | // Toast('请输入正确的手机号') |
| | | this.texts = "请输入正确的手机号" |
| | | this.texts = this.$t('hj28') |
| | | this.alertShow = true |
| | | setTimeout(() => { |
| | | this.alertShow = false |
| | |
| | | // var reg = 11 && /^((13|14|15|17|18)[0-9]{1}\d{8})$/ |
| | | let reg = /^[0-9]{11}$/ // 手机号码验证 |
| | | if (isNull(this.phone)) { |
| | | this.texts = "手机号不能为空" |
| | | this.texts = this.$t('hj29') |
| | | this.alertShow = true |
| | | setTimeout(() => { |
| | | this.alertShow = false |
| | | }, 2000) |
| | | } else { |
| | | if (!reg.test(this.phone)) { |
| | | this.texts = "请输入正确的手机号码" |
| | | this.texts = this.$t('hj28') |
| | | this.alertShow = true |
| | | setTimeout(() => { |
| | | this.alertShow = false |
| | |
| | | // } else |
| | | if (isNull(this.phone) || !isPhone(this.phone)) { |
| | | |
| | | this.texts = "请输入正确的手机号码" |
| | | this.texts = this.$t('hj28') |
| | | this.alertShow = true |
| | | setTimeout(() => { |
| | | this.alertShow = false |
| | | }, 2000) |
| | | this.loginBtn = false; |
| | | } else if (isNull(this.userPassword)) { |
| | | this.texts = "请输入密码" |
| | | this.texts = this.$t('hj30') |
| | | this.alertShow = true |
| | | setTimeout(() => { |
| | | this.alertShow = false |
| | | }, 2000) |
| | | this.loginBtn = false; |
| | | } else if (isNull(this.rePassword)) { |
| | | this.texts = "请确认密码" |
| | | this.texts = this.$t('hj31') |
| | | this.alertShow = true |
| | | setTimeout(() => { |
| | | this.alertShow = false |
| | |
| | | this.loginBtn = false; |
| | | } else { |
| | | if (this.userPassword !== this.rePassword) { |
| | | this.texts = "两次输入的密码不一致" |
| | | this.texts = this.$t('hj32') |
| | | this.alertShow = true |
| | | setTimeout(() => { |
| | | this.alertShow = false |
| | |
| | | this.loginBtn = false; |
| | | } else if (!pwdReg(this.userPassword)) { |
| | | |
| | | this.texts = "密码为6~12位,数字、字母或符号" |
| | | this.texts = this.$t('hj19') |
| | | this.alertShow = true |
| | | setTimeout(() => { |
| | | this.alertShow = false |
| | | }, 2000) |
| | | this.loginBtn = false; |
| | | } else if (isNull(this.userName)) { |
| | | this.texts = "请输入邀请码" |
| | | this.texts = this.$t('hj33') |
| | | this.alertShow = true |
| | | setTimeout(() => { |
| | | this.alertShow = false |
| | |
| | | } |
| | | let data = await api.register(opts) |
| | | if (data.status === 0) { |
| | | this.texts = "注册成功,请登录" |
| | | this.texts = this.$t('hj34') |
| | | this.elType = "success" |
| | | this.alertShow = true |
| | | setTimeout(() => { |
| | |
| | | let data = await api.checkPhone({ phoneNum: this.phone }) |
| | | if (data.status === 0) { |
| | | // 如果用户已存在返回 0 |
| | | this.texts = "用户已注册,请登录" |
| | | this.texts = this.$t('hj35') |
| | | this.alertShow = true |
| | | setTimeout(() => { |
| | | this.alertShow = false |