diff --git a/video-gen-app/src/App.css b/video-gen-app/src/App.css index f90339d8..032d5d96 100644 --- a/video-gen-app/src/App.css +++ b/video-gen-app/src/App.css @@ -17,6 +17,7 @@ } } + .hero { position: relative; diff --git a/video-gen-app/src/App.tsx b/video-gen-app/src/App.tsx index 6c62ed35..ae25c231 100644 --- a/video-gen-app/src/App.tsx +++ b/video-gen-app/src/App.tsx @@ -19,12 +19,17 @@ import RemoveLens from './pages/RemoveLens'; import GeneratedRecord from './pages/GeneratedRecord'; import AuthorizationPage from './pages/AuthorizationPage'; import RemoveInfo from './pages/RemoveInfo'; +import RemoveRw from './pages/RemoveRw'; +// import RemoveFenbu from './pages/RemoveFenbu'; + + import ConsumePage from './pages/ConsumePage'; + import { useAuthStore } from './store/useAuthStore'; const ProtectedRoute = ({ children }: { children: React.ReactNode }) => { @@ -107,6 +112,10 @@ const App = () => { } /> } /> } /> + } /> + {/* } /> */} + + } /> } /> } /> diff --git a/video-gen-app/src/api/index.ts b/video-gen-app/src/api/index.ts index 96f28bcc..d789cb8d 100644 --- a/video-gen-app/src/api/index.ts +++ b/video-gen-app/src/api/index.ts @@ -378,7 +378,7 @@ export async function getReplicationDetail(id: string): Promise { export async function getone(projectId: string, stepId: string): Promise { return api.post(`/hot-opening-replications/tasks/${projectId}/steps/${stepId}/generate-image-prompt`); } - + // 第二步,生成图片 export async function gettwo(projectId: string, stepId: string ,params: any): Promise { return api.post(`/hot-opening-replications/tasks/${projectId}/steps/${stepId}/generate-image`, params); @@ -392,3 +392,68 @@ export async function getthree(projectId: string, stepId: string ,params: any): export async function getfour(projectId: string, stepId: string ,params: any): Promise { return api.post(`/hot-opening-replications/tasks/${projectId}/steps/${stepId}/generate-video`, params); } + +// 镜头复刻 +export async function createShotReplication(params: any): Promise { + return api.post('/shot-replications/task-sets', params); +} +// 获取镜头复刻任务列表 +export async function getShotReplicationList(page: number, page_size: number): Promise { + return api.get(`/shot-replications/task-sets?page=${page}&page_size=${page_size}`); +} +// 获取镜头复刻任务详情 +export async function getShotReplicationDetail(taskSetId: string): Promise { + return api.get(`/shot-replications/task-sets/${taskSetId}`); +} + +// ai拆镜 +export async function createRemoveLens(taskSetId: string, params: any): Promise { + return api.post(`/shot-replications/task-sets/${taskSetId}/split-by-ai`, params); +} + +// 手动分割 +export async function splitCustom(taskSetId: string, params: any): Promise { + return api.post(`/shot-replications/task-sets/${taskSetId}/split-custom`, params); +} + +// 拆镜列表 +export async function Removelist(taskSetId: string): Promise { + return api.get(`/shot-replications/task-sets/${taskSetId}/segments`); +} + +// 生成视频 +export async function removeCreate(recordId: string, params: any): Promise { + return api.post(`/shot-replications/segments/${recordId}/replication-projects`, params); +} + + + + +// 获取爆款开头复刻任务详情 +export async function removeDetail(id: string): Promise { + return api.get(`/shot-replications/projects/${id}`); +} + +// 第一步,生成提示词 +export async function removeone(projectId: string, stepId: string): Promise { + return api.post(`/shot-replications/projects/${projectId}/steps/${stepId}/generate-image-prompt`); + +} + +// 第二步,生成图片 +export async function removetwo(projectId: string, stepId: string ,params: any): Promise { + return api.post(`/shot-replications/projects/${projectId}/steps/${stepId}/generate-image`, params); +} + +// 第三步,生成视频提示词 +export async function removethree(projectId: string, stepId: string ,params: any): Promise { + return api.post(`/shot-replications/projects/${projectId}/steps/${stepId}/generate-video-prompt`, params); + + +} +// 第四步,生成视频 +export async function removefour(projectId: string, stepId: string ,params: any): Promise { + return api.post(`/shot-replications/projects/${projectId}/steps/${stepId}/generate-video`, params); + +} +// diff --git a/video-gen-app/src/components/Layout/AppLayout.tsx b/video-gen-app/src/components/Layout/AppLayout.tsx index 83b5945c..75016123 100644 --- a/video-gen-app/src/components/Layout/AppLayout.tsx +++ b/video-gen-app/src/components/Layout/AppLayout.tsx @@ -167,7 +167,7 @@ const AppLayout: React.FC = () => { const countdownTimerRef = useRef | null>(null); const currentOrderNoRef = useRef(null); const [enabledMethods, setEnabledMethods] = useState<{ alipay: boolean; wechat: boolean }>({ alipay: false, wechat: false }); - + // LocalStorage keys const PENDING_ORDER_KEY = 'pending_payment_order'; @@ -177,12 +177,12 @@ const AppLayout: React.FC = () => { getSiteInfo().then(info => { const name = info.siteName || '民众智创'; const logo = info.siteLogo || ''; - + if (name !== siteName) { setSiteName(name); document.title = name; } - + if (logo && logo !== siteLogo) { setSiteLogo(logo); let faviconLink = document.querySelector('link[rel="icon"]') as HTMLLinkElement; @@ -194,15 +194,15 @@ const AppLayout: React.FC = () => { faviconLink.href = logo; faviconLink.type = 'image/png'; } - + localStorage.setItem('siteInfo', JSON.stringify({ siteName: name, siteLogo: logo })); - }).catch(() => {}); + }).catch(() => { }); }, []); const loadUnreadCount = () => { getUnreadCount().then(count => { setUnreadCount(count); - }).catch(() => {}); + }).catch(() => { }); }; // 检查并恢复待处理的支付订单 @@ -229,7 +229,7 @@ const AppLayout: React.FC = () => { const timeoutSeconds = savedOrder.timeoutSeconds || 180; const elapsedSeconds = Math.floor((now - createdAt) / 1000); const remainingSeconds = Math.max(0, timeoutSeconds - elapsedSeconds); - + if (remainingSeconds > 0) { setQrCodeModalOpen(true); startPolling(savedOrder.orderNo, remainingSeconds); @@ -252,7 +252,7 @@ const AppLayout: React.FC = () => { } } }; - + checkPendingOrder(); }, []); @@ -274,16 +274,16 @@ const AppLayout: React.FC = () => { }); } setMenuItems(items); - }).catch(() => {}); + }).catch(() => { }); getRechargePackages().then(data => { setRechargeOptions(data.filter((p: any) => p.is_active !== false && p.isActive !== false)); - }).catch(() => {}); + }).catch(() => { }); getPaymentMethods().then(data => { setEnabledMethods(data); // Auto-select the first enabled method if (data.alipay) setPaymentMethod('alipay'); else if (data.wechat) setPaymentMethod('wechat'); - }).catch(() => {}); + }).catch(() => { }); loadUnreadCount(); }, [user]); @@ -344,7 +344,7 @@ const AppLayout: React.FC = () => { const startPolling = useCallback((orderNo: string, timeoutSeconds: number = 180) => { stopPolling(); setCountdown(timeoutSeconds); - + // 订单状态轮询(每2秒查询一次,只查询当前订单 const pollingTimer = setInterval(async () => { try { @@ -368,7 +368,7 @@ const AppLayout: React.FC = () => { } }, 2000); pollingTimerRef.current = pollingTimer; - + // 倒计时 const countdownTimer = setInterval(() => { setCountdown(prev => { @@ -376,7 +376,7 @@ const AppLayout: React.FC = () => { // 超时自动取消 stopPolling(); if (currentOrderNoRef.current) { - cancelPaymentOrder(currentOrderNoRef.current).catch(() => {}); + cancelPaymentOrder(currentOrderNoRef.current).catch(() => { }); currentOrderNoRef.current = null; } localStorage.removeItem(PENDING_ORDER_KEY); @@ -474,8 +474,8 @@ const AppLayout: React.FC = () => { background: isActive ? 'linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%)' : 'transparent', transition: 'all 0.2s ease', }}> - 0 ? 14 : 16, + 0 ? 14 : 16, flexShrink: 0, color: isActive ? '#6366f1' : '#64748b', }}>{menuIcon} @@ -521,13 +521,13 @@ const AppLayout: React.FC = () => { boxShadow: '0 4px 16px rgba(99, 102, 241, 0.4)', transition: 'all 0.3s ease', }} - onMouseEnter={(e) => { - e.currentTarget.style.background = 'linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%)'; + onMouseEnter={(e) => { + e.currentTarget.style.background = 'linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%)'; e.currentTarget.style.transform = 'translateY(-1px)'; e.currentTarget.style.boxShadow = '0 6px 20px rgba(99, 102, 241, 0.5)'; }} - onMouseLeave={(e) => { - e.currentTarget.style.background = 'linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)'; + onMouseLeave={(e) => { + e.currentTarget.style.background = 'linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)'; e.currentTarget.style.transform = 'translateY(0)'; e.currentTarget.style.boxShadow = '0 4px 16px rgba(99, 102, 241, 0.4)'; }} @@ -544,7 +544,7 @@ const AppLayout: React.FC = () => { justifyContent: 'flex-start', gap: 12, padding: '10px 14px', - borderRadius: 14, cursor: 'pointer', + borderRadius: 14, cursor: 'pointer', transition: 'all 0.25s ease', background: 'linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.9) 100%)', boxShadow: '0 2px 12px rgba(0, 0, 0, 0.04)', @@ -559,8 +559,8 @@ const AppLayout: React.FC = () => { }} > } - style={{ - background: 'linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)', + style={{ + background: 'linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)', flexShrink: 0, boxShadow: '0 4px 12px rgba(99, 102, 241, 0.3)', }} /> @@ -568,9 +568,9 @@ const AppLayout: React.FC = () => {
{user?.username}
-
{ {/* Main Content */}
{ const g = GRADIENTS[idx % GRADIENTS.length]; const totalCredits = (opt.credits || 0) + (opt.bonus_credits || opt.bonusCredits || 0); return ( -
setSelectedPlan(opt.id)} style={{ - flex: '1 1 45%', minWidth: 200, borderRadius: 16, padding: '20px 16px', - background: selectedPlan === opt.id ? 'rgba(99,102,241,0.04)' : '#fafbff', - border: selectedPlan === opt.id ? '2px solid #6366f1' : '1px solid #f0f0f5', - cursor: 'pointer', position: 'relative', transition: 'all 0.2s', - }}> - {opt.description && ( - {opt.description} - )} -
-
{g.icon}
-
-
- {opt.name} - {totalCredits.toLocaleString()} 积分 -
+
setSelectedPlan(opt.id)} style={{ + flex: '1 1 45%', minWidth: 200, borderRadius: 16, padding: '20px 16px', + background: selectedPlan === opt.id ? 'rgba(99,102,241,0.04)' : '#fafbff', + border: selectedPlan === opt.id ? '2px solid #6366f1' : '1px solid #f0f0f5', + cursor: 'pointer', position: 'relative', transition: 'all 0.2s', + }}> + {opt.description && ( + {opt.description} + )} +
¥{opt.price}
+ width: 44, height: 44, borderRadius: 12, flexShrink: 0, + background: g.gradient, display: 'flex', alignItems: 'center', justifyContent: 'center', + fontSize: 18, color: '#fff', boxShadow: `0 6px 16px ${g.shadow}`, + }}>{g.icon}
+
+
+ {opt.name} + {totalCredits.toLocaleString()} 积分 +
+
¥{opt.price}
+
-
); })}
@@ -763,7 +766,7 @@ const AppLayout: React.FC = () => { setRechargeModalOpen(false); setQrCodeModalOpen(true); currentOrderNoRef.current = order.orderNo; - + // 保存到 localStorage localStorage.setItem(PENDING_ORDER_KEY, JSON.stringify({ orderNo: order.orderNo, @@ -774,7 +777,7 @@ const AppLayout: React.FC = () => { createdAt: order.createdAt || new Date().toISOString(), timeoutSeconds: 180, })); - + // Start polling for payment status startPolling(order.orderNo); } else { @@ -808,7 +811,7 @@ const AppLayout: React.FC = () => { stopPolling(); // Mark order as cancelled if it's still pending if (currentOrderNoRef.current) { - try { await cancelPaymentOrder(currentOrderNoRef.current); } catch {} + try { await cancelPaymentOrder(currentOrderNoRef.current); } catch { } currentOrderNoRef.current = null; } localStorage.removeItem(PENDING_ORDER_KEY); @@ -934,7 +937,7 @@ const AppLayout: React.FC = () => { onClick={async () => { stopPolling(); if (currentOrderNoRef.current) { - try { await cancelPaymentOrder(currentOrderNoRef.current); } catch {} + try { await cancelPaymentOrder(currentOrderNoRef.current); } catch { } currentOrderNoRef.current = null; } localStorage.removeItem(PENDING_ORDER_KEY); diff --git a/video-gen-app/src/pages/GenerateConver.tsx b/video-gen-app/src/pages/GenerateConver.tsx index 5e6d5e4b..a75e20d8 100644 --- a/video-gen-app/src/pages/GenerateConver.tsx +++ b/video-gen-app/src/pages/GenerateConver.tsx @@ -830,7 +830,7 @@ const AIChatPage: React.FC = () => { // ==================== 渲染 ==================== return ( - + {/* 左侧边栏 - 对话列表(已隐藏,保留代码) */} {false && ( { × } - bodyStyle={{ - display: 'flex', - alignItems: 'center', - justifyContent: 'center', - minHeight: '400px', + styles={{ + body: { + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + minHeight: '400px', + } }} >
@@ -2423,11 +2425,13 @@ const AIChatPage: React.FC = () => { × } - bodyStyle={{ - display: 'flex', - alignItems: 'center', - justifyContent: 'center', - minHeight: '400px', + styles={{ + body: { + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + minHeight: '400px', + } }} >
diff --git a/video-gen-app/src/pages/InitialInfo.tsx b/video-gen-app/src/pages/InitialInfo.tsx index 51002bda..cf2db716 100644 --- a/video-gen-app/src/pages/InitialInfo.tsx +++ b/video-gen-app/src/pages/InitialInfo.tsx @@ -1055,7 +1055,10 @@ function InitialInfo() { key: 'action', render: (_, record) => (
) }, { - title: '画面内容', + title: '视频内容', width: 250, - - render: (text: any, record: any) => ( -
- {record.content} -
- ) - }, - { - title: '台词', - width: 250, - - render: (text: any, record: any) => ( -
- {record.lines} -
- ) - }, - { - title: '内容策略', - width: 120, align: 'left' as const, + + render: (text: any, record: any) => ( +
+ {record.segmentContent} +
+ ) + }, + // { + // title: '台词', + // width: 250, + + // render: (text: any, record: any) => ( + //
+ // {record.lines} + //
+ // ) + // }, + { + title: '视频类型', + + width: 120, + align: 'center' as const, render: (text: any, record: any) => (
- {record.contentStrategy || '-'} + {record.segmentCategory || '-'}
) }, { title: '素材', width: 140, + align: 'center' as const, render: (text: any, record: any) => (
-
- 等待生成 -
- + + + {record.moduleProjectId ? ( + + ) : ( + + )}
) } ]; return ( - -
-
-
-
-
-
-
-
-
- 视频缩略图 +
+ + {/* 213123 */} +
+
+
+ +
+
+
+

视频总结

+
+ 上传时间: {taskDetail.createdAt} +
+ +
+
+ 产品名称: + {taskDetail.title} +
+
+ 受众群体: +
+ {(taskDetail.originalVideoAudience?.split('、') || []).map((point, index) => ( + + {point} + + ))} +
+
+
+ 视频内容: + {taskDetail.originalVideoContent} +
+
+ + +
+
+
+ +
+ + +
+ +
+ -
+ +
+ ) : ( +
+ 加载中... +
+ )} + + + + + 智能视频复刻 + -片段{currentSegment} + +