From 51f18beb5e0288c5dfabca01a557645aeeca54ad Mon Sep 17 00:00:00 2001 From: linhaojun Date: Sun, 14 May 2023 13:05:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?:art:=20=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aurora-vue/aurora-admin/public/index.html | 1 - .../aurora-admin/src/assets/js/config.js | 1 - .../aurora-admin/src/views/login/Login.vue | 26 ++++++++----------- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/aurora-vue/aurora-admin/public/index.html b/aurora-vue/aurora-admin/public/index.html index a9a0578..f4c2c00 100644 --- a/aurora-vue/aurora-admin/public/index.html +++ b/aurora-vue/aurora-admin/public/index.html @@ -7,7 +7,6 @@ 后台管理系统 - diff --git a/aurora-vue/aurora-admin/src/assets/js/config.js b/aurora-vue/aurora-admin/src/assets/js/config.js index 795683f..c01a305 100644 --- a/aurora-vue/aurora-admin/src/assets/js/config.js +++ b/aurora-vue/aurora-admin/src/assets/js/config.js @@ -1,4 +1,3 @@ export default { - TENCENT_CAPTCHA: '2091489673', UPLOAD_SIZE: 200 } diff --git a/aurora-vue/aurora-admin/src/views/login/Login.vue b/aurora-vue/aurora-admin/src/views/login/Login.vue index 315a5cb..d6cbebd 100644 --- a/aurora-vue/aurora-admin/src/views/login/Login.vue +++ b/aurora-vue/aurora-admin/src/views/login/Login.vue @@ -44,21 +44,17 @@ export default { this.$refs.ruleForm.validate((valid) => { if (valid) { const that = this - var captcha = new TencentCaptcha(this.config.TENCENT_CAPTCHA, function (res) { - if (res.ret === 0) { - let param = new URLSearchParams() - param.append('username', that.loginForm.username) - param.append('password', that.loginForm.password) - that.axios.post('/api/users/login', param).then(({ data }) => { - if (data.flag) { - that.$store.commit('login', data.data) - generaMenu() - that.$message.success('登录成功') - that.$router.push({ path: '/' }) - } else { - that.$message.error(data.message) - } - }) + let param = new URLSearchParams() + param.append('username', that.loginForm.username) + param.append('password', that.loginForm.password) + that.axios.post('/api/users/login', param).then(({ data }) => { + if (data.flag) { + that.$store.commit('login', data.data) + generaMenu() + that.$message.success('登录成功') + that.$router.push({ path: '/' }) + } else { + that.$message.error(data.message) } }) captcha.show() From 82beb357da6ff133d3759b3b7e49e5d3fa5fed13 Mon Sep 17 00:00:00 2001 From: linhaojun Date: Sun, 14 May 2023 13:11:49 +0800 Subject: [PATCH 2/2] =?UTF-8?q?:art:=20=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../aurora-admin/src/views/login/Login.vue | 1 - aurora-vue/aurora-blog/public/index.html | 1 - .../src/components/Header/src/Controls.vue | 44 ++++++++----------- aurora-vue/aurora-blog/src/config/config.ts | 3 -- 4 files changed, 19 insertions(+), 30 deletions(-) diff --git a/aurora-vue/aurora-admin/src/views/login/Login.vue b/aurora-vue/aurora-admin/src/views/login/Login.vue index d6cbebd..8d528ba 100644 --- a/aurora-vue/aurora-admin/src/views/login/Login.vue +++ b/aurora-vue/aurora-admin/src/views/login/Login.vue @@ -57,7 +57,6 @@ export default { that.$message.error(data.message) } }) - captcha.show() } else { return false } diff --git a/aurora-vue/aurora-blog/public/index.html b/aurora-vue/aurora-blog/public/index.html index bf8a303..db175ef 100644 --- a/aurora-vue/aurora-blog/public/index.html +++ b/aurora-vue/aurora-blog/public/index.html @@ -7,7 +7,6 @@ -