|
|
@@ -9,9 +9,9 @@
|
|
|
<el-form :model="passwordRest" :rules="rules" ref="passwordRest" label-width="100px" class="demo-ruleForm">
|
|
|
<el-form-item prop="mobile">
|
|
|
<el-input v-model="passwordRest.mobile"
|
|
|
- v-bind:class="{active: mobileExit}"
|
|
|
+ v-bind:class="{active: mobileIsExit}"
|
|
|
placeholder="新手机号码"></el-input>
|
|
|
- <span class="tip tip-mobile" v-show="mobileExit">该手机已被注册</span>
|
|
|
+ <span class="tip tip-mobile" v-show="mobileIsExit">该手机号未注册</span>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="code">
|
|
|
<el-input type="text" v-model="passwordRest.code"
|
|
|
@@ -93,7 +93,7 @@
|
|
|
callback(new Error('请填写正确的手机号'))
|
|
|
this.getCodeBtnIsDisabled = true
|
|
|
this.mobileChecked = false
|
|
|
- this.mobileExit = false
|
|
|
+ this.mobileIsExit = false
|
|
|
} else {
|
|
|
if (this.passwordRest.mobile !== '') {
|
|
|
var reg = /^1[0-9]{10}$/
|
|
|
@@ -101,18 +101,18 @@
|
|
|
callback(new Error('请填写正确的手机号'))
|
|
|
this.getCodeBtnIsDisabled = true
|
|
|
this.mobileChecked = false
|
|
|
- this.mobileExit = false
|
|
|
+ this.mobileIsExit = false
|
|
|
} else {
|
|
|
- this.$http.get(`/update/user/mobile/hasRegister`, {params: {mobile: this.passwordRest.mobile}})
|
|
|
+ this.$http.get(`/api/user/checkMobile`, {params: {mobile: this.passwordRest.mobile}})
|
|
|
.then(response => {
|
|
|
- if (response.data.content.hasRegister) {
|
|
|
- this.getCodeBtnIsDisabled = true
|
|
|
- this.mobileChecked = false
|
|
|
- this.mobileExit = true
|
|
|
- } else {
|
|
|
+ if (response.data.hasRegister) {
|
|
|
this.getCodeBtnIsDisabled = false
|
|
|
this.mobileChecked = true
|
|
|
- this.mobileExit = false
|
|
|
+ this.mobileIsExit = false
|
|
|
+ } else {
|
|
|
+ this.getCodeBtnIsDisabled = true
|
|
|
+ this.mobileChecked = false
|
|
|
+ this.mobileIsExit = true
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
@@ -353,7 +353,7 @@
|
|
|
contactNameChecked: false,
|
|
|
contactTelChecked: false,
|
|
|
contactEmailChecked: false,
|
|
|
- mobileExit: false,
|
|
|
+ mobileIsExit: false,
|
|
|
rules: {
|
|
|
mobile: [
|
|
|
{validator: validateMobile, trigger: 'blur'}
|