Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
任超
/
js.portalStaticPage
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
73cd4304
authored
2021-01-11 10:55:31 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:cookie 过期时间
1 parent
19675dc6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
8 deletions
staticJs/login.js
staticJs/login.js
View file @
73cd430
...
...
@@ -66,13 +66,6 @@ $(function () {
$
(
'.isLogin'
).
show
();
}
})
// $(window).bind('beforeunload', function (event) {
// var n = window.event.screenX - window.screenLeft;
// var b = n > document.documentElement.scrollWidth - 20;
// if (b && window.event.clientY < 0 || window.event.altKey) {
// delCookie();
// }
// });
function
delCookie
()
{
var
keys
=
document
.
cookie
.
match
(
/
[^
=;
]
+
(?=
=
)
/g
)
if
(
keys
)
{
...
...
@@ -97,7 +90,7 @@ function clicklogin(data) {
if
(
result
.
code
==
200
&&
result
.
data
!==
null
)
{
$
(
'.loginAfter'
).
show
();
$
(
'.isLogin'
).
hide
();
setCookie
(
'myCookie'
,
result
.
data
,
0.0
1
);
setCookie
(
'myCookie'
,
result
.
data
,
0.0
5
);
$
(
'.loginButton'
).
removeClass
(
'PersonLogin'
)
$
(
'.personalCenter'
).
addClass
(
'show'
);
$
(
'.loginButton'
).
html
(
getCookie
(
'myCookie'
).
username
);
...
...
Please
register
or
sign in
to post a comment