style:cookie 过期时间
Showing
1 changed file
with
1 additions
and
8 deletions
... | @@ -66,13 +66,6 @@ $(function () { | ... | @@ -66,13 +66,6 @@ $(function () { |
66 | $('.isLogin').show(); | 66 | $('.isLogin').show(); |
67 | } | 67 | } |
68 | }) | 68 | }) |
69 | // $(window).bind('beforeunload', function (event) { | ||
70 | // var n = window.event.screenX - window.screenLeft; | ||
71 | // var b = n > document.documentElement.scrollWidth - 20; | ||
72 | // if (b && window.event.clientY < 0 || window.event.altKey) { | ||
73 | // delCookie(); | ||
74 | // } | ||
75 | // }); | ||
76 | function delCookie() { | 69 | function delCookie() { |
77 | var keys = document.cookie.match(/[^ =;]+(?==)/g) | 70 | var keys = document.cookie.match(/[^ =;]+(?==)/g) |
78 | if (keys) { | 71 | if (keys) { |
... | @@ -97,7 +90,7 @@ function clicklogin(data) { | ... | @@ -97,7 +90,7 @@ function clicklogin(data) { |
97 | if (result.code == 200 && result.data !== null) { | 90 | if (result.code == 200 && result.data !== null) { |
98 | $('.loginAfter').show(); | 91 | $('.loginAfter').show(); |
99 | $('.isLogin').hide(); | 92 | $('.isLogin').hide(); |
100 | setCookie('myCookie', result.data, 0.01); | 93 | setCookie('myCookie', result.data, 0.05); |
101 | $('.loginButton').removeClass('PersonLogin') | 94 | $('.loginButton').removeClass('PersonLogin') |
102 | $('.personalCenter').addClass('show'); | 95 | $('.personalCenter').addClass('show'); |
103 | $('.loginButton').html(getCookie('myCookie').username); | 96 | $('.loginButton').html(getCookie('myCookie').username); | ... | ... |
-
Please register or sign in to post a comment