diff --git a/frontend/src/components/AdminDashboard.jsx b/frontend/src/components/AdminDashboard.jsx index 44cdd79..23ed7a8 100644 --- a/frontend/src/components/AdminDashboard.jsx +++ b/frontend/src/components/AdminDashboard.jsx @@ -305,6 +305,11 @@ const AdminDashboard = () => { const timer = setInterval(loadData, 30000) // 30秒刷新一次 return () => clearInterval(timer) }, []) + useEffect(() => { + const onUpdated = () => loadData() + window.addEventListener('ats:accounts:updated', onUpdated) + return () => window.removeEventListener('ats:accounts:updated', onUpdated) + }, []) if (loading && !data) return
加载中...
if (error) return
加载失败: {error}