|
@@ -59,21 +59,23 @@ export default {
|
|
|
// 是否超时
|
|
|
isTimeOut(){
|
|
|
clearInterval(this.timeOut)
|
|
|
- this.timeOut = setInterval(()=>{
|
|
|
- let lastClickTime = sessionStorage.getItem('lastClickTime')*1
|
|
|
- let nowTime = new Date().getTime()
|
|
|
- let dataConfig = JSON.parse(getConfig());
|
|
|
- if(nowTime - lastClickTime > 1000 * dataConfig.user_connection_timeout_duration){
|
|
|
- clearInterval(this.timeOut)
|
|
|
- removeSession("SysList");
|
|
|
- removeToken();
|
|
|
- Cookies.remove("JSESSIONID");
|
|
|
- this.userShow = false;
|
|
|
- this.userMessage = null;
|
|
|
- sessionStorage.removeItem("useragent_root_close");
|
|
|
- window.location.href = dataConfig.sys_home_url
|
|
|
- }
|
|
|
- })
|
|
|
+ let dataConfig = JSON.parse(getConfig());
|
|
|
+ if(dataConfig.user_connection_timeout_duration){
|
|
|
+ this.timeOut = setInterval(()=>{
|
|
|
+ let lastClickTime = sessionStorage.getItem('lastClickTime')*1
|
|
|
+ let nowTime = new Date().getTime()
|
|
|
+ if(nowTime - lastClickTime > 1000 * dataConfig.user_connection_timeout_duration){
|
|
|
+ clearInterval(this.timeOut)
|
|
|
+ removeSession("SysList");
|
|
|
+ removeToken();
|
|
|
+ Cookies.remove("JSESSIONID");
|
|
|
+ this.userShow = false;
|
|
|
+ this.userMessage = null;
|
|
|
+ sessionStorage.removeItem("useragent_root_close");
|
|
|
+ window.location.href = dataConfig.sys_home_url
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
mounted(){
|