|
@@ -26,25 +26,25 @@
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="password">
|
|
|
- <el-input v-model="loginForm.password" type="text" auto-complete="off" placeholder="密码" maxlength="20">
|
|
|
+ <el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码" maxlength="12">
|
|
|
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="again">
|
|
|
- <el-input v-model="loginForm.again" type="text" auto-complete="off" placeholder="确认密码" maxlength="20">
|
|
|
+ <el-input v-model="loginForm.again" type="password" auto-complete="off" placeholder="确认密码" maxlength="12">
|
|
|
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-checkbox v-model="loginForm.checked">
|
|
|
- <div class="zap-agreement">
|
|
|
- <span class="zap-agreement__text">我已阅读</span>
|
|
|
- <div class="zap-agreement__link">
|
|
|
- <span>《招采云链服务平台会员注册协议》</span>
|
|
|
- <span>《招采云链服务平台隐私政策》</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <el-checkbox v-model="loginForm.checked" style="margin-bottom: 10px;margin-right: 10px;">
|
|
|
</el-checkbox>
|
|
|
+ <div class="zap-agreement">
|
|
|
+ <span class="zap-agreement__text">我已阅读</span>
|
|
|
+ <div class="zap-agreement__link">
|
|
|
+ <span>《招采云链服务平台会员注册协议》</span>
|
|
|
+ <span>《招采云链服务平台隐私政策》</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
<el-form-item style="width:100%;">
|
|
|
<el-button :loading="loading" class="zap-button" size="medium" type="primary" @click.native.prevent="handleLogin">
|
|
@@ -106,6 +106,13 @@ export default {
|
|
|
},
|
|
|
name: "Login",
|
|
|
data() {
|
|
|
+ const equalToPassword = (rule, value, callback) => {
|
|
|
+ if (this.loginForm.password !== value) {
|
|
|
+ callback(new Error("两次输入的密码不一致"));
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ };
|
|
|
return {
|
|
|
//默认背景图
|
|
|
activeName: "login_shortMessage",
|
|
@@ -146,8 +153,9 @@ export default {
|
|
|
phone: [
|
|
|
{
|
|
|
required: true,
|
|
|
+ pattern: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,
|
|
|
trigger: "blur",
|
|
|
- message: "手机号不能为空",
|
|
|
+ message: "请输入正确的手机号",
|
|
|
},
|
|
|
],
|
|
|
shortMessageCode: [
|
|
@@ -160,8 +168,9 @@ export default {
|
|
|
password: [
|
|
|
{
|
|
|
required: true,
|
|
|
+ pattern: /^(?=.*[a-zA-Z])(?=.*[0-9])[A-Za-z0-9]{6,12}$/,
|
|
|
trigger: "blur",
|
|
|
- message: "密码不能为空",
|
|
|
+ message: "密码必须由字母、数字组成,区分大小写",
|
|
|
},
|
|
|
],
|
|
|
again: [
|
|
@@ -170,6 +179,7 @@ export default {
|
|
|
trigger: "blur",
|
|
|
message: "确认密码不能为空",
|
|
|
},
|
|
|
+ { required: true, validator: equalToPassword, trigger: "blur" }
|
|
|
],
|
|
|
},
|
|
|
loading: false,
|