取消项目创建阶段的视频时长选择
This commit is contained in:
@@ -11,14 +11,7 @@ import "../project-wizard-page.css";
|
||||
|
||||
const PROJ_PAGE_SIZE = 10; // 项目列表/网格每页条数
|
||||
|
||||
// 时长 / 脚本风格 / 人设 — 与 projects-new.html 基线对齐(创建页仅作视觉选择,
|
||||
// 脚本走向细节进入 Stage 1;onCreate 契约只携带 name + product)。
|
||||
const WIZ_DURATIONS = [
|
||||
{ id: "0-15", label: "0-15 秒", shots: [4, 5], tag: "精准短片", note: "适合短平快投放" },
|
||||
{ id: "0-30", label: "0-30 秒", shots: [6, 8], tag: "卖点展开", note: "适合卖点展开" },
|
||||
{ id: "0-60", label: "0-60 秒", shots: [10, 12], tag: "故事化", note: "适合故事化表达" }
|
||||
];
|
||||
|
||||
// 创建页只保留商品与项目名;时长在脚本阶段统一落定,避免前置参数脱钩。
|
||||
const WIZ_PAGE_SIZE = 7; // 4 列 × 2 行 = 8 格,首格为「创建新商品」→ 每页 7 商品
|
||||
|
||||
type WizProductPayload = {
|
||||
@@ -61,8 +54,7 @@ export function ProjectWizardPage({ products, projects = [], preselectProductId,
|
||||
// 新建商品 · 右侧抽屉开关(抽屉实现与商品库共用 ProductCreateDrawer,保证同一流程)
|
||||
const [npOpen, setNpOpen] = useState(false);
|
||||
|
||||
// Step 2 · 配置(基础配置只保留项目名 + 成片时长;脚本风格/人物设定已移到流水线第 1 步脚本助手)
|
||||
const [duration, setDuration] = useState<string | null>("0-15");
|
||||
// Step 2 · 配置(基础配置只保留项目名;脚本风格/人物设定与时长都在流水线第 1 步统一落定)
|
||||
const [points, setPoints] = useState<Record<string, boolean>>({});
|
||||
|
||||
useEffect(() => {
|
||||
@@ -129,11 +121,9 @@ export function ProjectWizardPage({ products, projects = [], preselectProductId,
|
||||
setNpOpen(true);
|
||||
}
|
||||
|
||||
const durObj = WIZ_DURATIONS.find((d) => d.id === duration);
|
||||
|
||||
const product1Done = !!productId;
|
||||
// 信息没填完(项目名 < 2 字 / 未选时长)时「开始」禁用
|
||||
const config2Done = !!durObj && name.trim().length >= 2;
|
||||
// 项目创建只要求选商品 + 输入项目名;时长在脚本阶段确认,避免阶段前置参数脱钩
|
||||
const config2Done = name.trim().length >= 2;
|
||||
const canStart = product1Done && config2Done;
|
||||
|
||||
// 提交中状态:创建项目后 App 端全量刷新需数秒,按钮要给「创建中…」反馈,避免用户以为没点上
|
||||
@@ -150,7 +140,6 @@ export function ProjectWizardPage({ products, projects = [], preselectProductId,
|
||||
product: product.id,
|
||||
metadata: {
|
||||
wizard: {
|
||||
duration,
|
||||
selling_point_ids: selectedPoints
|
||||
}
|
||||
}
|
||||
@@ -197,7 +186,7 @@ export function ProjectWizardPage({ products, projects = [], preselectProductId,
|
||||
) : "2"}</div>
|
||||
<div>
|
||||
<div className="label">项目配置</div>
|
||||
<div className="desc">{durObj ? `${durObj.label} · ${name.trim() || "未命名"}` : "项目名 · 成片时长"}</div>
|
||||
<div className="desc">{name.trim() || "未命名"}</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -298,7 +287,7 @@ export function ProjectWizardPage({ products, projects = [], preselectProductId,
|
||||
<div className="wiz-pane">
|
||||
<div className="wiz-step-h">
|
||||
<h2>第 2 步 · 项目配置</h2>
|
||||
<p>基础配置只保留项目名和成片时长。脚本来源、风格和人物设定已移到流水线第 1 步由脚本助手引导。</p>
|
||||
<p>基础配置只保留项目名;脚本来源、风格、人物设定和最终时长都在流水线第 1 步由脚本助手统一落定。</p>
|
||||
</div>
|
||||
|
||||
<div className="field">
|
||||
@@ -306,20 +295,6 @@ export function ProjectWizardPage({ products, projects = [], preselectProductId,
|
||||
<input className="input" value={name} onChange={(event) => { setName(event.target.value); setNameTouched(true); }} />
|
||||
</div>
|
||||
|
||||
<div className="field">
|
||||
<label className="field-label">视频时长<span className="req">*</span></label>
|
||||
<div className="opt-row">
|
||||
{WIZ_DURATIONS.map((d) => (
|
||||
<div className={`opt-card${duration === d.id ? " selected" : ""}`} key={d.id} onClick={() => setDuration(d.id)}>
|
||||
<span className="badge">[ {d.tag} ]</span>
|
||||
<h4>{d.label}</h4>
|
||||
<div className="sub">{d.shots[0]}-{d.shots[1]} 镜 · 9:16</div>
|
||||
<div className="note">{d.note}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{Object.keys(points).length > 0 && (
|
||||
<div className="field" style={{ marginBottom: 0 }}>
|
||||
<label className="field-label">关键卖点(可勾选要重点突出的)</label>
|
||||
|
||||
Reference in New Issue
Block a user