|
|
@ -54,13 +54,13 @@ import { filterAsyncRouter } from '@/libs/router-utils' |
|
|
export default { |
|
|
export default { |
|
|
data () { |
|
|
data () { |
|
|
return { |
|
|
return { |
|
|
need_captcha:null, |
|
|
need_captcha: null, |
|
|
captchaimg:'', |
|
|
captchaimg: '', |
|
|
captchatoken:'', |
|
|
captchatoken: '', |
|
|
form: { |
|
|
form: { |
|
|
username: '', |
|
|
username: '', |
|
|
password: '', |
|
|
password: '', |
|
|
captcha:'' |
|
|
captcha: '' |
|
|
}, |
|
|
}, |
|
|
rules: { |
|
|
rules: { |
|
|
username: [ |
|
|
username: [ |
|
|
@ -135,9 +135,9 @@ export default { |
|
|
}) |
|
|
}) |
|
|
vm.loading = false |
|
|
vm.loading = false |
|
|
}).catch((error) => { |
|
|
}).catch((error) => { |
|
|
console.log(error.response.data.data.need_captcha); |
|
|
console.log(error.response.data.data.need_captcha) |
|
|
vm.need_captcha = error.response.data.data.need_captcha |
|
|
vm.need_captcha = error.response.data.data.need_captcha |
|
|
if(vm.need_captcha==true){ |
|
|
if (vm.need_captcha == true) { |
|
|
vm.Logincaptcha() |
|
|
vm.Logincaptcha() |
|
|
} |
|
|
} |
|
|
vm.loading = false |
|
|
vm.loading = false |
|
|
@ -145,7 +145,7 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
Logincaptcha(){ |
|
|
Logincaptcha () { |
|
|
let vm = this |
|
|
let vm = this |
|
|
let username = vm.form.username |
|
|
let username = vm.form.username |
|
|
let password = vm.form.password |
|
|
let password = vm.form.password |
|
|
@ -154,7 +154,7 @@ export default { |
|
|
vm.captchatoken = response.data.data.token |
|
|
vm.captchatoken = response.data.data.token |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
refreshCaptcha() { |
|
|
refreshCaptcha () { |
|
|
this.Logincaptcha() |
|
|
this.Logincaptcha() |
|
|
}, |
|
|
}, |
|
|
qqLogin () { |
|
|
qqLogin () { |
|
|
|