From 7ea5608e30502035cb136e4ffa91b5a15605fdfd Mon Sep 17 00:00:00 2001
From: kyy <3283105747@qq.com>
Date: 星期三, 15 十月 2025 15:28:33 +0800
Subject: [PATCH] 登录增加记住密码
---
H5/Js/UserLogin.js | 10 +++++++++-
UserLogin.aspx | 2 +-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/H5/Js/UserLogin.js b/H5/Js/UserLogin.js
index c847c4c..48d1df3 100644
--- a/H5/Js/UserLogin.js
+++ b/H5/Js/UserLogin.js
@@ -16,7 +16,11 @@
}
else {
that.phone = Cookies.get('loginAccount');
- //that.passwd = Cookies.get('passwd');
+ const rememberPwdStr = Cookies.get('rememberPwd');
+ that.rememberPwd = rememberPwdStr ? JSON.parse(rememberPwdStr.toLowerCase()) : false;
+ if (that.rememberPwd) {
+ that.passwd = Cookies.get('passwd');
+ }
}
//that.phone = "admin";
//that.passwd = "123456";
@@ -27,7 +31,9 @@
that._userLogin();
},
_userLogin() {
+
var that = this;
+ console.log(that.rememberPwd)
that.isLoading = true;
that.AxiosHttp("post", 'login/login', {
userID: that.phone,
@@ -48,6 +54,8 @@
Cookies.set('orgId', _orgId);
Cookies.set('orgNo', _orgNo);
Cookies.set('orgName', _orgName);
+ Cookies.set('passwd', that.passwd);
+ Cookies.set('rememberPwd', that.rememberPwd);
console.log(json.data.tbBillList);
console.log(Cookies);
window.location.href = ("/H5/Default.aspx?userGuid=" + _userGuid + "&userAccount=" + _userAccount);
diff --git a/UserLogin.aspx b/UserLogin.aspx
index e68021d..7c638ee 100644
--- a/UserLogin.aspx
+++ b/UserLogin.aspx
@@ -93,5 +93,5 @@
<comloading v-if="isLoading"></comloading>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" runat="Server">
- <script src="/H5/Js/UserLogin.js?<%=1237 %>"></script>
+ <script src="/H5/Js/UserLogin.js?<%=1246 %>"></script>
</asp:Content>
--
Gitblit v1.9.3