From 3e5807b59bfa0303cb93914436f923da1746a4d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E7=BA=B2?= Date: Wed, 27 Aug 2025 11:32:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BB=AA=E8=A1=A8=E7=9B=98=E6=A8=A1?= =?UTF-8?q?=E5=9D=97,=E6=94=AF=E6=8C=81=E4=BC=81=E4=B8=9A=E7=89=88?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=9C=80=E8=BF=9190=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/pages/dashboard/index.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/src/pages/dashboard/index.tsx b/ui/src/pages/dashboard/index.tsx index 59ed7b5..81c4a85 100644 --- a/ui/src/pages/dashboard/index.tsx +++ b/ui/src/pages/dashboard/index.tsx @@ -8,6 +8,7 @@ import MemberStatistic from './components/memberStatistic'; import { useParams } from 'react-router-dom'; import { useNavigate } from 'react-router-dom'; import { DomainUser } from '@/api/types'; +import { v1LicenseList } from '@/api'; export type TimeRange = '90d' | '24h'; @@ -17,7 +18,9 @@ const Dashboard = () => { const [tabValue, setTabValue] = useState(tab || 'global'); const [memberData, setMemberData] = useState(null); const [timeRange, setTimeRange] = useState('24h'); - + const license = useRequest(() => { + return v1LicenseList({}) + }).data const { data: userData, refresh } = useRequest( () => getListUser({ @@ -87,7 +90,7 @@ const Dashboard = () => { size='small' onChange={(e) => setTimeRange(e.target.value as TimeRange)} sx={{ fontSize: 14 }} - disabled + disabled={license?.edition !== 2} > 最近 24 小时 最近 90 天