|
@@ -1,5 +1,5 @@
|
|
|
import React, { useCallback, useEffect, useMemo, useState } from 'react'
|
|
|
-import { Modal, Form, Input, Divider, Select, Radio, Switch, Spin, List } from 'antd'
|
|
|
+import { Modal, Form, Input, Divider, Select, Radio, Switch, Spin, List, Checkbox } from 'antd'
|
|
|
import { SiteSetEnum, PromotedObjectType } from '@/services/launchAdq/enum'
|
|
|
import { ModalConfig } from '.'
|
|
|
import styles from './index.less'
|
|
@@ -126,7 +126,13 @@ function CreativeModal(props: Props) {
|
|
|
if (!newValues.adcreativeElements) {
|
|
|
newValues.adcreativeElements = {}
|
|
|
}
|
|
|
- callback(newValues)
|
|
|
+ if(newValues?.overrideCanvasHeadOption?.length === 0 || !newValues?.overrideCanvasHeadOption){
|
|
|
+ newValues.overrideCanvasHeadOption = 'OPTION_KEEP_DIFFERENT'
|
|
|
+ }
|
|
|
+ if(newValues?.overrideCanvasHeadOption?.length === 1 && newValues?.overrideCanvasHeadOption[0] === 'OPTION_CREATIVE_OVERRIDE_CANVAS'){
|
|
|
+ newValues.overrideCanvasHeadOption = 'OPTION_CREATIVE_OVERRIDE_CANVAS'
|
|
|
+ }
|
|
|
+ // callback(newValues)
|
|
|
})
|
|
|
// PupFn({ visible: false })
|
|
|
}, [form, materialConfig])
|
|
@@ -405,6 +411,7 @@ function CreativeModal(props: Props) {
|
|
|
adcreativeElementsType: '视频',
|
|
|
promotedObjectType: 'PROMOTED_OBJECT_TYPE_WECHAT_OFFICIAL_ACCOUNT',
|
|
|
siteSet: ['SITE_SET_MOMENTS', 'SITE_SET_WECHAT'],
|
|
|
+ // overrideCanvasHeadOption:['OPTION_KEEP_DIFFERENT'],//默认'自定义广告创意素材,和原生推广页顶部素材保持两者不同,(仅支持朋友圈非常规创意形式)'
|
|
|
// actionBtn: false,//行动按钮
|
|
|
// dataShow: false,//数据展示
|
|
|
}
|
|
@@ -554,6 +561,7 @@ function CreativeModal(props: Props) {
|
|
|
</Form.Item>
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
{/* 标题 */}
|
|
|
{
|
|
|
adcreative_template?.adcreativeElements?.filter(item => item.name === 'title').map(item => {
|
|
@@ -640,6 +648,11 @@ function CreativeModal(props: Props) {
|
|
|
}
|
|
|
</Radio.Group>
|
|
|
</Form.Item>
|
|
|
+ {
|
|
|
+ pageType === 'PAGE_TYPE_CANVAS_WECHAT' &&<Form.Item label={<strong>素材选项</strong>} name='overrideCanvasHeadOption'>
|
|
|
+ <Checkbox.Group options={[{ label: '使用外层创意素材替换原生推广页顶部素材', value: 'OPTION_CREATIVE_OVERRIDE_CANVAS' }]} />
|
|
|
+ </Form.Item>
|
|
|
+ }
|
|
|
{/* ============================================================行动按钮============================================================= */}
|
|
|
{
|
|
|
pupState.xd_show && <Form.Item label={<strong>行动按钮</strong>} name='actionBtn' valuePropName="checked">
|