大量优化修改扣积分规则

This commit is contained in:
Azmat@qq.com
2026-09-04 17:20:22 +08:00
parent 3e904479d9
commit 15718a60bf
41 changed files with 1590 additions and 429 deletions
+14 -8
View File
@@ -29,6 +29,7 @@ import {
estimateCost,
FC_MODELS,
modelLabel,
pointsPerImageFromCatalog,
type BillingRates,
} from "../components/free-create/constants";
import type { NavigateFn } from "./route-config";
@@ -571,9 +572,14 @@ export function QuickCreatePage({
{ ratio: aspectRatio, resolution, duration: totalDuration, refs: [] },
billingRates,
);
// 商品理解和基础资产在脚本生成前无法精确报价;按每场约40积分给出透明预估,最终按成功任务结算。
// 故事板下线后每场少一次 image-2 出图,预估相应下调。
const estimatedPoints = videoEstimate.points > 0 ? videoEstimate.points + sceneCount * 40 : sceneCount * 200;
// 基础资产按图像挂牌预估;视频按挂牌秒价。最终按成功任务实扣。
const imageUnit = (() => {
const img = modelConfigs.find((m) => m.capability === "image" && m.status === "active")
|| modelConfigs.find((m) => m.capability === "image");
const listed = pointsPerImageFromCatalog(img);
return listed != null && listed > 0 ? listed : 20;
})();
const estimatedPoints = videoEstimate.listed ? videoEstimate.points + sceneCount * imageUnit : 0;
const shellClass = [
"quick-create-shell",
restoring ? "is-restoring" : "",
@@ -688,10 +694,10 @@ export function QuickCreatePage({
value={resolution}
onChange={setResolution}
disabled={isGenerating}
options={QUICK_RESOLUTIONS.map((option) => ({
...option,
disabled: Boolean(supportedResolutions.length && !supportedResolutions.includes(option.value)),
}))}
options={(supportedResolutions.length
? QUICK_RESOLUTIONS.filter((option) => supportedResolutions.includes(option.value))
: QUICK_RESOLUTIONS
)}
/>
</label>
<label className="quick-parameter-field">
@@ -727,7 +733,7 @@ export function QuickCreatePage({
</button>
) : (
<button type="button" className="quick-generate-button" onClick={() => void startGeneration()} disabled={!canStart}>
<WandSparkles /><span>{`立即生成视频 · 消耗 ${estimatedPoints} 积分`}</span>
<WandSparkles /><span>{estimatedPoints > 0 ? `立即生成视频 · 消耗 ${estimatedPoints} 积分` : "立即生成视频"}</span>
</button>
)}
</div>