diff --git a/src/views/common/login.vue b/src/views/common/login.vue index ec83c0a..35262e6 100644 --- a/src/views/common/login.vue +++ b/src/views/common/login.vue @@ -21,7 +21,7 @@ - + @@ -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 () {