diff --git a/src/components/ai/AiHelper.tsx b/src/components/ai/AiHelper.tsx index 611d909..3cbee19 100644 --- a/src/components/ai/AiHelper.tsx +++ b/src/components/ai/AiHelper.tsx @@ -29,7 +29,8 @@ type PropsType = { projIntroduction?: string; projDesc?: string; isFree: boolean; - renderData: any + renderData: any; + chargeType:any } type ProjModType = { @@ -729,6 +730,7 @@ export default function AiHelper(props: PropsType) { setActiveTab(data) } } + chargeType={props.chargeType} newMods={newProjModArray} handleGenerate={() => { // getProjDesc() diff --git a/src/components/ai/mod/AiHelperMod.tsx b/src/components/ai/mod/AiHelperMod.tsx index bb57ea8..afe5e08 100644 --- a/src/components/ai/mod/AiHelperMod.tsx +++ b/src/components/ai/mod/AiHelperMod.tsx @@ -41,6 +41,7 @@ type PropsType = { isFast: boolean; setisFast: any; setIsProjModArrayLoading: any; + chargeType: string; } type ProjModType = { @@ -520,7 +521,8 @@ export default function AiHelperMod(props: PropsType) { fontSize: 14, }}> - *功能列表数量为10~15个,如数量不满足请继续用AI生成 + {props.chargeType =='FREE'?'*功能列表数量为3~5个,如数量不满足请继续用AI生成':'*功能列表数量为10~15个,如数量不满足请继续用AI生成'} + {/* *功能列表数量为10~15个,如数量不满足请继续用AI生成 */} diff --git a/src/route/proj/ProjEdit.tsx b/src/route/proj/ProjEdit.tsx index ce13daf..02f64c8 100644 --- a/src/route/proj/ProjEdit.tsx +++ b/src/route/proj/ProjEdit.tsx @@ -39,6 +39,8 @@ type AiHelperType = { projIntroduction: string; projDesc: string; projMods: ProjModType[]; + chargeType: any + } type ProjModType = { @@ -118,6 +120,8 @@ export default function ProjEdit() { projIntroduction: '', projDesc: '', projMods: [], + chargeType: '' + }); @@ -309,7 +313,7 @@ export default function ProjEdit() { messageApi: messageApi, url: `/api/proj/get/${pathParams.projId}`, onSuccess({ data }) { - // console.log(data.aiSetting); + // console.log(data); // 当ai生成不是成功切 材料未生成时候弹出弹出框 // if (data.aiSetting.settingStatus !== "SUCCESS" && data.generate.generateStatus == GenerateStatus.NONE) { // setAiHelperModalOpen(true) @@ -361,7 +365,10 @@ export default function ProjEdit() { projId: data.projId, projIntroduction: data.projIntroduction, projDesc: data.projDesc, - projMods: data.projMods + projMods: data.projMods, + chargeType: data.pay.chargeType + + }) setprojStatus(data.projStatus) @@ -382,7 +389,8 @@ export default function ProjEdit() { projId: data.projId, projIntroduction: data.projIntroduction, projDesc: data.projDesc, - projMods: data.projMods + projMods: data.projMods, + chargeType: data.pay.chargeType }) if (!data.projIntroduction) { setAiHelperModalOpen(true) @@ -659,7 +667,7 @@ export default function ProjEdit() { window.open(`${Axios.defaults?.baseURL}/route/proj/download/code/pdf/${pathParams.projId}`) }} /> */} - + {/* {*/} @@ -759,6 +767,8 @@ export default function ProjEdit() { projId={aiHelper.projId} projIntroduction={aiHelper.projIntroduction} projDesc={aiHelper.projDesc} + chargeType={aiHelper.chargeType} + isFree={false} renderData={() => { renderData() diff --git a/src/route/proj/ProjEditFree.tsx b/src/route/proj/ProjEditFree.tsx index 70c1f1f..f534447 100644 --- a/src/route/proj/ProjEditFree.tsx +++ b/src/route/proj/ProjEditFree.tsx @@ -33,6 +33,7 @@ type AiHelperType = { projIntroduction: string; projDesc: string; projMods: ProjModType[]; + chargeType: string; } type ProjModType = { name: string, @@ -74,6 +75,7 @@ export default function ProjEdit() { projIntroduction: '', projDesc: '', projMods: [], + chargeType: '' }); //第一步 标题简介弹窗 const [titleIntroductionOpen, setTitleIntroductionOpen] = useState(false) @@ -437,7 +439,8 @@ export default function ProjEdit() { projId: data.projId, projIntroduction: data.projIntroduction, projDesc: data.projDesc, - projMods: data.projMods + projMods: data.projMods, + chargeType: data.pay.chargeType }) // getListMods() setprojStatus(data.projStatus) @@ -454,7 +457,8 @@ export default function ProjEdit() { projId: data.projId, projIntroduction: data.projIntroduction, projDesc: data.projDesc, - projMods: data.projMods + projMods: data.projMods, + chargeType: data.pay.chargeType }) if (!data.projIntroduction) { setAiHelperModalOpen(true) @@ -731,6 +735,7 @@ export default function ProjEdit() { projIntroduction={aiHelper.projIntroduction} projDesc={aiHelper.projDesc} isFree={false} + chargeType={aiHelper.chargeType} renderData={() => { renderData() }}