|
@@ -13,7 +13,7 @@
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import { removeSession } from '@/utils/role';
|
|
import { removeSession } from '@/utils/role';
|
|
-import { removeToken } from '@/utils/auth';
|
|
|
|
|
|
+import { removeToken, getToken } from '@/utils/auth';
|
|
import Cookies from 'js-cookie';
|
|
import Cookies from 'js-cookie';
|
|
import { getConfig } from '@/utils/auth';
|
|
import { getConfig } from '@/utils/auth';
|
|
export default {
|
|
export default {
|
|
@@ -64,7 +64,8 @@ export default {
|
|
isTimeOut() {
|
|
isTimeOut() {
|
|
clearInterval(this.timeOut);
|
|
clearInterval(this.timeOut);
|
|
let dataConfig = getConfig() ? JSON.parse(getConfig()) : null;
|
|
let dataConfig = getConfig() ? JSON.parse(getConfig()) : null;
|
|
- if (dataConfig && dataConfig.user_connection_timeout_duration) {
|
|
|
|
|
|
+ let dataToken = getToken() ? JSON.parse(getToken()) : null;
|
|
|
|
+ if (dataConfig && dataConfig.user_connection_timeout_duration && dataToken) {
|
|
this.timeOut = setInterval(() => {
|
|
this.timeOut = setInterval(() => {
|
|
let lastClickTime = sessionStorage.getItem('lastClickTime') * 1;
|
|
let lastClickTime = sessionStorage.getItem('lastClickTime') * 1;
|
|
let nowTime = new Date().getTime();
|
|
let nowTime = new Date().getTime();
|
|
@@ -84,7 +85,7 @@ export default {
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
sessionStorage.setItem('lastClickTime', new Date().getTime());
|
|
sessionStorage.setItem('lastClickTime', new Date().getTime());
|
|
- this.isTimeOut();
|
|
|
|
|
|
+ // this.isTimeOut();
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|