forked from 77media/video-flow
逻辑更改
This commit is contained in:
parent
f3303456fb
commit
526b4d5cd1
@ -639,8 +639,6 @@ export const getProjectScript = async (request: {
|
|||||||
project_id: string;
|
project_id: string;
|
||||||
/** 生成的剧本文本 */
|
/** 生成的剧本文本 */
|
||||||
generated_script: string;
|
generated_script: string;
|
||||||
/**用户想法 */
|
|
||||||
script:string
|
|
||||||
}>
|
}>
|
||||||
>("/movie/get_generated_script_by_project_id", request);
|
>("/movie/get_generated_script_by_project_id", request);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -206,7 +206,7 @@ export const useScriptService = (): UseScriptService => {
|
|||||||
* @param projectId 项目ID
|
* @param projectId 项目ID
|
||||||
*/
|
*/
|
||||||
const initializeFromProject = useCallback(
|
const initializeFromProject = useCallback(
|
||||||
async (projectId: string): Promise<void> => {
|
async (projectId: string,script:string): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
|
||||||
@ -216,7 +216,7 @@ export const useScriptService = (): UseScriptService => {
|
|||||||
// 调用API获取项目剧本数据
|
// 调用API获取项目剧本数据
|
||||||
const response = await getProjectScript({ project_id: projectId });
|
const response = await getProjectScript({ project_id: projectId });
|
||||||
if(response.data.generated_script===''){
|
if(response.data.generated_script===''){
|
||||||
await generateScriptFromIdea(response.data.script,projectId)
|
await generateScriptFromIdea(script,projectId)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!response.successful) {
|
if (!response.successful) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user