Commit b3ef6aae by huangjinkai

logout

parent 527f11e5
...@@ -70,3 +70,23 @@ function getQueryString(name) { ...@@ -70,3 +70,23 @@ function getQueryString(name) {
return null; return null;
} }
function logout(){
$.ajax({
url: "/work/cas/logout",
contentType: "application/json",
xhrFields: {
withCredentials: true
},
async: false,
method: "POST",
crossDomain: true,
success: function (data, status) {
if (data.code != 200) {
alert(data.msg);
} else {
console.log("success");
window.location.reload();
}
}
});
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment