|
@@ -80,15 +80,15 @@
|
|
|
</span>
|
|
|
<input class="input" v-model="loginParam.username" type="text" :placeholder="tipWord">
|
|
|
</div>
|
|
|
- <!-- <div class="login-line">
|
|
|
+ <div class="login-line">
|
|
|
<span><i class="iconfont icon-mima"></i></span>
|
|
|
<input class="input" v-model="loginParam.password" type="password" placeholder="请输入您的密码">
|
|
|
- </div> -->
|
|
|
- <div class="yanz-line">
|
|
|
- <input class="input" type="text" v-model="loginParam.password" placeholder="请输入验证码">
|
|
|
- <button v-if="codestate===0" @click="sendLoginCode()">发送验证码</button>
|
|
|
- <button :class="{bgGrey:codestate===1}" v-if="codestate===1">已发送{{secondNum}}</button>
|
|
|
</div>
|
|
|
+ <!-- <div class="yanz-line">
|
|
|
+ <input class="input" type="text" v-model="loginParam.password" placeholder="请输入验证码">
|
|
|
+ <button v-if="codestate===0" @click="sendLoginCode()">发送验证码</button>
|
|
|
+ <button :class="{bgGrey:codestate===1}" v-if="codestate===1">已发送{{secondNum}}</button>
|
|
|
+ </div> -->
|
|
|
<div class="tip-line">
|
|
|
<span class="cursor" @click="toForgetPassWord()">忘记密码?</span>
|
|
|
<div class="switch-box">
|
|
@@ -153,10 +153,10 @@
|
|
|
<p class="warning" v-show="messageCodeisError">*短信验证码错误</p>
|
|
|
</div>
|
|
|
<div class="submit-line">
|
|
|
- <el-button class="loginBtn cursor" @click="" v-if="operateType=='email'" :loading="codeLoad">
|
|
|
+ <!-- <el-button class="loginBtn cursor" @click="" v-if="operateType=='email'" :loading="codeLoad">
|
|
|
<span v-if="codestate===0" @click="pwdSend()">发送邮件</span>
|
|
|
<span v-if="codestate===1">已发送{{secondNum}}</span>
|
|
|
- </el-button>
|
|
|
+ </el-button> -->
|
|
|
<el-button class="loginBtn cursor" @click="reSetPwd" v-if="operateType=='mobile'" :loading="setLoad">修改密码</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -176,11 +176,11 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="submit-line">
|
|
|
- <el-button class="loginBtn cursor" @click="" v-if="operateType=='email'" :loading="codeLoad">
|
|
|
+ <el-button class="loginBtn cursor" @click="" :loading="codeLoad">
|
|
|
<span v-if="codestate===0" @click="pwdSend()">发送邮件</span>
|
|
|
<span v-if="codestate===1">已发送{{secondNum}}</span>
|
|
|
</el-button>
|
|
|
- <el-button class="loginBtn cursor" @click="reSetPwd" v-if="operateType=='mobile'" :loading="setLoad">发送邮件</el-button>
|
|
|
+ <!-- <el-button class="loginBtn cursor" @click="reSetPwd" v-if="operateType=='mobile'" :loading="setLoad">发送邮件</el-button> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -284,9 +284,10 @@ export default{
|
|
|
this.setParam[x]="";
|
|
|
}
|
|
|
},
|
|
|
- loginTab(val){
|
|
|
+ loginTab(val){
|
|
|
+ console.log("val:"+val);
|
|
|
this.area="86";
|
|
|
- this.operateType="mobile";
|
|
|
+ //this.operateType="mobile";
|
|
|
/*if(val!=2){
|
|
|
this.operateType="mobile";
|
|
|
}*/
|
|
@@ -300,7 +301,7 @@ export default{
|
|
|
this.regParam[x]="";
|
|
|
}
|
|
|
}
|
|
|
- if(val==2){
|
|
|
+ if(val===2||val===4){
|
|
|
for(let x in this.setParam){
|
|
|
this.setParam[x]="";
|
|
|
}
|
|
@@ -327,22 +328,27 @@ export default{
|
|
|
toForgetPassWord(){
|
|
|
if(this.operateType=='mobile'){
|
|
|
this.loginTab = 2;
|
|
|
+ this.operateType='mobile'
|
|
|
}else if(this.operateType=='email'){
|
|
|
this.loginTab = 4;
|
|
|
+ this.operateType='email'
|
|
|
}
|
|
|
|
|
|
},
|
|
|
//正则表达式验证手机号码是否正确
|
|
|
checkPhoneNumber(){
|
|
|
- if(!(/^1[3|5|7|8][0-9]\d{4,8}$/.test(this.regParam.email))&&this.regParam.email!=''){
|
|
|
- this.isError = true;
|
|
|
- return false;
|
|
|
- }else{
|
|
|
- this.isError = false;
|
|
|
+ if(this.operateType == 'mobile'){
|
|
|
+ if(!(/^1[3|5|7|8][0-9]\d{4,8}$/.test(this.regParam.email))&&this.regParam.email!=''){
|
|
|
+ this.isError = true;
|
|
|
+ return false;
|
|
|
+ }else{
|
|
|
+ this.isError = false;
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
//重置密码
|
|
|
reSetPwd(){
|
|
|
+ console.log("this.operateType :"+this.operateType);
|
|
|
if(this.setParam.resettoken==""){
|
|
|
this.$notify({
|
|
|
title: '提示',
|
|
@@ -405,6 +411,8 @@ export default{
|
|
|
},
|
|
|
//发送验证码
|
|
|
pwdSend(){
|
|
|
+ //this.operateType = "email"
|
|
|
+ console.log("this.operateType :"+this.operateType);
|
|
|
if(this.setParam.username==""){
|
|
|
this.$notify({
|
|
|
title: '提示',
|
|
@@ -583,7 +591,14 @@ export default{
|
|
|
if(data.code==200){
|
|
|
this.gologin('reg');
|
|
|
this.isRegisted = false;
|
|
|
- }else if(data.code == 1001){ //code=1001 代表该邮箱已被注册
|
|
|
+ this.$notify({
|
|
|
+ title: '成功',
|
|
|
+ message: '注册成功!',
|
|
|
+ type: 'success',
|
|
|
+ duration:'1500'
|
|
|
+ })
|
|
|
+ this.loginTab = 1;
|
|
|
+ }else if(data.code == 1001&&this.operateType == 'email'){ //code=1001 代表该邮箱已被注册
|
|
|
this.isRegisted = true;
|
|
|
}
|
|
|
})
|