Commit b08165fb authored by 白舜's avatar 白舜 🎱

fix: #9466

parent b11275ca
...@@ -113,65 +113,15 @@ export default { ...@@ -113,65 +113,15 @@ export default {
}, },
created() { created() {
// this.initMsg() // this.initMsg()
// 用户登录状态有效检测
setInterval(() => {
$axios.get("/apaas/system/v5/user/login/check");
}, 15 * 1000);
}, },
mounted() { mounted() {
// this.getSysOptions(); // this.getSysOptions();
}, },
methods: { methods: {
/**
* 设置用户多久不操作就跳转到登录界面
* limit:用户无操作时常限制(分钟)
*/
// exitSystemAfterLimit(limit) {
// window.lastOperateTime = new Date();
// window.onload = this.addOperateListener;
// this.setTimer(limit);
// },
//绑定用户操作事件
// addOperateListener() {
// document.addEventListener("mousemove", this.resetStartTime);
// document.addEventListener("keydown", this.resetStartTime);
// document.addEventListener("scroll", this.resetStartTime);
// document.addEventListener("touchstart", this.resetStartTime);
// },
//重置起始时间
// resetStartTime() {
// window.lastOperateTime = new Date();
// },
//设置定时器
// setTimer(limit) {
// window.logTimer = setInterval(() => {
// var currentTime = new Date();
// var timeDiff = currentTime.getTime() - lastOperateTime.getTime();
// if (timeDiff > limit * 60 * 1000) {
// clearInterval(window.logTimer);
// this.$axios.post(`/apaas/system/v5/user/logout`).then((res) => {
// if (res.data.code == "200") {
// window.location.href = `/apaas/manage/ui/#/login`;
// this.$store.commit("setUserInfo", null);
// clearCookie("bgToken");
// this.$message.success("退出成功");
// resetRouter();
// } else {
// this.$message.error("退出失败");
// }
// });
// }
// }, 1000);
// },
// getSysOptions() {
// this.$axios.get(`/apaas/system/v5/sysOptions`).then((res) => {
// if (res.data.code == 200) {
// const result = res.data.data || {};
// if (result.session_validity) this.exitSystemAfterLimit(result.session_validity);
// } else {
// this.$message.error(res.data.data);
// }
// });
// },
openMsg(data) { openMsg(data) {
this.readFlag = !this.readFlag; this.readFlag = !this.readFlag;
}, },
......
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