Browse Source

登录页面新增验证

master
liaoxinyu 1 month ago
parent
commit
735e053ffe
  1. 16
      src/view/login/login.vue

16
src/view/login/login.vue

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

Loading…
Cancel
Save