From d576ad8a56547bf616c18bf3d37fe5a60089f154 Mon Sep 17 00:00:00 2001 From: "471615499@qq.com" Date: Sun, 20 Oct 2024 20:25:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E5=8F=82=E6=95=B0=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E5=8A=A0=E5=AF=86=EF=BC=8C=E5=8F=82=E6=95=B0=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/user/Login.vue | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/views/user/Login.vue b/src/views/user/Login.vue index 5775c27..c6cb2fa 100644 --- a/src/views/user/Login.vue +++ b/src/views/user/Login.vue @@ -162,12 +162,21 @@ export default { }, mounted() { - let username = this.$route.query.username - let pwd = this.$route.query.pwd + let username = this.$route.query.from + let pwd = this.$route.query.next if (username && username != '' && pwd && pwd != '') { + // 解密 + let newUName = '' + newUName = decodeURIComponent(atob(username).split('').map(function(c) { + return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2) + }).join('')) + let newPwd = '' + newPwd = decodeURIComponent(atob(pwd).split('').map(function(c) { + return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2) + }).join('')) this.form.setFieldsValue({ - 'username': username, - 'password': pwd + 'username': newUName, + 'password': newPwd }) this.loginForm() }