diff --git a/video-gen-api/app/main.py b/video-gen-api/app/main.py index d4698c22..da9f41d4 100644 --- a/video-gen-api/app/main.py +++ b/video-gen-api/app/main.py @@ -400,12 +400,27 @@ async def _seed_data(): ("/generated", "素材云", "CloudOutlined", 1, "资产管理", True), ("/authorization", "授权管理", "UserOutlined", 0, "媒体关联", False), ("/consume", "消耗列表", "FileTextOutlined", 1, "媒体关联", False), + ("/popular", "热门广场", "ThunderboltOutlined", 0, "AI项目行业生成", False), + ("/creativeplaza", "创意广场", "GiftOutlined", 0, "AI对话生成", False), ] for path, label, icon, order, group_label, is_default in frontend_pages: existing = await db.execute( - select(MenuConfig).where(MenuConfig.path == path).limit(1) + select(MenuConfig).where( + MenuConfig.path == path, + MenuConfig.menu_target == "frontend", + ).limit(1) ) - if not existing.scalar_one_or_none(): + existing_page = existing.scalar_one_or_none() + if existing_page: + # Update existing menu item if needed + if existing_page.label != label or existing_page.icon != icon or \ + existing_page.sort_order != order or existing_page.is_default != is_default: + existing_page.label = label + existing_page.icon = icon + existing_page.sort_order = order + existing_page.is_default = is_default + existing_page.parent_id = frontend_group_ids.get(group_label) + else: db.add( MenuConfig( id=generate_id(), diff --git a/video-gen-app/src/pages/CreativePlazaPage.tsx b/video-gen-app/src/pages/CreativePlazaPage.tsx index b69c7911..da1eecd5 100644 --- a/video-gen-app/src/pages/CreativePlazaPage.tsx +++ b/video-gen-app/src/pages/CreativePlazaPage.tsx @@ -1,48 +1,103 @@ -import React, { useState } from 'react'; -import { Button, Card, Modal, message, Typography, Space } from 'antd'; +import React from 'react'; +import { Button, Card, message, Typography } from 'antd'; import { StarOutlined, LockOutlined, - PhoneOutlined, - MailOutlined, - MessageOutlined, GiftOutlined, - BellOutlined, - WalletOutlined, - ThunderboltOutlined, + SparklesOutlined, + PlayCircleOutlined, + CheckCircleOutlined, + HeartOutlined, } from '@ant-design/icons'; const CreativePlazaPage: React.FC = () => { - const [modalOpen, setModalOpen] = useState(false); + const handleUnlock = () => { + message.info('请联系客服开通VIP会员,客服热线:400-888-8888'); + }; - const creativeFeatures = [ + const caseStudies = [ { - icon: , - title: '创意灵感', - description: '海量创意灵感库,激发无限创作潜能', - color: 'linear-gradient(135deg, rgba(236,72,153,0.1) 0%, rgba(236,72,153,0.05) 100%)', - borderColor: 'rgba(236,72,153,0.2)', + id: 1, + title: '品牌宣传视频', + category: '商业广告', + description: '为知名品牌打造的创意宣传视频,展现品牌理念与产品特色', + tags: ['AI生成', '品牌推广', '创意设计'], + thumbnail: 'https://neeko-copilot.bytedance.net/api/text_to_image?prompt=professional%20brand%20promotional%20video%20advertisement%20modern&image_size=landscape_16_9', + duration: '0:45', + quality: '4K', }, { - icon: , - title: '素材集市', - description: '丰富素材资源,打造独特作品风格', - color: 'linear-gradient(135deg, rgba(6,182,212,0.1) 0%, rgba(6,182,212,0.05) 100%)', - borderColor: 'rgba(6,182,212,0.2)', + id: 2, + title: '产品展示动画', + category: '电商展示', + description: '3D产品展示动画,让产品细节完美呈现', + tags: ['3D渲染', '产品展示', '电商'], + thumbnail: 'https://neeko-copilot.bytedance.net/api/text_to_image?prompt=3D%20product%20showcase%20animation%20ecommerce&image_size=landscape_16_9', + duration: '0:30', + quality: '4K', }, { - icon: , - title: '特效工坊', - description: '专业特效工具,提升视频质感', - color: 'linear-gradient(135deg, rgba(139,92,246,0.1) 0%, rgba(139,92,246,0.05) 100%)', - borderColor: 'rgba(139,92,246,0.2)', + id: 3, + title: '教育培训课程', + category: '知识分享', + description: '生动有趣的教育内容,让学习更加轻松愉快', + tags: ['教育', '知识', '在线课程'], + thumbnail: 'https://neeko-copilot.bytedance.net/api/text_to_image?prompt=educational%20video%20learning%20classroom%20modern&image_size=landscape_16_9', + duration: '15:20', + quality: '1080P', }, { - icon: , - title: '精品模板', - description: '精选高品质模板,一键快速出片', - color: 'linear-gradient(135deg, rgba(245,158,11,0.1) 0%, rgba(245,158,11,0.05) 100%)', - borderColor: 'rgba(245,158,11,0.2)', + id: 4, + title: '短视频创意', + category: '社交媒体', + description: '适合各大社交平台的创意短视频内容', + tags: ['短视频', '社交', '创意'], + thumbnail: 'https://neeko-copilot.bytedance.net/api/text_to_image?prompt=creative%20short%20video%20social%20media%20vibrant&image_size=landscape_16_9', + duration: '0:15', + quality: '1080P', + }, + { + id: 5, + title: '企业宣传片', + category: '企业形象', + description: '全方位展示企业实力与文化的专业宣传片', + tags: ['企业', '宣传片', '品牌'], + thumbnail: 'https://neeko-copilot.bytedance.net/api/text_to_image?prompt=corporate%20video%20company%20profile%20professional&image_size=landscape_16_9', + duration: '2:30', + quality: '4K', + }, + { + id: 6, + title: '动画短片', + category: '创意动画', + description: '精美的AI生成动画短片,展现无限创意', + tags: ['动画', 'AI艺术', '创意'], + thumbnail: 'https://neeko-copilot.bytedance.net/api/text_to_image?prompt=creative%20animated%20short%20film%20colorful%20artistic&image_size=landscape_16_9', + duration: '1:30', + quality: '4K', + }, + ]; + + const features = [ + { + icon: , + title: 'AI智能生成', + description: '先进的AI技术,一键生成高质量视频内容', + }, + { + icon: , + title: '多格式输出', + description: '支持多种视频格式,满足不同场景需求', + }, + { + icon: , + title: '品质保证', + description: '专业级画质,细节清晰,色彩鲜艳', + }, + { + icon: , + title: '创意无限', + description: '丰富的模板和风格,激发创作灵感', }, ]; @@ -64,24 +119,27 @@ const CreativePlazaPage: React.FC = () => {
- 创意广场 + 创意素材案例 - 释放你的创作灵感 + 探索AI创作无限可能
+ + 精选AI生成的优秀素材案例,展示AI创作的无限潜力与创意灵感 +
- {creativeFeatures.map((feature, index) => ( + {features.map((feature, index) => ( @@ -98,280 +156,109 @@ const CreativePlazaPage: React.FC = () => { ))}
-
- + + + 精选案例展示 + +
- -
-
-
- -
- - 解锁创意广场 - - - 升级VIP会员,畅享创意广场全部功能 - -
-
-
-
- -
- - 创意灵感库 - - - 海量创意灵感,激发无限创作潜能 - -
-
-
- -
- - 精品素材库 - - - 精选高品质素材,打造独特作品风格 - -
- -
-
-
- - 联系客服开通} - open={modalOpen} - onCancel={() => setModalOpen(false)} - footer={null} - width={480} - > -
-
- - 开通VIP会员 - - - 开通VIP会员即可解锁创意广场全部功能,享受创意灵感库、精品素材库、特效工坊等特权服务。 - -
- -
-
-
- -
-
- 客服热线 -
400-888-8888
-
-
- -
-
- -
-
- 邮箱地址 -
vip@videogen.ai
-
-
-
- - -
-
+
+ {caseItem.title} +
+ {caseItem.category} +
+
+ {caseItem.duration} | {caseItem.quality} +
+
+
+ + {caseItem.title} + + + {caseItem.description} + +
+ {caseItem.tags.map((tag, index) => ( + + {tag} + + ))} +
+ +
+ + ))} + ); }; diff --git a/video-gen-app/src/pages/PopularPage.tsx b/video-gen-app/src/pages/PopularPage.tsx index 6cf1f556..ef6fc02e 100644 --- a/video-gen-app/src/pages/PopularPage.tsx +++ b/video-gen-app/src/pages/PopularPage.tsx @@ -1,47 +1,78 @@ -import React, { useState } from 'react'; -import { Button, Card, Modal, message, Typography, Space } from 'antd'; +import React from 'react'; +import { Button, Card, message, Typography } from 'antd'; import { StarOutlined, CrownOutlined, LockOutlined, - PhoneOutlined, - MailOutlined, - MessageOutlined, ThunderboltOutlined, GiftOutlined, + TrendingUpOutlined, + FlameOutlined, + AwardOutlined, } from '@ant-design/icons'; const PopularPage: React.FC = () => { - const [modalOpen, setModalOpen] = useState(false); + const handleUnlock = () => { + message.info('请联系客服开通VIP会员,客服热线:400-888-8888'); + }; - const features = [ + const industries = [ + { name: '美妆护肤', hot: 'HOT', trend: '+125%', color: '#ec4899' }, + { name: '美食餐饮', hot: '', trend: '+89%', color: '#f59e0b' }, + { name: '服饰穿搭', hot: 'NEW', trend: '+76%', color: '#10b981' }, + { name: '数码科技', hot: '', trend: '+64%', color: '#06b6d4' }, + { name: '家居生活', hot: '', trend: '+52%', color: '#8b5cf6' }, + { name: '运动健身', hot: 'HOT', trend: '+48%', color: '#6366f1' }, + ]; + + const hotMaterials = [ { - icon: , - title: '热门趋势', - description: '实时追踪行业热点,把握创作风向', - color: 'linear-gradient(135deg, rgba(245,158,11,0.1) 0%, rgba(245,158,11,0.05) 100%)', - borderColor: 'rgba(245,158,11,0.2)', + id: 1, + title: '夏日清爽护肤教程', + industry: '美妆护肤', + views: '2.3M', + likes: '156K', + thumbnail: 'https://neeko-copilot.bytedance.net/api/text_to_image?prompt=beautiful%20skincare%20product%20advertisement%20with%20fresh%20summer%20vibes&image_size=landscape_16_9', }, { - icon: , - title: '精选模板', - description: '精选热门视频模板,一键快速创作', - color: 'linear-gradient(135deg, rgba(236,72,153,0.1) 0%, rgba(236,72,153,0.05) 100%)', - borderColor: 'rgba(236,72,153,0.2)', + id: 2, + title: '网红美食探店vlog', + industry: '美食餐饮', + views: '1.8M', + likes: '128K', + thumbnail: 'https://neeko-copilot.bytedance.net/api/text_to_image?prompt=delicious%20food%20foodie%20vlog%20style%20restaurant&image_size=landscape_16_9', }, { - icon: , - title: '达人榜单', - description: '查看热门创作者,学习优秀作品', - color: 'linear-gradient(135deg, rgba(16,185,129,0.1) 0%, rgba(16,185,129,0.05) 100%)', - borderColor: 'rgba(16,185,129,0.2)', + id: 3, + title: '秋季穿搭灵感分享', + industry: '服饰穿搭', + views: '1.5M', + likes: '98K', + thumbnail: 'https://neeko-copilot.bytedance.net/api/text_to_image?prompt=fashion%20autumn%20outfit%20inspiration%20stylish&image_size=landscape_16_9', }, { - icon: , - title: 'VIP专属', - description: '专属内容推荐,提升创作效率', - color: 'linear-gradient(135deg, rgba(99,102,241,0.1) 0%, rgba(99,102,241,0.05) 100%)', - borderColor: 'rgba(99,102,241,0.2)', + id: 4, + title: '新品手机开箱评测', + industry: '数码科技', + views: '1.2M', + likes: '87K', + thumbnail: 'https://neeko-copilot.bytedance.net/api/text_to_image?prompt=smartphone%20unboxing%20review%20tech%20gadget&image_size=landscape_16_9', + }, + { + id: 5, + title: '家居改造前后对比', + industry: '家居生活', + views: '980K', + likes: '76K', + thumbnail: 'https://neeko-copilot.bytedance.net/api/text_to_image?prompt=home%20makeover%20before%20after%20interior%20design&image_size=landscape_16_9', + }, + { + id: 6, + title: '健身房训练日常', + industry: '运动健身', + views: '850K', + likes: '65K', + thumbnail: 'https://neeko-copilot.bytedance.net/api/text_to_image?prompt=gym%20workout%20fitness%20training%20motivation&image_size=landscape_16_9', }, ]; @@ -59,232 +90,156 @@ const PopularPage: React.FC = () => { justifyContent: 'center', boxShadow: '0 4px 16px rgba(245,158,11,0.3)', }}> - +
- 热门广场 + 行业爆款大盘 - 发现更多精彩内容 + 发现热门素材趋势
- - -
- {features.map((feature, index) => ( - -
-
{feature.icon}
- - {feature.title} - - - {feature.description} - -
-
- ))} + + 实时追踪各行业爆款素材,把握创作风向,打造热门内容 +
-
-
-
- -
- - 解锁更多精彩 - - - 升级VIP会员,畅享热门广场全部功能 - -
-
-
-
- -
- - VIP专属内容 - - - 热门模板、独家素材、优先推荐 - -
-
-
- -
- - 智能推荐算法 - - - 基于AI分析,精准推荐优质内容 - -
- -
+
+ {index + 1} + {industry.hot && ( + + {industry.hot} + + )} +
+ + {industry.name} + +
+ {industry.trend} +
+
+ ))}
- 联系客服开通} - open={modalOpen} - onCancel={() => setModalOpen(false)} - footer={null} - width={480} - > -
-
- - 开通VIP会员 - - - 开通VIP会员即可解锁热门广场全部功能,享受专属内容推荐、精选模板库、达人榜单等特权服务。 - -
- -
-
-
- -
-
- 客服热线 -
400-888-8888
-
-
- -
-
- -
-
- 邮箱地址 -
vip@videogen.ai
-
-
-
+
+ + + 爆款素材榜单 + + +
- -
-
+
+ {material.title} +
+ {material.industry} +
+
+
+ + {material.title} + +
+ {material.views} 播放 + {material.likes} 点赞 +
+ +
+ + ))} + ); };