MuseMVP 文档
快速构建

自定义落地页

通过 src/config 定制首页、功能页、定价页、FAQ、法律页等落地页内容与布局。

MuseMVP 的落地页(Landing Page)高度可定制,核心配置与自定义逻辑集中在 src/config 目录。通过修改配置文件和自定义组件,即可实现品牌化、功能开关与内容替换。

配置入口

全局配置在 src/config/index.ts,功能开关在 config.ui,各页面的自定义逻辑在 src/config/custom-*.ts 中。

配置目录结构

index.ts
types.ts
custom-common.ts
custom-page-home.tsx
custom-page-features.tsx
custom-page-pricing.tsx
custom-page-contact.tsx
custom-page-changelog.tsx
custom-faq.ts
custom-legal.ts
pricing-desc.ts
pricing-desc-usage.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定价区块
faqSectionFAQ 区块
newsletterNewsletter 订阅区块

将对应 systemShowConfig 值设为 false 即可隐藏该区块。如需替换为自定义组件,可在 PLACEHOLDER 注释处插入。


功能开关 (config.ui)

src/config/index.tsconfig.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.enableBillingfalse 时会重定向到首页。

定价文案与套餐展示由 src/config/saas/pricing-desc-usage.tspricing-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 列表数据(questionanswer
  • useFaqSectionData():FAQ 区块标题、描述等

可在 PLACEHOLDER 处插入自定义 FAQ 数据,或通过 i18n 文案(faq.items.*)配置。


src/config/custom-legal.ts 控制隐私政策、服务条款、社区规范等法律页内容:

配置说明
useLegalCustomPrivacyData是否使用自定义隐私政策
legalI18nPrivacyContent按 locale 返回的隐私政策内容
useLegalCustomTermsData是否使用自定义服务条款
legalI18nTermsContent按 locale 返回的服务条款内容
useLegalCustomBehaviorData是否使用自定义社区规范
legalI18nBehaviorContent按 locale 返回的社区规范内容

快速定制流程

src/config/index.ts 中调整 config.ui 开关,控制页面显示。

修改 custom-page-home.tsxsystemShowConfig,控制首页区块。

custom-common.ts 中调整 headerConfig.customRoutesfooterConfig

custom-faq.tscustom-legal.ts 中按需补充内容。


相关文档