From d598dbd77511c1a945222aacb21a1cae0ec68ef1 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Thu, 25 Apr 2024 16:09:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BD=E5=9D=AF=E5=B7=A5=E5=8D=95=EF=BC=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=B9=BF=E6=96=99=E8=AE=A1=E5=88=92=E6=8C=89?= =?UTF-8?q?=E9=92=AE2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Navbar.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index fde35db..7b257e5 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -150,7 +150,7 @@ import SizeSelect from "@/components/SizeSelect"; import Search from "@/components/HeaderSearch"; import RuoYiGit from "@/components/RuoYi/Git"; import RuoYiDoc from "@/components/RuoYi/Doc"; -import { getUnReadComment } from "@/api/visit/visitComment"; +import { getUnReadComment} from '@/api/plan/workorder'; import { listNotice, getNotice, @@ -190,6 +190,12 @@ export default { setInterval(() => this.getAlarmData(), 1000 * 60); this.poolNameList = JSON.parse(localStorage.getItem("POOL_NAME_LIST")); this.poolName = localStorage.getItem("USER_POOL_NAME_CURRENT"); + //先执行一次 + this.getUnReadList(); + // 实现轮询 + this.timer = setInterval(() => { + setTimeout(this.getUnReadList(), 30000); + }, 30000); }, components: { Breadcrumb, @@ -314,13 +320,7 @@ export default { gotoComment() { alert("301") this.showPrise = false; - }, - //先执行一次 - this.getUnReadList() - // 实现轮询 - this.timer = setInterval(() => { - setTimeout(this.getUnReadList(), 30000); - }, 30000); + } }, };