登录直接展示验证框

dev
yujialong 3 years ago
parent 47b48df0dc
commit 5be69a4143
  1. 19
      src/views/Login.vue

@ -114,7 +114,7 @@ export default {
return { return {
activeIndex:"1", activeIndex:"1",
showVerify:false,// - showVerify: true,// -
verificationIMG:'',// verificationIMG:'',//
// //
@ -134,7 +134,7 @@ export default {
}, },
// + // +
showPhoneVerify:false,// - showPhoneVerify:true,// -
PhoneVerificationIMG:'',// PhoneVerificationIMG:'',//
phoneOrEmail: { phoneOrEmail: {
account: '', account: '',
@ -142,7 +142,8 @@ export default {
code:'', code:'',
platform:3, platform:3,
random:'', random:'',
distinguish:2 distinguish:2,
type: 2
}, },
phoneOrEmailrules:{ phoneOrEmailrules:{
account: [{ validator: regPhoneOrEmail, trigger: 'blur' }], account: [{ validator: regPhoneOrEmail, trigger: 'blur' }],
@ -214,16 +215,16 @@ export default {
}, },
blur(){ blur(){
if(!this.param.account){ // if(!this.param.account){
return this.verificationIMG = '' // return this.verificationIMG = ''
} // }
this.param.random = Math.floor(Math.random()*999999999) this.param.random = Math.floor(Math.random()*999999999)
this.verificationIMG = this.api.verification+'?random='+`${this.param.random}` this.verificationIMG = this.api.verification+'?random='+`${this.param.random}`
}, },
phoneBlur(){ phoneBlur(){
if(!this.phoneOrEmail.account){ // if(!this.phoneOrEmail.account){
return this.PhoneVerificationIMG = '' // return this.PhoneVerificationIMG = ''
} // }
this.phoneOrEmail.random = Math.floor(Math.random()*999999999) this.phoneOrEmail.random = Math.floor(Math.random()*999999999)
this.PhoneVerificationIMG = this.api.verification+'?random='+`${this.phoneOrEmail.random}` this.PhoneVerificationIMG = this.api.verification+'?random='+`${this.phoneOrEmail.random}`
}, },

Loading…
Cancel
Save