使用服务端渲染实现购买页面跳转

This commit is contained in:
2025-06-16 12:04:25 +08:00
parent 4344a2985d
commit 36b17f1bf2
3 changed files with 44 additions and 59 deletions

View File

@@ -1,8 +1,12 @@
import BreadCrumb from '@/components/bread-crumb'
import Wrap from '@/components/wrap'
import Purchase from '@/components/composites/purchase'
import Purchase, {TabType} from '@/components/composites/purchase'
export type ProductPageProps = {}
export type ProductPageProps = {
searchParams?: {
type?: TabType
}
}
export default function ProductPage(props: ProductPageProps) {
return (
@@ -11,7 +15,7 @@ export default function ProductPage(props: ProductPageProps) {
<BreadCrumb items={[
{label: '产品中心', href: '/product'},
]}/>
<Purchase/>
<Purchase defaultType={props.searchParams?.type ?? 'short'}/>
</Wrap>
</main>
)

View File

@@ -1,12 +1,16 @@
import Purchase from '@/components/composites/purchase'
import Purchase, {TabType} from '@/components/composites/purchase'
import Page from '@/components/page'
export type PurchasePageProps = {}
export type PurchasePageProps = {
searchParams?: {
type?: TabType
}
}
export default async function PurchasePage(props: PurchasePageProps) {
return (
<Page className="flex-col">
<Purchase/>
<Purchase defaultType={props.searchParams?.type ?? 'short'}/>
</Page>
)
}