选择套餐配置链接&更新账户总览数据展示

This commit is contained in:
Eamon-meng
2025-06-30 16:08:08 +08:00
parent 54725d446b
commit b096e20fcd
7 changed files with 65 additions and 84 deletions

View File

@@ -9,12 +9,12 @@ import Charts from './_client/charts'
import UserCenter from './_client/userCenter'
import soon from './_assets/coming-soon.svg'
import mask from './_assets/Mask group.webp'
import {Button} from '@/components/ui/button'
export type DashboardPageProps = {}
export default async function DashboardPage(props: DashboardPageProps) {
const resp = await listInitialization()
console.log(resp, 'respresprespresprespresp')
if (!resp.success) {
return (
<div className="col-start-4 row-start-3 row-span-2 flex justify-center items-center">
@@ -23,16 +23,7 @@ export default async function DashboardPage(props: DashboardPageProps) {
)
}
const initData = resp.data
// 添加模拟的 usage 数据(如果 API 返回的 usage 为 null
// if (!initData.usage) {
// initData.usage = [
// {time: new Date('2025-03-01'), count: 100, count2: 80},
// {time: new Date('2025-03-02'), count: 150, count2: 120},
// {time: new Date('2025-03-03'), count: 80, count2: 64},
// {time: new Date('2025-03-04'), count: 200, count2: 160},
// {time: new Date('2025-03-05'), count: 120, count2: 96},
// ]
// }
return (
<Page className={merge(
`flex-auto grid`,
@@ -169,7 +160,12 @@ function Announcements(props: Props) {
<CardHeader>
<div className="flex justify-between gap-2">
<CardTitle></CardTitle>
<span className="text-sm text-primary font-medium"></span>
{/* <Button
theme="text"
className="text-sm text-primary font-medium hover:text-primary bg-transparent border-none p-0 cursor-pointer"
>
查看更多
</Button> */}
</div>
</CardHeader>
<CardContent className="flex-auto p-0">