This commit is contained in:
2026-06-26 10:41:23 +08:00
parent a6db2bf400
commit 8c33c824ab
3 changed files with 47 additions and 306 deletions
+5
View File
@@ -357,7 +357,10 @@ async def _seed_data():
menu_count = await db.execute(select(func.count(MenuConfig.id)))
menu_count_result = menu_count.scalar_one()
logging.info(f"Menu config count: {menu_count_result}")
if menu_count_result == 0:
logging.info("Inserting default menu configs...")
frontend_groups = [
("AI项目行业生成", "HomeOutlined", 0),
("AI对话生成", "HomeOutlined", 1),
@@ -469,6 +472,8 @@ async def _seed_data():
)
)
logging.info("Default menu configs inserted successfully")
# Seed recharge packages
from app.models.recharge_package import RechargePackage
+14 -146
View File
@@ -12,71 +12,9 @@ import {
const CreativePlazaPage: React.FC = () => {
const handleUnlock = () => {
message.info('请联系客服开通VIP会员,客服热线:400-888-8888');
message.info('请联系客服开通');
};
const caseStudies = [
{
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',
},
{
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',
},
{
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',
},
{
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 = [
{
@@ -176,89 +114,19 @@ const CreativePlazaPage: React.FC = () => {
</Button>
</div>
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 20 }}>
{caseStudies.map((caseItem) => (
<Card
key={caseItem.id}
bordered={false}
style={{
borderRadius: 16,
overflow: 'hidden',
boxShadow: '0 4px 16px rgba(0,0,0,0.06)',
}}
>
<div style={{ position: 'relative' }}>
<img
src={caseItem.thumbnail}
alt={caseItem.title}
style={{ width: '100%', height: 180, objectFit: 'cover' }}
/>
<div style={{
position: 'absolute',
top: 12,
left: 12,
padding: '4px 12px',
background: 'rgba(139,92,246,0.9)',
borderRadius: 8,
color: '#fff',
fontSize: 12,
}}>
{caseItem.category}
</div>
<div style={{
position: 'absolute',
bottom: 12,
right: 12,
padding: '4px 10px',
background: 'rgba(0,0,0,0.7)',
borderRadius: 6,
color: '#fff',
fontSize: 11,
}}>
{caseItem.duration} | {caseItem.quality}
</div>
</div>
<div style={{ padding: 16 }}>
<Typography.Title level={5} style={{ marginBottom: 8, color: '#1e293b' }}>
{caseItem.title}
</Typography.Title>
<Typography.Text style={{ color: '#64748b', fontSize: 13, marginBottom: 12, display: 'block' }}>
{caseItem.description}
</Typography.Text>
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 8, marginBottom: 12 }}>
{caseItem.tags.map((tag, index) => (
<span
key={index}
style={{
padding: '4px 12px',
background: 'rgba(99,102,241,0.08)',
borderRadius: 20,
color: '#6366f1',
fontSize: 12,
}}
>
{tag}
</span>
))}
</div>
<Button
type="primary"
block
size="small"
onClick={handleUnlock}
style={{
borderRadius: 8,
background: 'linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)',
border: 'none',
}}
>
<ThunderboltOutlined style={{ marginRight: 4 }} />
</Button>
</div>
</Card>
))}
</div>
<Card
bordered={false}
style={{
borderRadius: 16,
background: '#fafafa',
padding: 40,
textAlign: 'center',
}}
>
<div style={{ color: '#94a3b8', fontSize: 14 }}>
</div>
</Card>
</div>
);
};
+28 -160
View File
@@ -13,69 +13,9 @@ import {
const PopularPage: React.FC = () => {
const handleUnlock = () => {
message.info('请联系客服开通VIP会员,客服热线:400-888-8888');
message.info('请联系客服开通');
};
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 = [
{
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',
},
{
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',
},
{
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',
},
{
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',
},
];
return (
<div style={{ padding: '20px 0' }}>
<div style={{ marginBottom: 32 }}>
@@ -112,7 +52,7 @@ const PopularPage: React.FC = () => {
borderRadius: 20,
background: 'linear-gradient(135deg, rgba(245,158,11,0.04) 0%, rgba(217,119,6,0.04) 100%)',
border: '1px solid rgba(245,158,11,0.1)',
padding: 24,
padding: 10,
marginBottom: 32,
}}
>
@@ -120,47 +60,19 @@ const PopularPage: React.FC = () => {
<FireOutlined style={{ marginRight: 8, color: '#f59e0b' }} />
</Typography.Title>
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(6, 1fr)', gap: 16 }}>
{industries.map((industry, index) => (
<div
key={index}
style={{
background: '#fff',
borderRadius: 12,
padding: 16,
textAlign: 'center',
boxShadow: '0 2px 8px rgba(0,0,0,0.04)',
}}
>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 4, marginBottom: 8 }}>
<span style={{ fontSize: 20, fontWeight: 700, color: industry.color }}>{index + 1}</span>
{industry.hot && (
<span style={{
fontSize: 10,
padding: '2px 8px',
borderRadius: 10,
background: industry.hot === 'HOT' ? 'rgba(239,68,68,0.1)' : 'rgba(16,185,129,0.1)',
color: industry.hot === 'HOT' ? '#ef4444' : '#10b981',
fontWeight: 600,
}}>
{industry.hot}
</span>
)}
</div>
<Typography.Text strong style={{ color: '#1e293b', fontSize: 14 }}>
{industry.name}
</Typography.Text>
<div style={{
marginTop: 8,
fontSize: 12,
color: '#10b981',
fontWeight: 600,
}}>
{industry.trend}
</div>
</div>
))}
</div>
<Card
bordered={false}
style={{
borderRadius: 16,
background: '#fafafa',
padding: 40,
textAlign: 'center',
}}
>
<div style={{ color: '#94a3b8', fontSize: 14 }}>
</div>
</Card>
</Card>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 20 }}>
@@ -183,63 +95,19 @@ const PopularPage: React.FC = () => {
</Button>
</div>
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 20 }}>
{hotMaterials.map((material) => (
<Card
key={material.id}
bordered={false}
style={{
borderRadius: 16,
overflow: 'hidden',
boxShadow: '0 4px 16px rgba(0,0,0,0.06)',
}}
>
<div style={{ position: 'relative' }}>
<img
src={material.thumbnail}
alt={material.title}
style={{ width: '100%', height: 180, objectFit: 'cover' }}
/>
<div style={{
position: 'absolute',
top: 12,
left: 12,
padding: '4px 12px',
background: 'rgba(0,0,0,0.6)',
borderRadius: 8,
color: '#fff',
fontSize: 12,
}}>
{material.industry}
</div>
</div>
<div style={{ padding: 16 }}>
<Typography.Title level={5} style={{ marginBottom: 8, color: '#1e293b' }}>
{material.title}
</Typography.Title>
<div style={{ display: 'flex', alignItems: 'center', gap: 16, color: '#64748b', fontSize: 13 }}>
<span><StarOutlined style={{ marginRight: 4 }} />{material.views} </span>
<span><CrownOutlined style={{ marginRight: 4 }} />{material.likes} </span>
</div>
<Button
type="primary"
block
size="small"
onClick={handleUnlock}
style={{
marginTop: 12,
borderRadius: 8,
background: 'linear-gradient(135deg, #f59e0b 0%, #d97706 100%)',
border: 'none',
}}
>
<ThunderboltOutlined style={{ marginRight: 4 }} />
</Button>
</div>
</Card>
))}
</div>
<Card
bordered={false}
style={{
borderRadius: 16,
background: '#fafafa',
padding: 40,
textAlign: 'center',
}}
>
<div style={{ color: '#94a3b8', fontSize: 14 }}>
</div>
</Card>
</div>
);
};