Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
0814 web 修改意
daoyiane7d497bfd415
diff --git a/@types/resources.d.ts b/@types/resources.d.tsindex 7ef06abd..230bd113 100644--- a/@types/resources.d.ts+++ b/@types/resources.d.ts@@ -59,6 +59,44 @@ interface Resources {"noMediaGroups": "暂无媒体组","noMediaInGroup": "该媒体组暂无资源"},+ "pricing": {+ "title": "套餐与定价",+ "subtitle": "选择最适合您需求的套餐,开始您的AI创作之旅",+ "monthly": "月付",+ "yearly": "年付",+ "save50": "省50%",+ "month": "月",+ "credits": "积分",+ "videos": "视频",+ "images": "图片",+ "flashSale50": "限时5折",+ "mostPopular": "最受欢迎",+ "faq": {+ "title": "常见问题",+ "items": [+ {+ "question": "如何选择合适的套餐?",+ "answer": "如果您是个人用户或刚开始使用AI创作,建议选择Free套餐体验。如果您需要更多功能和更高的使用限制,Plus套餐是更好的选择。"+ },+ {+ "question": "可以随时升级或降级套餐吗?",+ "answer": "是的,您可以随时升级到更高套餐。降级将在当前计费周期结束后生效。"+ },+ {+ "question": "积分是如何计算的?",+ "answer": "积分根据您生成的内容类型和复杂度计算。视频生成消耗更多积分,图片生成消耗较少积分。"+ },+ {+ "question": "支持哪些支付方式?",+ "answer": "我们支持信用卡、借记卡、PayPal等多种支付方式,确保安全便捷的支付体验。"+ },+ {+ "question": "有退款政策吗?",+ "answer": "我们提供7天无理由退款保证。如果您对服务不满意,可以在购买后7天内申请全额退款。"+ }+ ]+ }+ },"common": {"profile": "个人中心","logout": "退出登录",diff --git a/src/app/[lng]/page.tsx b/src/app/[lng]/page.tsxindex da5534cc..3758c95f 100644--- a/src/app/[lng]/page.tsx+++ b/src/app/[lng]/page.tsx@@ -79,7 +79,7 @@ function Header() {</Link><nav className={styles.nav}>{/* <a href="#marketplace" className={styles.navLink}>{t('header.nav.marketplace')}</a> */}- <a href="#pricing" className={styles.navLink}>{t('header.nav.pricing')}</a>+ <a href="/pricing" className={styles.navLink}>{t('header.nav.pricing')}</a><a href="https://status.aitoearn.ai/" target="_blank" rel="noopener noreferrer" className={styles.navLink}>{t('header.nav.status' as any)}</a>{/* <a href="#docs" className={styles.navLink}>{t('header.nav.docs')}</a> */}{/* <a href="#blog" className={styles.navLink}>{t('header.nav.blog')}</a> */}diff --git a/src/app/[lng]/pricing/README.md b/src/app/[lng]/pricing/README.mdnew file mode 100644index 00000000..8fe186dc--- /dev/null+++ b/src/app/[lng]/pricing/README.md@@ -0,0 +1,65 @@+# 定价页面 (Pricing Page)++## 功能特性++### 设计风格+- 白底设计,蓝紫渐变主色调+- 响应式布局,支持移动端和桌面端+- 现代化的卡片式设计++### 套餐内容++#### Free 套餐+- 最高60积分+- 每月最高可生成60个视频+- 每月最高可生成120张图片+- 包含基础AI功能(文字转视频、图像转视频、视频到视频等)+- 含水印输出+- 存储空间500M++#### Plus 套餐+- 700积分+- 每月最高可生成700个视频+- 每月最高可生成1400张图片+- 包含所有Free套餐功能+- 额外功能:+ - 文本内容安全审查+ - 图片内容安全审查+ - 视频内容安全审查+ - 更快的生成速度+ - 无水印输出+ - 存储空间5G++### 计费选项+- 月付:$29 USD/月+- 年付:$14.5 USD/月(限时5折优惠)++### 交互功能+- 月付/年付切换+- 套餐对比+- 一键购买/注册+- 常见问题解答++### 多语言支持+- 中文 (zh-CN)+- 英文 (en)++## 文件结构+```+src/app/[lng]/pricing/+├── page.tsx # 主页面组件+├── pricing.module.scss # 样式文件+└── README.md # 说明文档+```++## 路由+- 中文:`/zh-CN/pricing`+- 英文:`/en/pricing`++## 技术栈+- Next.js 14+- React 18+- TypeScript+- SCSS+- Ant Design+- i18nextdiff --git a/src/app/[lng]/pricing/page.tsx b/src/app/[lng]/pricing/page.tsxnew file mode 100644index 00000000..d6a1d00e--- /dev/null+++ b/src/app/[lng]/pricing/page.tsx@@ -0,0 +1,197 @@+"use client";++import { useState } from "react";+import { useTransClient } from "@/app/i18n/client";+import styles from "./pricing.module.scss";+import { Button } from "antd";+import { CheckOutlined, CloseOutlined } from "@ant-design/icons";++export default function PricingPage() {+ const { t } = useTransClient('pricing');+ const [billingCycle, setBillingCycle] = useState<'monthly' | 'yearly'>('yearly');++ const plans = [+ {+ name: 'Free',+ price: 0,+ originalPrice: 0,+ credits: '最高60 积分',+ videos: '每月最高可生成60个视频',+ images: '每月最高可生成120张图片',+ features: [+ { text: '文本内容安全审查', included: false },+ { text: '图片内容安全审查', included: false },+ { text: '视频内容安全审查', included: false },+ { text: '多模型一站式支持', included: true },+ { text: '文字转视频', included: true },+ { text: '图像转视频', included: true },+ { text: '视频到视频', included: true },+ { text: '一致的角色视频', included: true },+ { text: 'AI动画生成', included: true },+ { text: 'AI图像生成', included: true },+ { text: '声音克隆', included: true },+ { text: '声音合成', included: true },+ { text: '更快的生成速度', included: false },+ { text: '含水印输出', included: true },+ { text: '存储空间500M', included: true },+ ],+ buttonText: '立即开始',+ buttonType: 'default' as const,+ popular: false,+ },+ {+ name: 'Plus',+ price: billingCycle === 'yearly' ? 14.5 : 29,+ originalPrice: billingCycle === 'yearly' ? 29 : 29,+ credits: '700积分',+ videos: '每月最高可生成700个视频',+ images: '每月最高可生成1400张图片',+ features: [+ { text: '文本内容安全审查', included: true },+ { text: '图片内容安全审查', included: true },+ { text: '视频内容安全审查', included: true },+ { text: '多模型一站式支持', included: true },+ { text: '文字转视频', included: true },+ { text: '图像转视频', included: true },+ { text: '视频到视频', included: true },+ { text: '一致的角色视频', included: true },+ { text: 'AI动画生成', included: true },+ { text: 'AI图像生成', included: true },+ { text: '声音克隆', included: true },+ { text: '声音合成', included: true },+ { text: '更快的生成速度', included: true },+ { text: '无水印输出', included: true },+ { text: '存储空间5G', included: true },+ ],+ buttonText: '立即购买',+ buttonType: 'primary' as const,+ popular: true,+ },+ ];++ return (+ <div className={styles.pricingPage}>+ <div className={styles.container}>+ {/* Header */}+ <div className={styles.header}>+ <h1 className={styles.title}>{t('title')}</h1>+ <p className={styles.subtitle}>{t('subtitle')}</p>+ </div>++ {/* Billing Toggle */}+ <div className={styles.billingToggle}>+ <div className={styles.toggleContainer}>+ <button+ className={`${styles.toggleButton} ${billingCycle === 'monthly' ? styles.active : ''}`}+ onClick={() => setBillingCycle('monthly')}+ >+ {t('monthly')}+ </button>+ <button+ className={`${styles.toggleButton} ${billingCycle === 'yearly' ? styles.active : ''}`}+ onClick={() => setBillingCycle('yearly')}+ >+ {t('yearly')}+ {billingCycle === 'yearly' && (+ <span className={styles.saveBadge}>{t('save50')}</span>+ )}+ </button>+ </div>+ </div>++ {/* Pricing Cards */}+ <div className={styles.pricingCards}>+ {plans.map((plan, index) => (+ <div+ key={plan.name}+ className={`${styles.pricingCard} ${plan.popular ? styles.popular : ''}`}+ >+ {plan.popular && (+ <div className={styles.popularBadge}>+ {billingCycle === 'yearly' ? t('flashSale50') : t('mostPopular')}+ </div>+ )}++ <div className={styles.cardHeader}>+ <h2 className={styles.planName}>{plan.name}</h2>+ <div className={styles.priceContainer}>+ {plan.originalPrice > plan.price && (+ <span className={styles.originalPrice}>+ ${plan.originalPrice} USD+ </span>+ )}+ <div className={styles.price}>+ ${plan.price} USD+ <span className={styles.period}>/{t('month')}</span>+ </div>+ </div>+ </div>++ <div className={styles.planFeatures}>+ <div className={styles.mainFeatures}>+ <div className={styles.featureItem}>+ <span className={styles.featureLabel}>{t('credits')}</span>+ <span className={styles.featureValue}>{plan.credits}</span>+ </div>+ <div className={styles.featureItem}>+ <span className={styles.featureLabel}>{t('videos')}</span>+ <span className={styles.featureValue}>{plan.videos}</span>+ </div>+ <div className={styles.featureItem}>+ <span className={styles.featureLabel}>{t('images')}</span>+ <span className={styles.featureValue}>{plan.images}</span>+ </div>+ </div>++ <div className={styles.featuresList}>+ {plan.features.map((feature, featureIndex) => (+ <div key={featureIndex} className={styles.featureRow}>+ {feature.included ? (+ <CheckOutlined className={styles.checkIcon} />+ ) : (+ <CloseOutlined className={styles.closeIcon} />+ )}+ <span className={`${styles.featureText} ${!feature.included ? styles.disabled : ''}`}>+ {feature.text}+ </span>+ </div>+ ))}+ </div>+ </div>++ <Button+ type={plan.buttonType}+ size="large"+ className={styles.ctaButton}+ onClick={() => {+ if (plan.name === 'Free') {+ // 跳转到注册页面+ window.location.href = '/vip';+ } else {+ // 跳转到支付页面+ window.location.href = '/vip';+ }+ }}+ >+ {plan.buttonText}+ </Button>+ </div>+ ))}+ </div>++ {/* FAQ Section */}+ {/* <div className={styles.faqSection}>+ <h2 className={styles.faqTitle}>{t('faq.title')}</h2>+ <div className={styles.faqList}>+ {t('faq.items', { returnObjects: true }).map((faq: any, index: number) => (+ <div key={index} className={styles.faqItem}>+ <h3 className={styles.faqQuestion}>{faq.question}</h3>+ <p className={styles.faqAnswer}>{faq.answer}</p>+ </div>+ ))}+ </div>+ </div> */}+ </div>+ </div>+ );+}diff --git a/src/app/[lng]/pricing/pricing.module.scss b/src/app/[lng]/pricing/pricing.module.scssnew file mode 100644index 00000000..4e18ad92--- /dev/null+++ b/src/app/[lng]/pricing/pricing.module.scss@@ -0,0 +1,408 @@+.pricingPage {+ min-height: 100vh;+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);+ padding: 40px 0;+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;+}++.container {+ max-width: 1200px;+ margin: 0 auto;+ padding: 0 20px;+}++.header {+ text-align: center;+ margin-bottom: 60px;+ color: white;++ .title {+ font-size: 3rem;+ font-weight: 700;+ margin-bottom: 16px;+ background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);+ -webkit-background-clip: text;+ -webkit-text-fill-color: transparent;+ background-clip: text;+ }++ .subtitle {+ font-size: 1.25rem;+ opacity: 0.9;+ max-width: 600px;+ margin: 0 auto;+ }+}++.billingToggle {+ display: flex;+ justify-content: center;+ margin-bottom: 60px;++ .toggleContainer {+ background: rgba(255, 255, 255, 0.1);+ border-radius: 50px;+ padding: 4px;+ display: flex;+ backdrop-filter: blur(10px);+ border: 1px solid rgba(255, 255, 255, 0.2);++ .toggleButton {+ background: transparent;+ border: none;+ color: white;+ padding: 12px 24px;+ border-radius: 50px;+ cursor: pointer;+ font-size: 1rem;+ font-weight: 500;+ transition: all 0.3s ease;+ position: relative;+ display: flex;+ align-items: center;+ gap: 8px;++ &.active {+ background: white;+ color: #667eea;+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);+ }++ &:hover:not(.active) {+ background: rgba(255, 255, 255, 0.1);+ }++ .saveBadge {+ background: #ff6b6b;+ color: white;+ padding: 2px 8px;+ border-radius: 12px;+ font-size: 0.75rem;+ font-weight: 600;+ margin-left: 4px;+ }+ }+ }+}++.pricingCards {+ display: grid;+ grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));+ gap: 30px;+ margin-bottom: 80px;+}++.pricingCard {+ background: white;+ border-radius: 20px;+ padding: 40px;+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);+ position: relative;+ transition: all 0.3s ease;+ border: 2px solid transparent;++ &:hover {+ transform: translateY(-5px);+ box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);+ }++ &.popular {+ border-color: #667eea;+ transform: scale(1.05);++ &::before {+ content: '';+ position: absolute;+ top: -2px;+ left: -2px;+ right: -2px;+ bottom: -2px;+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);+ border-radius: 20px;+ z-index: -1;+ }+ }++ .popularBadge {+ position: absolute;+ top: -12px;+ right: 20px;+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);+ color: white;+ padding: 8px 16px;+ border-radius: 20px;+ font-size: 0.875rem;+ font-weight: 600;+ box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);+ }+}++.cardHeader {+ text-align: center;+ margin-bottom: 30px;++ .planName {+ font-size: 2rem;+ font-weight: 700;+ color: #333;+ margin-bottom: 16px;+ }++ .priceContainer {+ .originalPrice {+ display: block;+ font-size: 1.125rem;+ color: #999;+ text-decoration: line-through;+ margin-bottom: 4px;+ }++ .price {+ font-size: 2.5rem;+ font-weight: 700;+ color: #667eea;+ display: flex;+ align-items: baseline;+ justify-content: center;+ gap: 4px;++ .period {+ font-size: 1rem;+ color: #666;+ font-weight: 400;+ }+ }+ }+}++.planFeatures {+ .mainFeatures {+ margin-bottom: 30px;+ padding: 20px;+ background: #f8f9ff;+ border-radius: 12px;++ .featureItem {+ display: flex;+ justify-content: space-between;+ align-items: center;+ margin-bottom: 12px;++ &:last-child {+ margin-bottom: 0;+ }++ .featureLabel {+ font-weight: 500;+ color: #666;+ }++ .featureValue {+ font-weight: 600;+ color: #333;+ }+ }+ }++ .featuresList {+ margin-bottom: 30px;++ .featureRow {+ display: flex;+ align-items: center;+ margin-bottom: 12px;+ gap: 12px;++ .checkIcon {+ color: #52c41a;+ font-size: 1.125rem;+ flex-shrink: 0;+ }++ .closeIcon {+ color: #ff4d4f;+ font-size: 1.125rem;+ flex-shrink: 0;+ }++ .featureText {+ font-size: 0.95rem;+ color: #333;+ line-height: 1.4;++ &.disabled {+ color: #999;+ text-decoration: line-through;+ }+ }+ }+ }+}++.ctaButton {+ width: 100%;+ height: 48px;+ border-radius: 12px;+ font-size: 1.125rem;+ font-weight: 600;+ border: none;+ transition: all 0.3s ease;++ &.ant-btn-primary {+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);+ box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);++ &:hover {+ transform: translateY(-2px);+ box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);+ }+ }++ &.ant-btn-default {+ background: #f5f5f5;+ color: #333;+ border: 2px solid #e0e0e0;++ &:hover {+ background: #e8e8e8;+ border-color: #d0d0d0;+ }+ }+}++.faqSection {+ background: white;+ border-radius: 20px;+ padding: 60px 40px;+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);++ .faqTitle {+ text-align: center;+ font-size: 2.5rem;+ font-weight: 700;+ color: #333;+ margin-bottom: 40px;+ }++ .faqList {+ max-width: 800px;+ margin: 0 auto;++ .faqItem {+ margin-bottom: 30px;+ padding: 20px;+ background: #f8f9ff;+ border-radius: 12px;+ border-left: 4px solid #667eea;++ &:last-child {+ margin-bottom: 0;+ }++ .faqQuestion {+ font-size: 1.125rem;+ font-weight: 600;+ color: #333;+ margin-bottom: 8px;+ }++ .faqAnswer {+ color: #666;+ line-height: 1.6;+ margin: 0;+ }+ }+ }+}++// 响应式设计+@media (max-width: 768px) {+ .pricingPage {+ padding: 20px 0;+ }++ .container {+ padding: 0 16px;+ }++ .header {+ margin-bottom: 40px;++ .title {+ font-size: 2rem;+ }++ .subtitle {+ font-size: 1rem;+ }+ }++ .billingToggle {+ margin-bottom: 40px;++ .toggleContainer {+ .toggleButton {+ padding: 10px 20px;+ font-size: 0.9rem;+ }+ }+ }++ .pricingCards {+ grid-template-columns: 1fr;+ gap: 20px;+ margin-bottom: 60px;+ }++ .pricingCard {+ padding: 30px 20px;++ &.popular {+ transform: none;+ }+ }++ .cardHeader {+ .planName {+ font-size: 1.75rem;+ }++ .priceContainer {+ .price {+ font-size: 2rem;+ }+ }+ }++ .faqSection {+ padding: 40px 20px;++ .faqTitle {+ font-size: 2rem;+ }+ }+}++@media (max-width: 480px) {+ .header {+ .title {+ font-size: 1.75rem;+ }+ }++ .pricingCard {+ padding: 25px 16px;+ }++ .cardHeader {+ .planName {+ font-size: 1.5rem;+ }++ .priceContainer {+ .price {+ font-size: 1.75rem;+ }+ }+ }+}diff --git a/src/app/i18n/locales/en/pricing.json b/src/app/i18n/locales/en/pricing.jsonnew file mode 100644index 00000000..01bd4a32--- /dev/null+++ b/src/app/i18n/locales/en/pricing.json@@ -0,0 +1,38 @@+{+ "title": "Plans & Pricing",+ "subtitle": "Choose the plan that best fits your needs and start your AI creation journey",+ "monthly": "Monthly",+ "yearly": "Yearly",+ "save50": "Save 50%",+ "month": "mo",+ "credits": "Credits",+ "videos": "Videos",+ "images": "Images",+ "flashSale50": "Flash Sale 50%",+ "mostPopular": "Most Popular",+ "faq": {+ "title": "Frequently Asked Questions",+ "items": [+ {+ "question": "How do I choose the right plan?",+ "answer": "If you're an individual user or just starting with AI creation, we recommend trying the Free plan first. If you need more features and higher usage limits, the Plus plan is a better choice."+ },+ {+ "question": "Can I upgrade or downgrade my plan anytime?",+ "answer": "Yes, you can upgrade to a higher plan at any time. Downgrades will take effect at the end of your current billing cycle."+ },+ {+ "question": "How are credits calculated?",+ "answer": "Credits are calculated based on the type and complexity of content you generate. Video generation consumes more credits, while image generation uses fewer credits."+ },+ {+ "question": "What payment methods do you support?",+ "answer": "We support various payment methods including credit cards, debit cards, PayPal, and more to ensure a secure and convenient payment experience."+ },+ {+ "question": "Do you have a refund policy?",+ "answer": "We offer a 7-day money-back guarantee. If you're not satisfied with our service, you can request a full refund within 7 days of purchase."+ }+ ]+ }+}diff --git a/src/app/i18n/locales/zh-CN/pricing.json b/src/app/i18n/locales/zh-CN/pricing.jsonnew file mode 100644index 00000000..53d28e3a--- /dev/null+++ b/src/app/i18n/locales/zh-CN/pricing.json@@ -0,0 +1,38 @@+{+ "title": "套餐与定价",+ "subtitle": "选择最适合您需求的套餐,开始您的AI创作之旅",+ "monthly": "月付",+ "yearly": "年付",+ "save50": "省50%",+ "month": "月",+ "credits": "积分",+ "videos": "视频",+ "images": "图片",+ "flashSale50": "限时5折",+ "mostPopular": "最受欢迎",+ "faq": {+ "title": "常见问题",+ "items": [+ {+ "question": "如何选择合适的套餐?",+ "answer": "如果您是个人用户或刚开始使用AI创作,建议选择Free套餐体验。如果您需要更多功能和更高的使用限制,Plus套餐是更好的选择。"+ },+ {+ "question": "可以随时升级或降级套餐吗?",+ "answer": "是的,您可以随时升级到更高套餐。降级将在当前计费周期结束后生效。"+ },+ {+ "question": "积分是如何计算的?",+ "answer": "积分根据您生成的内容类型和复杂度计算。视频生成消耗更多积分,图片生成消耗较少积分。"+ },+ {+ "question": "支持哪些支付方式?",+ "answer": "我们支持信用卡、借记卡、PayPal等多种支付方式,确保安全便捷的支付体验。"+ },+ {+ "question": "有退款政策吗?",+ "answer": "我们提供7天无理由退款保证。如果您对服务不满意,可以在购买后7天内申请全额退款。"+ }+ ]+ }+}