|
@@ -214,9 +214,11 @@ const CreateAd: React.FC = () => {
|
|
|
message.error('请设置创意的基本信息')
|
|
|
return
|
|
|
}
|
|
|
- if (!queryForm.sysPageId) {
|
|
|
- message.error('请选择落地页')
|
|
|
- return
|
|
|
+ if (!accountCreateLogs?.every((item: any) => item.pageList?.length > 0)) { // 所有都选云端
|
|
|
+ if (!queryForm.sysPageId) {
|
|
|
+ message.error('请选择落地页')
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
let data = accountCreateLogs.map((item: any, index) => {
|
|
|
return { ...item, ...queryForm, sysAdGroupData: getSysAdgroups?.data, targetingData: getsysTargeting?.data, sysAdcreativeData: { ...getSysAdcreative?.data }, pageData: get?.data }
|
|
@@ -304,9 +306,9 @@ const CreateAd: React.FC = () => {
|
|
|
maxTagCount={1}
|
|
|
allowClear
|
|
|
bordered={false}
|
|
|
- filterOption={(input: any, option: any) =>
|
|
|
- (option!.children as unknown as string).toLowerCase().includes(input.toLowerCase())
|
|
|
- }
|
|
|
+ filterOption={(input: any, option: any) => {
|
|
|
+ return option!.children?.toString().toLowerCase().includes(input.toLowerCase())
|
|
|
+ }}
|
|
|
value={accountCreateLogs?.map((item: { id: number }) => item?.id)}
|
|
|
onChange={(e, option) => {
|
|
|
setAccountCreateLogs(option?.map((item: any) => ({ adAccountId: item?.children, id: item?.value })))
|
|
@@ -344,7 +346,7 @@ const CreateAd: React.FC = () => {
|
|
|
<div className={style.center}>
|
|
|
<Spin spinning={getSysAdgroups.loading}>
|
|
|
<div className={style.centerContent}>
|
|
|
- {getSysAdgroups?.data ? <AdgroupsCol data={getSysAdgroups?.data} /> : <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />}
|
|
|
+ {(getSysAdgroups?.data && queryForm?.sysAdgroupId) ? <AdgroupsCol data={getSysAdgroups?.data} /> : <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />}
|
|
|
</div>
|
|
|
</Spin>
|
|
|
</div>
|
|
@@ -518,7 +520,7 @@ const CreateAd: React.FC = () => {
|
|
|
<div className={style.center}>
|
|
|
<Spin spinning={get.loading}>
|
|
|
<div className={style.centerContent}>
|
|
|
- {(queryForm?.sysPageId || accountCreateLogs?.some((item: any) => item.pageList?.length > 0) && !Object.keys(get?.data)?.includes('fail')) ? <>
|
|
|
+ {accountCreateLogs?.some((item: any) => item.pageList?.length > 0 || (queryForm?.sysPageId && (get?.data && !Object.keys(get?.data)?.includes('fail')))) ? <>
|
|
|
{(queryForm?.sysPageId && !accountCreateLogs?.every((item: any) => item.pageList?.length > 0)) && <>
|
|
|
<div>落地页名称:{get?.data?.pageName || ''}</div>
|
|
|
<div>分享名称:{get?.data?.shareContentSpec?.shareTitle || ''}</div>
|