逻辑更改

This commit is contained in:
海龙 2025-08-07 14:48:28 +08:00
parent f3303456fb
commit 526b4d5cd1
2 changed files with 2 additions and 4 deletions

View File

@ -639,8 +639,6 @@ export const getProjectScript = async (request: {
project_id: string;
/** 生成的剧本文本 */
generated_script: string;
/**用户想法 */
script:string
}>
>("/movie/get_generated_script_by_project_id", request);
};

View File

@ -206,7 +206,7 @@ export const useScriptService = (): UseScriptService => {
* @param projectId ID
*/
const initializeFromProject = useCallback(
async (projectId: string): Promise<void> => {
async (projectId: string,script:string): Promise<void> => {
try {
setLoading(true);
@ -216,7 +216,7 @@ export const useScriptService = (): UseScriptService => {
// 调用API获取项目剧本数据
const response = await getProjectScript({ project_id: projectId });
if(response.data.generated_script===''){
await generateScriptFromIdea(response.data.script,projectId)
await generateScriptFromIdea(script,projectId)
return
}
if (!response.successful) {