diff --git a/src/page/login/userlogin.vue b/src/page/login/userlogin.vue
index df27afe..8285f25 100644
--- a/src/page/login/userlogin.vue
+++ b/src/page/login/userlogin.vue
@@ -46,6 +46,7 @@
ref="verify"
/>
+ 记住密码
0) {
+ let arr = document.cookie.split("; ");
+ for (let i = 0; i < arr.length; i++) {
+ let arr2 = arr[i].split("=");
+ console.log(arr2)
+ if (arr2[0] === "username") {
+ this.loginForm.username = arr2[1];
+ } else if (arr2[0] === "password") {
+ this.loginForm.password = arr2[1];
+ this.rememberPwd = true;
+ }
+ }
+ }
+ },
showPassword() {
this.passwordType == ""
? (this.passwordType = "password")
@@ -132,6 +162,12 @@ export default {
} else if (res.data.length == 1) {
let idx = res.data[0].orgType;
localStorage.setItem("orgType", idx);
+ console.log("登陆成功啦!!!")
+ if (this.rememberPwd) {
+ this.setCookie(this.loginForm.username, this.loginForm.password, 7);
+ } else {
+ this.setCookie("", "", -1);
+ }
// 给定一个判断是否可以跳转的东西
localStorage.setItem("backFlag", false);
// 当他只有质控后台时,不需要多余操作