diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index fde35dbb..7b257e5f 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); + } }, };