diff --git a/video-gen-app/src/components/Layout/AppLayout.tsx b/video-gen-app/src/components/Layout/AppLayout.tsx index e0934b38..42834800 100644 --- a/video-gen-app/src/components/Layout/AppLayout.tsx +++ b/video-gen-app/src/components/Layout/AppLayout.tsx @@ -124,11 +124,12 @@ const StorageCard: React.FC<{ data: ResourceCapacityData | null }> = ({ data }) return (
@@ -144,7 +145,7 @@ const StorageCard: React.FC<{ data: ResourceCapacityData | null }> = ({ data }) > - 资源存储 + {rawPercent.toFixed(1)}% {data.enabled ? ( @@ -188,12 +189,12 @@ const StorageCard: React.FC<{ data: ResourceCapacityData | null }> = ({ data }) color: isOver ? '#ef4444' : '#94a3b8', }} > - + {/* {isOver ? `存储超额 · 超用 ${Math.abs(available).toFixed(2)} ${unit}` : `剩余 ${available.toFixed(2)} ${unit}`} - - {rawPercent.toFixed(1)}% + */} + {/* {rawPercent.toFixed(1)}% */}
)} @@ -801,14 +802,16 @@ const AppLayout: React.FC = () => { 充值积分 + {/* 资源存储容量展示(来自 getUser.resourceCapacity) */} + -
+
{ flexShrink: 0, boxShadow: '0 4px 12px rgba(99, 102, 241, 0.3)', }} /> +
{user?.username} @@ -847,8 +851,7 @@ const AppLayout: React.FC = () => {
- {/* 资源存储容量展示(来自 getUser.resourceCapacity) */} - +
diff --git a/video-gen-app/src/pages/GenerateConver.tsx b/video-gen-app/src/pages/GenerateConver.tsx index 375f3858..a2723cf3 100644 --- a/video-gen-app/src/pages/GenerateConver.tsx +++ b/video-gen-app/src/pages/GenerateConver.tsx @@ -445,6 +445,7 @@ const AIChatPage: React.FC = () => { }) .catch(() => { }); }, []); + // 轮询逻辑 - 当有任务在生成时,每5秒查询一次状态 useEffect(() => { @@ -1853,8 +1854,18 @@ const AIChatPage: React.FC = () => { }} >
{ + const [w, h] = item.value === 'auto' ? [1, 1] : item.value.split(':').map(Number); + const maxSize = 18; + if (w >= h) return maxSize; + return Math.round(maxSize * (w / h)); + })(), + height: (() => { + const [w, h] = item.value === 'auto' ? [1, 1] : item.value.split(':').map(Number); + const maxSize = 18; + if (h >= w) return maxSize; + return Math.round(maxSize * (h / w)); + })(), border: `2px solid ${selectedRatio === item.value ? '#6366f1' : '#9ca3af'}`, borderRadius: 2, marginBottom: 2, @@ -2132,8 +2143,18 @@ const AIChatPage: React.FC = () => { }} >
{ + const [w, h] = ratio.split(':').map(Number); + const maxSize = 18; + if (w >= h) return maxSize; + return Math.round(maxSize * (w / h)); + })(), + height: (() => { + const [w, h] = ratio.split(':').map(Number); + const maxSize = 18; + if (h >= w) return maxSize; + return Math.round(maxSize * (h / w)); + })(), border: `2px solid ${videoAspectRatio === ratio ? '#6366f1' : '#9ca3af'}`, borderRadius: 2, marginBottom: 2, diff --git a/video-gen-app/src/pages/GeneratePage.tsx b/video-gen-app/src/pages/GeneratePage.tsx index 51bc1948..30dd0717 100644 --- a/video-gen-app/src/pages/GeneratePage.tsx +++ b/video-gen-app/src/pages/GeneratePage.tsx @@ -494,7 +494,6 @@ const GeneratePage: React.FC = () => { if (autoPollStartedRef.current || recordItems.length === 0) return; autoPollStartedRef.current = true; - console.log('aaaa', recordItems); recordItems.forEach((r) => { if (r.projectId === projectId && r.status === "generating") { @@ -600,7 +599,6 @@ const GeneratePage: React.FC = () => { } } catch (error: any) { if (error.name !== 'AbortError') { - console.error('Optimizing polling error:', error); } } }, 3000); @@ -746,7 +744,6 @@ const GeneratePage: React.FC = () => { key: "optimize", }); } catch (error: any) { - console.error("优化提示词失败:", error); const errorMsg = error?.response?.data?.message || error?.message || @@ -897,7 +894,6 @@ const GeneratePage: React.FC = () => { } catch (error: any) { // 忽略AbortError(正常取消行为) if (error.name !== 'AbortError') { - console.error('Global polling error:', error); } } }, 5000); // 轮询间隔:5秒 @@ -1002,11 +998,9 @@ const GeneratePage: React.FC = () => { aspectRatio: record.aspectRatio || "16:9", resolution: record.resolution || "720p", }); - console.log('重新提交视频生成结果:',result); if (result.status === "failed") { setRecordStates((p) => ({ ...p, [recordId]: "failed" })); - console.log('12312'); message.error({ content: `「${projectName}」提交失败`, @@ -1023,7 +1017,6 @@ const GeneratePage: React.FC = () => { } } catch (error: any) { setRecordStates((p) => ({ ...p, [recordId]: "failed" })); - console.log('1231', error); // 尝试从错误对象中提取detail字段 let errorMessage = "提交失败"; @@ -2198,8 +2191,18 @@ const GeneratePage: React.FC = () => { >
{ + const [w, h] = item.value === "auto" ? [1, 1] : item.value.split(":").map(Number); + const maxSize = 20; + if (w >= h) return maxSize; + return Math.round(maxSize * (w / h)); + })(), + height: (() => { + const [w, h] = item.value === "auto" ? [1, 1] : item.value.split(":").map(Number); + const maxSize = 20; + if (h >= w) return maxSize; + return Math.round(maxSize * (h / w)); + })(), border: `2px solid ${selectedRatio === item.value ? "#6366f1" : "#9ca3af"}`, borderRadius: item.value === "auto" ? 3 : 3, marginBottom: 3, @@ -2208,6 +2211,7 @@ const GeneratePage: React.FC = () => { justifyContent: "center", }} > + {item.value === "auto" && ( { {/* ========== 素材案例区域 ========== */} - {/*
{
))}
-
*/} +
); }; diff --git a/video-gen-app/src/pages/InitialReplication.tsx b/video-gen-app/src/pages/InitialReplication.tsx index 0f532fc8..61c11796 100644 --- a/video-gen-app/src/pages/InitialReplication.tsx +++ b/video-gen-app/src/pages/InitialReplication.tsx @@ -404,7 +404,7 @@ const GenerateConver: React.FC = () => { }).catch((error: any) => { }); } - + }).catch((error: any) => { }); @@ -431,7 +431,7 @@ const GenerateConver: React.FC = () => { position: 'relative', // padding: '20px 32px', boxSizing: 'border-box', - + }} > @@ -442,7 +442,8 @@ const GenerateConver: React.FC = () => { {/* 顶部标题栏 */}