"src/components/service-list/service_list-new.vue" did not exist on "b6241d801261d7ca8b7618aababa722a93934b04"
Commit d7ef8ee6 authored by 李鹏 's avatar 李鹏

文档类型管理接口联调

parent 6de16948
......@@ -115,7 +115,7 @@ export default {
// this.initMsg()
},
mounted() {
this.getSysOptions();
// this.getSysOptions();
},
methods: {
/**
......@@ -123,54 +123,54 @@ export default {
* limit:用户无操作时常限制(分钟)
*/
exitSystemAfterLimit(limit) {
window.lastOperateTime = new Date();
window.onload = this.addOperateListener;
this.setTimer(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);
},
// 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();
},
// 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);
},
// 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);
}
});
},
// 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) {
this.readFlag = !this.readFlag;
......
......@@ -56,6 +56,15 @@ export default {
changeOrigin: true,
secure: false,
},
"/apaas/knowledge/v5": {
target: "https://apaas5.wodcloud.com/apaas/knowledge/v5", // 所要代理的目标地址
rewrite: (path) => {
console.log("path", path);
return path.replace(/^\/apaas\/knowledge\/v5/, "");
}, // 重写传过来的path路径,比如 `/api/index/1?id=10&name=zs`(注意:path路径最前面有斜杠(/),因此,正则匹配的时候不要忘了是斜杠(/)开头的;选项的 key 也是斜杠(/)开头的)
changeOrigin: true, // true/false, Default: false - changes the origin of the host header to the target URL
secure: false, //解决证书缺失问题
},
},
},
build: {
......
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