mirror of
https://gitee.com/wangkang/udf.git
synced 2026-10-21 11:03:47 +00:00
更新
This commit is contained in:
+7
-1
@@ -55,7 +55,8 @@
|
||||
<el-col :span="24">
|
||||
<span><el-button type="text" :style="userDtoBtnStyle">基本资料</el-button></span>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<span><el-button type="text" :style="logoutBtnStyle">退出登录</el-button></span>
|
||||
<span><el-button type="text" :style="logoutBtnStyle"
|
||||
@click="logoutBtnClick">退出登录</el-button></span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@@ -192,6 +193,11 @@
|
||||
//搜索输入框显示和隐藏
|
||||
searchInputDivShowHidden() {
|
||||
this.showSearchInput = !this.showSearchInput;
|
||||
},
|
||||
//退出登录按钮事件
|
||||
logoutBtnClick() {
|
||||
const loading = this.$loading({lock: true, text: '操作中'});
|
||||
api_user.logout().then(response => window.location.href = '/').finally(() => loading.close());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,18 +26,8 @@ const glob = {
|
||||
},
|
||||
//跳转到登陆页
|
||||
jumpLoginPage() {
|
||||
//弹出提示
|
||||
Message({
|
||||
dangerouslyUseHTMLString: false,
|
||||
showClose: true,
|
||||
duration: 2000,
|
||||
type: 'info',
|
||||
message: '认证过期,请重新登陆,正在跳转',
|
||||
onClose: () => {
|
||||
const redirectUrl = escape(window.location.href);
|
||||
window.location = process.env.VUE_APP_BASE_URL + 'login.html?redirectUrl=' + redirectUrl;
|
||||
}
|
||||
});
|
||||
const redirectUrl = escape(window.location.href);
|
||||
window.location = process.env.VUE_APP_BASE_URL + 'login.html?redirectUrl=' + redirectUrl;
|
||||
},
|
||||
//初始化NProgress
|
||||
initNProgress() {
|
||||
|
||||
+1
@@ -52,6 +52,7 @@ public class WebHandlerInterceptor implements HandlerInterceptor {
|
||||
}
|
||||
//放入请求作用域
|
||||
request.setAttribute(CommonConstant.PARAMETER_NAME_TOKEN_INFO, userDto);
|
||||
request.setAttribute(CommonConstant.PARAMETER_NAME_TOKEN, token);
|
||||
//刷新token ttl
|
||||
dbCacheService.setTtl(token, CommonConstant.TOKEN_CACHE_TTL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user