|
@@ -112,7 +112,7 @@ function CreativePup(props: Props) {
|
|
|
let endPageDesc = Form.useWatch('endPageDesc', form)
|
|
|
let linkPageType = Form.useWatch('linkPageType', form)
|
|
|
/***************************************/
|
|
|
-
|
|
|
+
|
|
|
// 确定事件
|
|
|
const handleOk = useCallback(() => {
|
|
|
form.validateFields().then(values => {
|
|
@@ -629,18 +629,16 @@ function CreativePup(props: Props) {
|
|
|
let id = e.target.value
|
|
|
getTemplate(id)
|
|
|
}}>
|
|
|
- {
|
|
|
- adcreative_template_list?.filter(item => item.adcreativeTemplateStyle === adcreativeElementsType)?.map((item: any) => {
|
|
|
- return <Radio.Button value={item.adcreativeTemplateId} key={item.adcreativeTemplateId}>
|
|
|
- <div className={styles.adcreative_template_item}>
|
|
|
- {item.isGeneral && <span style={{ color: '#4080ff', fontSize: 10 }}>所选版位通投</span>}
|
|
|
- <img src={item.adcreativeSampleImage} />
|
|
|
- <span style={{ fontSize: 12, height: 20, lineHeight: '20px' }}>{item.adcreativeTemplateAppellation}</span>
|
|
|
- <span style={{ fontSize: 12, height: 20, lineHeight: '20px' }}>{item.adcreativeTemplateId}</span>
|
|
|
- </div>
|
|
|
- </Radio.Button>
|
|
|
- })
|
|
|
- }
|
|
|
+ {adcreative_template_list?.filter(item => item.adcreativeTemplateStyle === adcreativeElementsType && item.supportBidModeList.includes(queryForm?.sysAdgroup?.bidMode))?.map((item: any) => {
|
|
|
+ return <Radio.Button value={item.adcreativeTemplateId} key={item.adcreativeTemplateId}>
|
|
|
+ <div className={styles.adcreative_template_item}>
|
|
|
+ {item.isGeneral && <span style={{ color: '#4080ff', fontSize: 10 }}>所选版位通投</span>}
|
|
|
+ <img src={item.adcreativeSampleImage} />
|
|
|
+ <span style={{ fontSize: 12, height: 20, lineHeight: '20px' }}>{item.adcreativeTemplateAppellation}</span>
|
|
|
+ <span style={{ fontSize: 12, height: 20, lineHeight: '20px' }}>{item.adcreativeTemplateId}</span>
|
|
|
+ </div>
|
|
|
+ </Radio.Button>
|
|
|
+ })}
|
|
|
</Radio.Group>
|
|
|
</Form.Item>
|
|
|
{/* ============================================================创意内容============================================================= */}
|
|
@@ -654,11 +652,9 @@ function CreativePup(props: Props) {
|
|
|
{/* ============================================================落地页============================================================= */}
|
|
|
{adcreativeTemplateId ? <Form.Item label={<strong>落地页</strong>} name='pageType' >
|
|
|
<Radio.Group>
|
|
|
- {
|
|
|
- pageTypeList?.map((item: any) => {
|
|
|
- return <Radio.Button value={item.pageType} key={item.pageType} disabled={!item.description.includes('微信原生推广页')}>{item.description.includes('微信原生推广页') ? '微信原生推广页' : item.description}</Radio.Button>
|
|
|
- })
|
|
|
- }
|
|
|
+ {pageTypeList?.map((item: any) => {
|
|
|
+ return <Radio.Button value={item.pageType} key={item.pageType} disabled={!item.description.includes('微信原生推广页')}>{item.description.includes('微信原生推广页') ? '微信原生推广页' : item.description}</Radio.Button>
|
|
|
+ })}
|
|
|
</Radio.Group>
|
|
|
</Form.Item> : <div style={{ minHeight: 400, display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
|
|
|
<Empty description="请先选择创意形式" />
|
|
@@ -666,11 +662,9 @@ function CreativePup(props: Props) {
|
|
|
{
|
|
|
pageType === 'PAGE_TYPE_CANVAS_WECHAT' && isShowSc && <Form.Item label={<strong>素材选项</strong>} name='overrideCanvasHeadOption'>
|
|
|
<Radio.Group disabled>
|
|
|
- {
|
|
|
- adcreativeTemplateId && creativeConfig[adcreativeTemplateId]?.overrideCanvasHeadOption?.map((item: string | number) => {
|
|
|
- return <Radio value={item} key={item}>{overrideCanvasHeadOptionEnum[item]}</Radio>
|
|
|
- })
|
|
|
- }
|
|
|
+ {adcreativeTemplateId && creativeConfig[adcreativeTemplateId]?.overrideCanvasHeadOption?.map((item: string | number) => {
|
|
|
+ return <Radio value={item} key={item}>{overrideCanvasHeadOptionEnum[item]}</Radio>
|
|
|
+ })}
|
|
|
</Radio.Group>
|
|
|
</Form.Item>
|
|
|
}
|
|
@@ -686,21 +680,17 @@ function CreativePup(props: Props) {
|
|
|
<Select style={{ width: 200 }} showSearch filterOption={(input, option) =>
|
|
|
(option!.children as unknown as string).toLowerCase().includes(input.toLowerCase())
|
|
|
} allowClear>
|
|
|
- {
|
|
|
- linkNameList?.map((item: any) => {
|
|
|
- return <Select.Option value={item.linkNameType} key={item.linkNameType}>{item.description}</Select.Option>
|
|
|
- })
|
|
|
- }
|
|
|
+ {linkNameList?.map((item: any) => {
|
|
|
+ return <Select.Option value={item.linkNameType} key={item.linkNameType}>{item.description}</Select.Option>
|
|
|
+ })}
|
|
|
</Select>
|
|
|
</Form.Item>
|
|
|
<Form.Item label={<strong>跳转落地页</strong>}>
|
|
|
<Form.Item name='linkPageType' noStyle>
|
|
|
<Radio.Group style={{ display: 'flex' }}>
|
|
|
- {
|
|
|
- linkPageList?.map((item: { linkPageType: string; description: string; }, index: number) => {
|
|
|
- return <Radio.Button value={item.linkPageType} key={item.linkPageType} >{item.description}</Radio.Button>
|
|
|
- })
|
|
|
- }
|
|
|
+ {linkPageList?.map((item: { linkPageType: string; description: string; }, index: number) => {
|
|
|
+ return <Radio.Button value={item.linkPageType} key={item.linkPageType} >{item.description}</Radio.Button>
|
|
|
+ })}
|
|
|
</Radio.Group>
|
|
|
</Form.Item>
|
|
|
{/* 自定义落地页地址 */}
|
|
@@ -708,16 +698,14 @@ function CreativePup(props: Props) {
|
|
|
<Input placeholder='请输入自定义落地页地址' style={{ width: 300 }} />
|
|
|
</Form.Item>}
|
|
|
{/* 小程序 */}
|
|
|
- {
|
|
|
- linkPageType === "LINK_PAGE_TYPE_MINI_PROGRAM_WECHAT" && <Form.Item noStyle >
|
|
|
- <Form.Item rules={[{ required: true, message: '请输入小程序原始ID' }]} name='miniProgramId' style={{ marginTop: 10, marginBottom: 0 }} >
|
|
|
- <Input placeholder='请输入小程序原始ID' style={{ width: 300 }} />
|
|
|
- </Form.Item>
|
|
|
- <Form.Item rules={[{ required: true, message: '请输入小程序链接' }]} name='miniProgramPath' style={{ marginTop: 10, marginBottom: 0 }}>
|
|
|
- <Input placeholder='请输入小程序链接' style={{ width: 300 }} />
|
|
|
- </Form.Item>
|
|
|
+ {linkPageType === "LINK_PAGE_TYPE_MINI_PROGRAM_WECHAT" && <Form.Item noStyle >
|
|
|
+ <Form.Item rules={[{ required: true, message: '请输入小程序原始ID' }]} name='miniProgramId' style={{ marginTop: 10, marginBottom: 0 }} >
|
|
|
+ <Input placeholder='请输入小程序原始ID' style={{ width: 300 }} />
|
|
|
</Form.Item>
|
|
|
- }
|
|
|
+ <Form.Item rules={[{ required: true, message: '请输入小程序链接' }]} name='miniProgramPath' style={{ marginTop: 10, marginBottom: 0 }}>
|
|
|
+ <Input placeholder='请输入小程序链接' style={{ width: 300 }} />
|
|
|
+ </Form.Item>
|
|
|
+ </Form.Item>}
|
|
|
</Form.Item>
|
|
|
{/* 落地页 */}
|
|
|
|
|
@@ -736,11 +724,9 @@ function CreativePup(props: Props) {
|
|
|
<Select style={{ width: 200 }} showSearch filterOption={(input, option) =>
|
|
|
(option!.children as unknown as string).toLowerCase().includes(input.toLowerCase())
|
|
|
} allowClear>
|
|
|
- {
|
|
|
- adcreative_template?.adcreativeElements?.find(item => item.name === 'button_text')?.enumProperty?.enumeration?.map((item: any) => {
|
|
|
- return <Select.Option value={item.value} key={item.value}>{item.value}</Select.Option>
|
|
|
- })
|
|
|
- }
|
|
|
+ {adcreative_template?.adcreativeElements?.find(item => item.name === 'button_text')?.enumProperty?.enumeration?.map((item: any) => {
|
|
|
+ return <Select.Option value={item.value} key={item.value}>{item.value}</Select.Option>
|
|
|
+ })}
|
|
|
</Select>
|
|
|
</Form.Item>
|
|
|
}
|
|
@@ -752,20 +738,16 @@ function CreativePup(props: Props) {
|
|
|
dataShow && <>
|
|
|
<Form.Item name='conversionDataType' label={<strong>数据类型</strong>}>
|
|
|
<Radio.Group>
|
|
|
- {
|
|
|
- conversionList?.conversion_data_type?.map((item: { value: string; description: string; }, index: number) => {
|
|
|
- return <Radio.Button value={item.value} key={item.value}>{item.description}</Radio.Button>
|
|
|
- })
|
|
|
- }
|
|
|
+ {conversionList?.conversion_data_type?.map((item: { value: string; description: string; }, index: number) => {
|
|
|
+ return <Radio.Button value={item.value} key={item.value}>{item.description}</Radio.Button>
|
|
|
+ })}
|
|
|
</Radio.Group>
|
|
|
</Form.Item>
|
|
|
{conversionList?.conversion_target_type && conversionDataType === 'CONVERSION_DATA_ADMETRIC' && <Form.Item name='conversionTargetType' label={<strong>转化行为</strong>}>
|
|
|
<Radio.Group>
|
|
|
- {
|
|
|
- conversionList?.conversion_target_type?.map((item: { value: string; description: string; }, index: number) => {
|
|
|
- return <Radio.Button value={item.value} key={item.value}>{item.description}</Radio.Button>
|
|
|
- })
|
|
|
- }
|
|
|
+ {conversionList?.conversion_target_type?.map((item: { value: string; description: string; }, index: number) => {
|
|
|
+ return <Radio.Button value={item.value} key={item.value}>{item.description}</Radio.Button>
|
|
|
+ })}
|
|
|
</Radio.Group>
|
|
|
</Form.Item>}
|
|
|
</>
|