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() }