|
@@ -21,38 +21,38 @@
|
|
|
<el-input v-model="form.phone_or_email" @change="ChangeEmail" />
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="verification_code" label="邮箱验证码">
|
|
|
- <el-input style="width: 202px" v-model="form.verification_code" maxlength="6" />
|
|
|
+ <el-input v-model="form.verification_code" style="width: 202px" maxlength="6" />
|
|
|
<button v-if="VerificationCodeShow" class="waitTime" disabled>
|
|
|
{{ time + 's' }}
|
|
|
</button>
|
|
|
- <button type="button" v-else @click.prevent="getVerificationCode" :class="['getVerification']">获取</button>
|
|
|
+ <button v-else type="button" :class="['getVerification']" @click.prevent="getVerificationCode">获取</button>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="org_id" label="机构">
|
|
|
<el-select v-model="form.org_id" filterable>
|
|
|
- <el-option v-for="item in institutionList" :key="item.id" :value="item.id" :label="item.name"></el-option>
|
|
|
+ <el-option v-for="item in institutionList" :key="item.id" :value="item.id" :label="item.name" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="password" label="密码">
|
|
|
<el-input
|
|
|
v-model="form.password"
|
|
|
:type="parsswordType"
|
|
|
+ maxlength="12"
|
|
|
@change="changeParssword"
|
|
|
@input="trimInput('password')"
|
|
|
- maxlength="12"
|
|
|
/>
|
|
|
<img
|
|
|
v-show="parsswordType == 'password'"
|
|
|
- @click="lookParssowrd(1)"
|
|
|
:class="['rightimg']"
|
|
|
src="@/assets/password1.png"
|
|
|
alt=""
|
|
|
+ @click="lookParssowrd(1)"
|
|
|
/>
|
|
|
<img
|
|
|
v-show="parsswordType == 'text'"
|
|
|
- @click="lookParssowrd(1)"
|
|
|
:class="['rightimg']"
|
|
|
src="@/assets/password2.png"
|
|
|
alt=""
|
|
|
+ @click="lookParssowrd(1)"
|
|
|
/>
|
|
|
<p :class="passwordError ? 'textRed' : 'psswordHint'">请输入8-12位大写字母、小写字母和数字组合。</p>
|
|
|
</el-form-item>
|
|
@@ -60,23 +60,23 @@
|
|
|
<el-input
|
|
|
v-model="form.confirmPwd"
|
|
|
:type="twoPasswordType"
|
|
|
+ maxlength="12"
|
|
|
@change="Changetowpassword"
|
|
|
@input="trimInput('confirmPwd')"
|
|
|
- maxlength="12"
|
|
|
/>
|
|
|
<img
|
|
|
v-show="twoPasswordType == 'password'"
|
|
|
- @click="lookParssowrd(2)"
|
|
|
:class="['rightimg']"
|
|
|
src="@/assets/password1.png"
|
|
|
alt=""
|
|
|
+ @click="lookParssowrd(2)"
|
|
|
/>
|
|
|
<img
|
|
|
v-show="twoPasswordType == 'text'"
|
|
|
- @click="lookParssowrd(2)"
|
|
|
:class="['rightimg']"
|
|
|
src="@/assets/password2.png"
|
|
|
alt=""
|
|
|
+ @click="lookParssowrd(2)"
|
|
|
/>
|
|
|
<p :class="passwordErrorTwo ? 'textRed' : 'psswordHint'">请再次输入密码。这两项必须相同。</p>
|
|
|
</el-form-item>
|
|
@@ -94,9 +94,9 @@
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button :loading="isLogin" class="submit" type="primary" @click="submitForm('registerForm')"
|
|
|
- >注册</el-button
|
|
|
- >
|
|
|
+ <el-button :loading="isLogin" class="submit" type="primary" @click="submitForm('registerForm')">
|
|
|
+ 注册
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</main>
|
|
@@ -108,7 +108,7 @@
|
|
|
:close-on-click-modal="false"
|
|
|
class="login-userAgree"
|
|
|
>
|
|
|
- <userAgreement class="userAgree-login" :changeAgreement="changeAgreement" />
|
|
|
+ <userAgreement class="userAgree-login" :change-agreement="changeAgreement" />
|
|
|
</el-dialog>
|
|
|
<el-dialog
|
|
|
:visible.sync="registerFlag"
|
|
@@ -117,7 +117,7 @@
|
|
|
:show-close="false"
|
|
|
:close-on-click-modal="false"
|
|
|
>
|
|
|
- <el-result icon="success" title="注册申请已提交" subTitle="等待系统审核,通知将以邮件形式发送,请注意查收。">
|
|
|
+ <el-result icon="success" title="注册申请已提交" sub-title="等待系统审核,通知将以邮件形式发送,请注意查收。">
|
|
|
<template slot="extra">
|
|
|
<el-button type="primary" size="medium" @click="goLogin">回到登录</el-button>
|
|
|
</template>
|
|
@@ -197,7 +197,7 @@ export default {
|
|
|
institutionList: [],
|
|
|
parsswordType: 'password',
|
|
|
twoPasswordType: 'password',
|
|
|
- EmailError: null, //邮箱是否正确
|
|
|
+ EmailError: null, // 邮箱是否正确
|
|
|
passwordError: false,
|
|
|
passwordErrorTwo: false,
|
|
|
isLogin: false,
|
|
@@ -231,8 +231,8 @@ export default {
|
|
|
this.$message.warning('阅读并同意用户协议');
|
|
|
return;
|
|
|
}
|
|
|
- if (this.form.confirmPwd != this.form.password) {
|
|
|
- //Key544
|
|
|
+ if (this.form.confirmPwd !== this.form.password) {
|
|
|
+ // Key544
|
|
|
this.$message.warning('两次密码不一致');
|
|
|
return;
|
|
|
}
|
|
@@ -257,24 +257,22 @@ export default {
|
|
|
},
|
|
|
// 查看密码
|
|
|
lookParssowrd(number) {
|
|
|
- if (number == 1) {
|
|
|
- if (this.parsswordType == 'text') {
|
|
|
+ if (number === 1) {
|
|
|
+ if (this.parsswordType === 'text') {
|
|
|
this.parsswordType = 'password';
|
|
|
} else {
|
|
|
this.parsswordType = 'text';
|
|
|
}
|
|
|
+ } else if (this.twoPasswordType === 'text') {
|
|
|
+ this.twoPasswordType = 'password';
|
|
|
} else {
|
|
|
- if (this.twoPasswordType == 'text') {
|
|
|
- this.twoPasswordType = 'password';
|
|
|
- } else {
|
|
|
- this.twoPasswordType = 'text';
|
|
|
- }
|
|
|
+ this.twoPasswordType = 'text';
|
|
|
}
|
|
|
},
|
|
|
// 验证密码
|
|
|
changeParssword() {
|
|
|
if (this.form.password) {
|
|
|
- //let reg = /^(?=.*[0-9].*)(?=.*[A-Z].*)(?=.*[a-z].*).{8,12}$/;
|
|
|
+ // let reg = /^(?=.*[0-9].*)(?=.*[A-Z].*)(?=.*[a-z].*).{8,12}$/;
|
|
|
let reg = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z\d]{8,12}$/;
|
|
|
let result = reg.test(this.form.password);
|
|
|
if (result) {
|
|
@@ -290,14 +288,13 @@ export default {
|
|
|
if (this.form.confirmPwd !== this.form.password) {
|
|
|
this.passwordErrorTwo = true;
|
|
|
return;
|
|
|
- } else {
|
|
|
- this.passwordErrorTwo = false;
|
|
|
}
|
|
|
+ this.passwordErrorTwo = false;
|
|
|
}
|
|
|
},
|
|
|
// 验证邮箱
|
|
|
ChangeEmail() {
|
|
|
- let reg = /^[a-zA-Z0-9_\.-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/; //验证邮箱的正则
|
|
|
+ let reg = /^[a-zA-Z0-9_\.-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/; // 验证邮箱的正则
|
|
|
this.EmailError = reg.test(this.form.phone_or_email);
|
|
|
if (!this.EmailError) {
|
|
|
this.EmailError = false;
|