From f8b256ef152e54c19adb85856f62432d59c16b6e Mon Sep 17 00:00:00 2001
From: DESKTOP-CVS3R96\我恁爹 <11>
Date: Mon, 14 Nov 2022 19:00:29 +0800
Subject: [PATCH] wener~
---
src/page/login/register.vue | 39 ++++++++++++++++++++++-----------------
1 files changed, 22 insertions(+), 17 deletions(-)
diff --git a/src/page/login/register.vue b/src/page/login/register.vue
index 00a1170..4c1d121 100644
--- a/src/page/login/register.vue
+++ b/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
--
Gitblit v1.9.3