|  | @@ -110,6 +110,7 @@ export default {
 | 
	
		
			
				|  |  |          loginCodeForm:{
 | 
	
		
			
				|  |  |              phone:'',
 | 
	
		
			
				|  |  |              code:'',
 | 
	
		
			
				|  |  | +            type:'ADMIN',
 | 
	
		
			
				|  |  |              userAgreeCheck: []
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          rulesCode:{
 | 
	
	
		
			
				|  | @@ -125,7 +126,8 @@ export default {
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          time: 60, //获取验证码的时间
 | 
	
		
			
				|  |  |          verificationCodeShow: false, //是否已经获取了验证码
 | 
	
		
			
				|  |  | -        loading: false
 | 
	
		
			
				|  |  | +        loading: false,
 | 
	
		
			
				|  |  | +        timer: null
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    watch: {
 | 
	
	
		
			
				|  | @@ -155,6 +157,14 @@ export default {
 | 
	
		
			
				|  |  |                      user_name:this.loginPwdForm.userName,
 | 
	
		
			
				|  |  |                      password:this.loginPwdForm.password
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | +            }else{
 | 
	
		
			
				|  |  | +                data = {
 | 
	
		
			
				|  |  | +                    user_type:this.loginCodeForm.type,
 | 
	
		
			
				|  |  | +                    user_name:this.loginCodeForm.phone,
 | 
	
		
			
				|  |  | +                    password:this.loginCodeForm.code,
 | 
	
		
			
				|  |  | +                    is_dynamic_verification_code_login:"true",
 | 
	
		
			
				|  |  | +                    dynamic_verification_send_type:"SMS"
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              getLogin(MethodName, data)
 | 
	
		
			
				|  |  |              .then((res) => {
 | 
	
	
		
			
				|  | @@ -165,6 +175,9 @@ export default {
 | 
	
		
			
				|  |  |              })
 | 
	
		
			
				|  |  |              .catch(() => {
 | 
	
		
			
				|  |  |                  this.loading = false
 | 
	
		
			
				|  |  | +                this.verificationCodeShow = false;
 | 
	
		
			
				|  |  | +                clearInterval(this.timer);
 | 
	
		
			
				|  |  | +                this.time = 60;
 | 
	
		
			
				|  |  |              });
 | 
	
		
			
				|  |  |            } else {
 | 
	
		
			
				|  |  |              return false;
 | 
	
	
		
			
				|  | @@ -182,7 +195,7 @@ export default {
 | 
	
		
			
				|  |  |          if(this_[time] != 60){
 | 
	
		
			
				|  |  |              return
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        let timer;
 | 
	
		
			
				|  |  | +        this_.timer = null;
 | 
	
		
			
				|  |  |          if (this_.loginCodeForm[phone]) {
 | 
	
		
			
				|  |  |              let reg = /^1[3-9]\d{9}$/;
 | 
	
		
			
				|  |  |              let result = reg.test(this_.loginCodeForm[phone]);
 | 
	
	
		
			
				|  | @@ -191,27 +204,28 @@ export default {
 | 
	
		
			
				|  |  |                  return
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              this_[flag] = true;
 | 
	
		
			
				|  |  | -            timer = setInterval(() => {
 | 
	
		
			
				|  |  | +            this_.timer = setInterval(() => {
 | 
	
		
			
				|  |  |                  this_[time]--;
 | 
	
		
			
				|  |  |                  if (this_[time] == 0) {
 | 
	
		
			
				|  |  |                      this_[flag] = false;
 | 
	
		
			
				|  |  | -                    clearInterval(timer);
 | 
	
		
			
				|  |  | -                    timer = null;
 | 
	
		
			
				|  |  | +                    clearInterval(this_.timer);
 | 
	
		
			
				|  |  | +                    this_.timer = null;
 | 
	
		
			
				|  |  |                      this_[time] = 60;
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }, 1000);
 | 
	
		
			
				|  |  | -            // let MethodName = "user_manager-SendVerificationCode";
 | 
	
		
			
				|  |  | -            // let data = {
 | 
	
		
			
				|  |  | -            // verification_type: 'EMAIL',
 | 
	
		
			
				|  |  | -            // phone_or_email: this_.loginForm.username,
 | 
	
		
			
				|  |  | -            // };
 | 
	
		
			
				|  |  | -            // getLogin(MethodName, data).then((res) => {
 | 
	
		
			
				|  |  | -            // }).catch(()=>{
 | 
	
		
			
				|  |  | -            //     this_[flag] = false;
 | 
	
		
			
				|  |  | -            //     clearInterval(timer);
 | 
	
		
			
				|  |  | -            //     timer = null;
 | 
	
		
			
				|  |  | -            //     this_[time] = 60;
 | 
	
		
			
				|  |  | -            // });
 | 
	
		
			
				|  |  | +            let MethodName = "/OrgServer/LoginControl/SendVerificationCode";
 | 
	
		
			
				|  |  | +            let data = {
 | 
	
		
			
				|  |  | +                send_type: 'SMS',
 | 
	
		
			
				|  |  | +                phone_or_email: this_.loginCodeForm.phone,
 | 
	
		
			
				|  |  | +            };
 | 
	
		
			
				|  |  | +            getLogin(MethodName, data).then((res) => {
 | 
	
		
			
				|  |  | +            }).catch(()=>{
 | 
	
		
			
				|  |  | +                this_[flag] = false;
 | 
	
		
			
				|  |  | +                clearInterval(this_.timer);
 | 
	
		
			
				|  |  | +                this_.timer = null;
 | 
	
		
			
				|  |  | +                this_[time] = 60;
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |              this_.$message.warning('请先输入手机号');
 | 
	
		
			
				|  |  |          }
 |