Commit 848c9973 authored by 张俊's avatar 张俊

[fix](登录): 记住密码base64加密

parent bdd160b7
......@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>apaas5</title>
<title>BD-aPaas</title>
</head>
<body>
<div id="app"></div>
......
......@@ -87,7 +87,7 @@ export default {
methods: {
loginAction() {
if (this.rememberPassword) {
let userinfo = encodeURI(
let userinfo = window.btoa(
encodeURI(`${this.loginForm.userid},${this.loginForm.password}`)
);
setCookie("userinfo", userinfo);
......@@ -192,7 +192,7 @@ export default {
created() {
this.getImg();
if (getCookie("userinfo")) {
let userinfo = decodeURI(decodeURI(getCookie("userinfo"))).split(",");
let userinfo = window.atob(decodeURI(getCookie("userinfo"))).split(",");
this.loginForm.userid = userinfo[0];
this.loginForm.password = userinfo[1];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment