From 380588340de51d6403a38954a17ad86a8a232dfe Mon Sep 17 00:00:00 2001 From: yoe Date: Mon, 18 May 2020 10:54:36 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E7=99=BB=E5=BD=95=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/common/login.vue | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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 () {