登出功能
This commit is contained in:
parent
b14f06b8fa
commit
82e4b54677
@ -35,10 +35,10 @@ public class SecurityConfiguration {
|
||||
httpSecurity.csrf().disable() // 禁用 CSRF 保护
|
||||
.authorizeRequests()
|
||||
// 1. 静态资源,可匿名访问
|
||||
.antMatchers("/**").permitAll()
|
||||
.antMatchers(HttpMethod.GET, "/*.html", "/**/*.html", "/**/*.css", "/**/*.js").permitAll()
|
||||
// 2. 登录相关的接口,可匿名访问
|
||||
.antMatchers("/toLogin").permitAll()
|
||||
.antMatchers("/**").permitAll()
|
||||
.antMatchers("/auth/login-by-code").permitAll()
|
||||
.antMatchers("/auth/refresh-token").permitAll()
|
||||
.antMatchers("/auth/logout").permitAll()
|
||||
|
@ -39,10 +39,7 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
t
|
||||
.
|
||||
id
|
||||
,
|
||||
t.id,
|
||||
t.job_group,
|
||||
t.job_desc,
|
||||
t.add_time,
|
||||
|
@ -8,8 +8,15 @@ $(function(){
|
||||
btn: [ I18n.system_ok, I18n.system_cancel ]
|
||||
}, function(index){
|
||||
layer.close(index);
|
||||
|
||||
$.post(base_url + "/logout", function(data, status) {
|
||||
// 直接清理cookie,直接设置过期
|
||||
document.cookie = "ACCESS_TOKEN=; max-age=0; path=/xxl-job-admin";
|
||||
document.cookie = "REFRESH_TOKEN=; max-age=0; path=/xxl-job-admin";
|
||||
layer.open({
|
||||
icon: '2',
|
||||
title: I18n.system_tips,
|
||||
content: ('已退出登录请关闭当前会话框!' || I18n.logout_success)
|
||||
});
|
||||
/*$.post(base_url + "/logout", function(data, status) {
|
||||
if (data.code == "200") {
|
||||
layer.msg( I18n.logout_success );
|
||||
setTimeout(function(){
|
||||
@ -23,7 +30,7 @@ $(function(){
|
||||
icon: '2'
|
||||
});
|
||||
}
|
||||
});
|
||||
});*/
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -88,7 +88,7 @@
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li id="updatePwd" ><a href="javascript:">${I18n.change_pwd}</a></li>
|
||||
<#-- <li id="updatePwd" ><a href="javascript:">${I18n.change_pwd}</a></li>-->
|
||||
<li id="logoutBtn" ><a href="javascript:">${I18n.logout_btn}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
Loading…
Reference in New Issue
Block a user