判断是否免费

This commit is contained in:
lyp 2025-01-21 11:50:09 +08:00
parent 548a3ed2f0
commit 4ed33ab1df
4 changed files with 27 additions and 8 deletions

View File

@ -29,7 +29,8 @@ type PropsType = {
projIntroduction?: string; projIntroduction?: string;
projDesc?: string; projDesc?: string;
isFree: boolean; isFree: boolean;
renderData: any renderData: any;
chargeType:any
} }
type ProjModType = { type ProjModType = {
@ -729,6 +730,7 @@ export default function AiHelper(props: PropsType) {
setActiveTab(data) setActiveTab(data)
} }
} }
chargeType={props.chargeType}
newMods={newProjModArray} newMods={newProjModArray}
handleGenerate={() => { handleGenerate={() => {
// getProjDesc() // getProjDesc()

View File

@ -41,6 +41,7 @@ type PropsType = {
isFast: boolean; isFast: boolean;
setisFast: any; setisFast: any;
setIsProjModArrayLoading: any; setIsProjModArrayLoading: any;
chargeType: string;
} }
type ProjModType = { type ProjModType = {
@ -520,7 +521,8 @@ export default function AiHelperMod(props: PropsType) {
fontSize: 14, fontSize: 14,
}}> }}>
*10~15AI生成 {props.chargeType =='FREE'?'*功能列表数量为3~5个如数量不满足请继续用AI生成':'*功能列表数量为10~15个如数量不满足请继续用AI生成'}
{/* *功能列表数量为10~15个如数量不满足请继续用AI生成 */}
</div> </div>
</div> </div>
</div> </div>

View File

@ -39,6 +39,8 @@ type AiHelperType = {
projIntroduction: string; projIntroduction: string;
projDesc: string; projDesc: string;
projMods: ProjModType[]; projMods: ProjModType[];
chargeType: any
} }
type ProjModType = { type ProjModType = {
@ -118,6 +120,8 @@ export default function ProjEdit() {
projIntroduction: '', projIntroduction: '',
projDesc: '', projDesc: '',
projMods: [], projMods: [],
chargeType: ''
}); });
@ -309,7 +313,7 @@ export default function ProjEdit() {
messageApi: messageApi, messageApi: messageApi,
url: `/api/proj/get/${pathParams.projId}`, url: `/api/proj/get/${pathParams.projId}`,
onSuccess({ data }) { onSuccess({ data }) {
// console.log(data.aiSetting); // console.log(data);
// 当ai生成不是成功切 材料未生成时候弹出弹出框 // 当ai生成不是成功切 材料未生成时候弹出弹出框
// if (data.aiSetting.settingStatus !== "SUCCESS" && data.generate.generateStatus == GenerateStatus.NONE) { // if (data.aiSetting.settingStatus !== "SUCCESS" && data.generate.generateStatus == GenerateStatus.NONE) {
// setAiHelperModalOpen(true) // setAiHelperModalOpen(true)
@ -361,7 +365,10 @@ export default function ProjEdit() {
projId: data.projId, projId: data.projId,
projIntroduction: data.projIntroduction, projIntroduction: data.projIntroduction,
projDesc: data.projDesc, projDesc: data.projDesc,
projMods: data.projMods projMods: data.projMods,
chargeType: data.pay.chargeType
}) })
setprojStatus(data.projStatus) setprojStatus(data.projStatus)
@ -382,7 +389,8 @@ export default function ProjEdit() {
projId: data.projId, projId: data.projId,
projIntroduction: data.projIntroduction, projIntroduction: data.projIntroduction,
projDesc: data.projDesc, projDesc: data.projDesc,
projMods: data.projMods projMods: data.projMods,
chargeType: data.pay.chargeType
}) })
if (!data.projIntroduction) { if (!data.projIntroduction) {
setAiHelperModalOpen(true) setAiHelperModalOpen(true)
@ -759,6 +767,8 @@ export default function ProjEdit() {
projId={aiHelper.projId} projId={aiHelper.projId}
projIntroduction={aiHelper.projIntroduction} projIntroduction={aiHelper.projIntroduction}
projDesc={aiHelper.projDesc} projDesc={aiHelper.projDesc}
chargeType={aiHelper.chargeType}
isFree={false} isFree={false}
renderData={() => { renderData={() => {
renderData() renderData()

View File

@ -33,6 +33,7 @@ type AiHelperType = {
projIntroduction: string; projIntroduction: string;
projDesc: string; projDesc: string;
projMods: ProjModType[]; projMods: ProjModType[];
chargeType: string;
} }
type ProjModType = { type ProjModType = {
name: string, name: string,
@ -74,6 +75,7 @@ export default function ProjEdit() {
projIntroduction: '', projIntroduction: '',
projDesc: '', projDesc: '',
projMods: [], projMods: [],
chargeType: ''
}); });
//第一步 标题简介弹窗 //第一步 标题简介弹窗
const [titleIntroductionOpen, setTitleIntroductionOpen] = useState(false) const [titleIntroductionOpen, setTitleIntroductionOpen] = useState(false)
@ -437,7 +439,8 @@ export default function ProjEdit() {
projId: data.projId, projId: data.projId,
projIntroduction: data.projIntroduction, projIntroduction: data.projIntroduction,
projDesc: data.projDesc, projDesc: data.projDesc,
projMods: data.projMods projMods: data.projMods,
chargeType: data.pay.chargeType
}) })
// getListMods() // getListMods()
setprojStatus(data.projStatus) setprojStatus(data.projStatus)
@ -454,7 +457,8 @@ export default function ProjEdit() {
projId: data.projId, projId: data.projId,
projIntroduction: data.projIntroduction, projIntroduction: data.projIntroduction,
projDesc: data.projDesc, projDesc: data.projDesc,
projMods: data.projMods projMods: data.projMods,
chargeType: data.pay.chargeType
}) })
if (!data.projIntroduction) { if (!data.projIntroduction) {
setAiHelperModalOpen(true) setAiHelperModalOpen(true)
@ -731,6 +735,7 @@ export default function ProjEdit() {
projIntroduction={aiHelper.projIntroduction} projIntroduction={aiHelper.projIntroduction}
projDesc={aiHelper.projDesc} projDesc={aiHelper.projDesc}
isFree={false} isFree={false}
chargeType={aiHelper.chargeType}
renderData={() => { renderData={() => {
renderData() renderData()
}} }}