|
|
@@ -15,7 +15,7 @@ function getAccountInfo() {
|
|
|
|
|
|
$('.x-login').find('.title').text(data.content.name);
|
|
|
|
|
|
- $('.x-login').click(function () {
|
|
|
+ $('.title').click(function () {
|
|
|
window.location.href = "/resetPassword";
|
|
|
});
|
|
|
}
|
|
|
@@ -26,16 +26,29 @@ function getAccountInfo() {
|
|
|
* 退出登录
|
|
|
*/
|
|
|
function Logout() {
|
|
|
+ $.ajaxSetup({cache : false });
|
|
|
$.ajax('logout', {
|
|
|
method: 'POST',
|
|
|
async: false,
|
|
|
success: function() {
|
|
|
+ clearAllCookie();
|
|
|
window.location.href = "/signIn";
|
|
|
},
|
|
|
error: function (error) {
|
|
|
toastr.error(error);
|
|
|
}
|
|
|
});
|
|
|
+ window.location.href = "/signIn";
|
|
|
+}
|
|
|
+
|
|
|
+//清除所有cookie函数
|
|
|
+function clearAllCookie() {
|
|
|
+ var keys = document.cookie.match(/[^ =;]+(?=\=)/g);
|
|
|
+ if (keys) {
|
|
|
+ for(var i = keys.length; i--;) {
|
|
|
+ document.cookie = keys[i] + '=0;expires=' + new Date(0).toUTCString();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
$(function() {
|