|
|
@@ -22,7 +22,7 @@
|
|
|
@click="getCheckCode"
|
|
|
:disabled="getCodeBtnIsDisabled">获取验证码</el-button>
|
|
|
<el-button type="primary" v-show="!sendEnterpriseCode" class="code code-send">已发送({{enterprise_time}}s)</el-button>
|
|
|
- <!--<span v-show="codeErrorChecked" class="codeError-tip">验证码输入错误</span>-->
|
|
|
+ <span v-show="codeErrorChecked" class="codeError-tip">{{codeErrorMsg}}</span>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<a class="btn finish"
|
|
|
@@ -70,13 +70,15 @@
|
|
|
auto-complete="off"
|
|
|
placeholder="密码确认"
|
|
|
v-bind:class="{ correct: this.passwordChecked }"></el-input>
|
|
|
- <span class="sure" v-if="isHasRegister" v-show="phoneIsRegisterTip">手机号已注册,请输入原密码 <a>忘记密码?</a></span>
|
|
|
+ <span class="sure" v-if="isHasRegister" v-show="phoneIsRegisterTip">手机号已注册,请输入原密码 <a href="/reset/ForgetPasswordValidationAccount">忘记密码?</a></span>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="confirm" v-if="!isHasRegister">
|
|
|
<el-input type="password"
|
|
|
auto-complete="off"
|
|
|
placeholder="密码确认"
|
|
|
+ v-bind:class="{active: showPasswordError}"
|
|
|
v-model="enterprise1.confirm"></el-input>
|
|
|
+ <span class="tip passwordError" v-show="showPasswordError">两次输入密码不一致</span>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="email" v-if="!isHasEmail">
|
|
|
<el-input type="text" v-model="enterprise1.email" auto-complete="off" placeholder="联系邮箱"></el-input>
|
|
|
@@ -139,8 +141,10 @@
|
|
|
this.codeChecked = false
|
|
|
} else {
|
|
|
if (this.enterprise.code !== '') {
|
|
|
- if (this.token !== '') {
|
|
|
- if (this.enterprise.code !== '' && this.enterprise.mobile !== '') {
|
|
|
+ if (this.enterprise.mobile === '') {
|
|
|
+ callback(new Error('请先填写正确的手机号'))
|
|
|
+ } else {
|
|
|
+ if (this.token) {
|
|
|
let param = new FormData()
|
|
|
param.append('mobile', this.enterprise.mobile)
|
|
|
param.append('code', this.enterprise.code)
|
|
|
@@ -159,10 +163,16 @@
|
|
|
return Promise.reject(response.data)
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
- this.$message.error(err.errMsg)
|
|
|
+ this.codeErrorChecked = true
|
|
|
+ this.codeErrorMsg = err.errMsg
|
|
|
+ // this.$message.error(err.errMsg)
|
|
|
})
|
|
|
+ } else {
|
|
|
+ callback(new Error('请先获取验证码'))
|
|
|
+ this.codeChecked = false
|
|
|
+ this.codeErrorChecked = false
|
|
|
}
|
|
|
- } else {}
|
|
|
+ }
|
|
|
}
|
|
|
callback()
|
|
|
}
|
|
|
@@ -204,7 +214,7 @@
|
|
|
this.isBusinessCodeExist = false
|
|
|
} else {
|
|
|
if (this.enterprise1.businessCode !== '') {
|
|
|
- let reg = /^[0-9]*$/
|
|
|
+ let reg = /^[A-Za-z0-9]+$/
|
|
|
if (reg.test(value)) {
|
|
|
if (value.length > 20) {
|
|
|
callback(new Error('输入长度过长,20个字符以内'))
|
|
|
@@ -320,6 +330,17 @@
|
|
|
callback(new Error('密码须为8-20字符的英文、数字混合'))
|
|
|
this.passwordChecked = false
|
|
|
}
|
|
|
+ if (this.enterprise1.confirm !== '') {
|
|
|
+ if (value !== this.enterprise1.confirm) {
|
|
|
+ this.showPasswordError = true
|
|
|
+ // callback(new Error('两次输入密码不一致!'))
|
|
|
+ this.passwordConfirmChecked = false
|
|
|
+ } else {
|
|
|
+ this.passwordConfirmChecked = true
|
|
|
+ this.showPasswordError = false
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
callback()
|
|
|
}
|
|
|
@@ -332,10 +353,14 @@
|
|
|
if (value === '') {
|
|
|
callback(new Error('请再次输入密码'))
|
|
|
this.passwordConfirmChecked = false
|
|
|
+ this.showPasswordError = false
|
|
|
} else if (value !== this.enterprise1.password) {
|
|
|
- callback(new Error('两次输入密码不一致!'))
|
|
|
+ // callback(new Error('两次输入密码不一致!'))
|
|
|
+ this.showPasswordError = true
|
|
|
+ this.passwordConfirmChecked = false
|
|
|
} else {
|
|
|
this.passwordConfirmChecked = true
|
|
|
+ this.showPasswordError = false
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
@@ -376,7 +401,9 @@
|
|
|
confirm: '',
|
|
|
email: ''
|
|
|
},
|
|
|
+ showPasswordError: false,
|
|
|
isShowLoading: false,
|
|
|
+ codeErrorMsg: '',
|
|
|
checked: true,
|
|
|
getCodeBtnIsDisabled: true,
|
|
|
mobileChecked: false,
|
|
|
@@ -462,6 +489,7 @@
|
|
|
}, 1000)
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
+ this.isShowLoading = false
|
|
|
this.$message.error(err.errMsg)
|
|
|
})
|
|
|
},
|
|
|
@@ -508,15 +536,16 @@
|
|
|
return Promise.reject(response.data)
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
+ this.isShowLoading = false
|
|
|
this.$message.error(err.errMsg)
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
// 确认注册
|
|
|
sureRegister () {
|
|
|
- this.isShowLoading = true
|
|
|
if (!this.isHasRegister) {
|
|
|
if (this.spaceNameChecked && this.businessCodeChecked && this.vipNameChecked && this.passwordChecked && this.passwordConfirmChecked && this.emailChecked && this.checked) {
|
|
|
+ this.isShowLoading = true
|
|
|
var url = window.location.search
|
|
|
var request = {}
|
|
|
if (url.indexOf('?' !== -1)) {
|
|
|
@@ -546,12 +575,14 @@
|
|
|
return Promise.reject(response.data)
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
+ this.isShowLoading = false
|
|
|
this.$message.error(err.errMsg)
|
|
|
})
|
|
|
}
|
|
|
} else {
|
|
|
if (this.isHasEmail) {
|
|
|
if (this.spaceNameChecked && this.businessCodeChecked && this.passwordChecked) {
|
|
|
+ this.isShowLoading = true
|
|
|
let param = new FormData()
|
|
|
param.append('spaceName', this.enterprise1.spaceName)
|
|
|
param.append('businessCode', this.enterprise1.businessCode)
|
|
|
@@ -571,11 +602,13 @@
|
|
|
return Promise.reject(response.data)
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
+ this.isShowLoading = false
|
|
|
this.$message.error(err.errMsg)
|
|
|
})
|
|
|
}
|
|
|
} else {
|
|
|
if (this.spaceNameChecked && this.businessCodeChecked && this.passwordChecked && this.emailChecked) {
|
|
|
+ this.isShowLoading = true
|
|
|
let param = new FormData()
|
|
|
param.append('spaceName', this.enterprise1.spaceName)
|
|
|
param.append('businessCode', this.enterprise1.businessCode)
|
|
|
@@ -595,6 +628,7 @@
|
|
|
return Promise.reject(response.data)
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
+ this.isShowLoading = false
|
|
|
this.$message.error(err.errMsg)
|
|
|
})
|
|
|
}
|
|
|
@@ -643,7 +677,9 @@
|
|
|
span.codeError-tip{
|
|
|
position: absolute;
|
|
|
top: 3px;
|
|
|
- right: -105px;
|
|
|
+ left: 378px;
|
|
|
+ width: 200px;
|
|
|
+ text-align: left;
|
|
|
color: #ff4949;
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
@@ -737,6 +773,15 @@
|
|
|
color: #2d8cf0;
|
|
|
}
|
|
|
}
|
|
|
+ span.tip.passwordError{
|
|
|
+ position: absolute;
|
|
|
+ top: 3px;
|
|
|
+ left: 380px;
|
|
|
+ width: 200px;
|
|
|
+ text-align: left;
|
|
|
+ color: #ff4949;
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
input.msg{
|
|
|
float: left;
|
|
|
width: 210px;
|