自定义落地页
通过 src/config 定制首页、功能页、定价页、FAQ、法律页等落地页内容与布局。
MuseMVP 的落地页(Landing Page)高度可定制,核心配置与自定义逻辑集中在 src/config 目录。通过修改配置文件和自定义组件,即可实现品牌化、功能开关与内容替换。
配置入口
全局配置在 src/config/index.ts,功能开关在 config.ui,各页面的自定义逻辑在 src/config/custom-*.ts 中。
配置目录结构
首页定制 (custom-page-home)
src/config/custom-page-home.tsx 控制首页各区块的显示与顺序:
const systemShowConfig = {
hero: true, // Hero 区域
featuresShowcase: true,
ctaSection: true,
pricingSection: true,
faqSection: true,
newsletter: true,
};| 区块 | 说明 |
|---|---|
hero | 首屏 Hero 区域 |
featuresShowcase | 功能展示区块 |
ctaSection | 行动号召区块 |
pricingSection | 定价区块 |
faqSection | FAQ 区块 |
newsletter | Newsletter 订阅区块 |
将对应 systemShowConfig 值设为 false 即可隐藏该区块。如需替换为自定义组件,可在 PLACEHOLDER 注释处插入。
功能开关 (config.ui)
在 src/config/index.ts 的 config.ui 中控制页面可见性:
| 配置项 | 说明 |
|---|---|
ui.features.enabled | 功能页 /features |
ui.docs.enabled | 文档页 /docs |
ui.blog.enabled | 博客页 /blog |
ui.changelog.enabled | 更新日志 /changelog |
ui.contactForm.enabled | 联系表单 /contact |
ui.legal.enabled | 法律页面 /legal/* |
ui.docs.enabled | 文档系统 |
导航与页脚 (custom-common)
src/config/custom-common.ts 提供:
getHeaderMenuItems():Header 导航菜单项(含headerMenuMap文案)useFooterLinks():页脚链接分组useFooterSocialIcons():页脚社交图标
config.ui.headerConfig.customRoutes 可添加自定义导航项(支持 position: "left" | "center" | "right")。
定价页 (custom-page-pricing)
src/config/custom-page-pricing.tsx 控制定价页内容。当 config.payments.enableBilling 为 false 时会重定向到首页。
定价文案与套餐展示由 src/config/saas/pricing-desc-usage.ts 和 pricing-desc.ts 决定。
pricing-desc.ts:套餐标题、描述和功能点文案pricing-desc-usage.ts:实际可购买的价格项、productId与计费行为
如果你想展示“原价 $249,现价 $199”这类划线价效果,应在 pricing-desc-usage.ts 中这样配置:
{
type: "one-time",
productId: billingProductCatalog.lifetime.productId,
gatewayProductIds: billingProductCatalog.lifetime.gatewayProductIds,
originalAmount: 249,
amount: 199,
currency: "USD",
}字段语义:
amount:实际传给支付网关、用于结算的价格originalAmount:可选的展示字段,只用于定价卡片中的划线原价展示
只有当 originalAmount > amount 时,前端才会显示划线原价;如果不填,则只展示当前价格。
FAQ 定制 (custom-faq)
src/config/custom-faq.ts 提供:
useFaqData():FAQ 列表数据(question、answer)useFaqSectionData():FAQ 区块标题、描述等
可在 PLACEHOLDER 处插入自定义 FAQ 数据,或通过 i18n 文案(faq.items.*)配置。
法律页 (custom-legal)
src/config/custom-legal.ts 控制隐私政策、服务条款、社区规范等法律页内容:
| 配置 | 说明 |
|---|---|
useLegalCustomPrivacyData | 是否使用自定义隐私政策 |
legalI18nPrivacyContent | 按 locale 返回的隐私政策内容 |
useLegalCustomTermsData | 是否使用自定义服务条款 |
legalI18nTermsContent | 按 locale 返回的服务条款内容 |
useLegalCustomBehaviorData | 是否使用自定义社区规范 |
legalI18nBehaviorContent | 按 locale 返回的社区规范内容 |
快速定制流程
在 src/config/index.ts 中调整 config.ui 开关,控制页面显示。
修改 custom-page-home.tsx 的 systemShowConfig,控制首页区块。
在 custom-common.ts 中调整 headerConfig.customRoutes 和 footerConfig。
在 custom-faq.ts、custom-legal.ts 中按需补充内容。