diff --git a/src/App.vue b/src/App.vue index dc4b9a9401d49437a7f31158a03b8e42e9432dab..6258ae1837b3a7bbdf1232c21d420cee2ba0172a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -113,13 +113,15 @@ export default { }, created() { // this.initMsg() - // 用户登录状态有效检测 - setInterval(() => { - $axios.get("/apaas/system/v5/user/login/check"); - }, 15 * 1000); }, mounted() { // this.getSysOptions(); + // 用户登录状态有效检测 + if (this.userInfo) { + setInterval(() => { + $axios.get("/apaas/system/v5/user/login/check"); + }, 15 * 1000); + } }, methods: { openMsg(data) {