使用服务端渲染实现购买页面跳转
This commit is contained in:
@@ -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>
|
||||
)
|
||||
|
||||
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user