update 登录优化
This commit is contained in:
parent
88260bc3af
commit
380588340d
@ -21,7 +21,7 @@
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col :span="10" class="login-captcha">
|
||||
<img @click="handleGetImgCaptcha()" id="img-captcha" :src="'/lz_management/captcha.jpg?uuid='+ this.dataForm.uuid">
|
||||
<img :src="captchaPath" @click="handleGetImgCaptcha()">
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
@ -43,8 +43,8 @@
|
||||
data () {
|
||||
return {
|
||||
dataForm: {
|
||||
username: 'test',
|
||||
password: '1234567',
|
||||
username: '',
|
||||
password: '',
|
||||
uuid: '',
|
||||
captcha: ''
|
||||
},
|
||||
@ -53,18 +53,17 @@
|
||||
password: [{ required: true, message: '密码不能为空', trigger: 'blur' }],
|
||||
captcha: [{ required: true, message: '验证码不能为空', trigger: 'blur' }]
|
||||
},
|
||||
captchaPath: ''
|
||||
captchaPath: '' // 图像验证码请求地址
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.dataForm.uuid = getUUID()
|
||||
this.handleGetImgCaptcha()
|
||||
},
|
||||
methods: {
|
||||
// 获取图像验证码
|
||||
handleGetImgCaptcha () {
|
||||
this.dataForm.uuid = getUUID()
|
||||
let imgSrc = document.getElementById('img-captcha')
|
||||
imgSrc.setAttribute('src', '/lz_management/captcha.jpg?uuid=' + this.dataForm.uuid)
|
||||
this.captchaPath = `/lz_management/captcha.jpg?uuid=${this.dataForm.uuid}`
|
||||
},
|
||||
// 登录提交表单
|
||||
handleLogin () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user