|
@@ -22,7 +22,84 @@ interface Props {
|
|
|
type?: 'add' | 'look' | 'edit',//新增,查看,编辑
|
|
|
dataInfo?: any
|
|
|
}
|
|
|
-const changgui = [311, 641, 642, 643, 618, 1465, 1064, 1480, 721]
|
|
|
+const changgui = [
|
|
|
+ {
|
|
|
+ "id": 11401259460,
|
|
|
+ "app_id": 0,
|
|
|
+ "company_admin_user_id": 10000006600,
|
|
|
+ "type": 3,
|
|
|
+ "brand_name": "\u70ed\u95e8\u5c0f\u8bf4",
|
|
|
+ "description": "\u5168\u7f51\u70ed\u95e8\u5c0f\u8bf4",
|
|
|
+ "file_uri": "https:\/\/wxsnsencsvp.wxs.qq.com\/141\/20204\/snscosdownload\/SZ\/reserved\/6xykWLEnztJV9MqNeOQWia0nLSB26Kqnnb4PZFhdrEDUuw5CM5oIIbKBjKHreKeliaFq3HNvh2FbLIqcKDZ9EFDg?ck=df49be8f42708c0d8ac92eb56a329cac&idx=1&m=df49be8f42708c0d8ac92eb56a329cac&sha256=481be980e82dc2f5a3fe7a6b7eb5eac704289f155d8deb09dd0e0a588a194457&token=cztXnd9GyrGapkCPG2XUCdmc8GpN7o4mAVYH3Dsic0iaiaffCW6eGpdv5xykaCIP1wlxEwyhBpkgkZgJGcbLeIu6w",
|
|
|
+ "file_uri_local": "\/data\/chuangliang_storage\/public\/material_gdt\/images\/20220823194656-6304be30474a5.jpg",
|
|
|
+ "file_md5": "d41d8cd98f00b204e9800998ecf8427e",
|
|
|
+ "unique_key": "c410c21293f43c54e5d030fe629476de",
|
|
|
+ "unique_key_by_file_url": "87ab824b0e122a889792368da6e21aff",
|
|
|
+ "create_time": "2022-08-18 15:49:06",
|
|
|
+ "create_user_id": 0,
|
|
|
+ "update_time": "2022-08-23 19:46:56",
|
|
|
+ "update_user_id": 0,
|
|
|
+ "is_upload_cos": 0,
|
|
|
+ "main_user_id": 10000006600
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "id": 10000020002,
|
|
|
+ "app_id": 0,
|
|
|
+ "company_admin_user_id": 10000006600,
|
|
|
+ "type": 3,
|
|
|
+ "brand_name": "\u542c\u4e66\u751c\u751c",
|
|
|
+ "description": "\u52a0\u6211\u5fae\u4fe1\u4e00\u8d77\u6536\u542c~",
|
|
|
+ "file_uri": "http:\/\/wxsnsencsvp.wxs.qq.com\/141\/20204\/snscosdownload\/SZ\/reserved\/6xykWLEnztKaHEvzepQhQOyFkdNy5AiceN5NcQewlDQXNspwfRjbfjwHiaxicIzfWUW0re5TN7RdPohbibvGTWOITg?ck=7dfbfec2a56571980e87501eb27308ae&idx=1&m=7dfbfec2a56571980e87501eb27308ae&sha256=aba52a73e40f79a776aefeada66975cf8d79dcad0b997edb1a81302e27028325&token=cztXnd9GyrFBiaHvxEeklKyDIYqSqTgzBbNxPhLabEiaU7bxLrh4n8RQbXibVgbrAfmMuwfMhHzd2c79Xaa0PXsYw",
|
|
|
+ "file_uri_local": "\/data\/chuangliang_storage\/public\/material_gdt\/images\/20220823194720-6304be484765b.jpg",
|
|
|
+ "file_md5": "7dfbfec2a56571980e87501eb27308ae",
|
|
|
+ "unique_key": "43eabfae223f0f56d0e74e11fee07a53",
|
|
|
+ "unique_key_by_file_url": "0060d604211ea2dfef8762c8b0ea1ccc",
|
|
|
+ "create_time": "2022-08-15 18:10:08",
|
|
|
+ "create_user_id": 0,
|
|
|
+ "update_time": "2022-08-23 19:47:20",
|
|
|
+ "update_user_id": 0,
|
|
|
+ "is_upload_cos": 0,
|
|
|
+ "main_user_id": 10000006600
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "id": 10000020001,
|
|
|
+ "app_id": 0,
|
|
|
+ "company_admin_user_id": 10000006600,
|
|
|
+ "type": 3,
|
|
|
+ "brand_name": "\u751c\u751c\u542c\u4e66",
|
|
|
+ "description": "\u5feb\u6765\u4e00\u8d77\u6536\u542c\u5427~",
|
|
|
+ "file_uri": "http:\/\/wxsnsencsvp.wxs.qq.com\/141\/20204\/snscosdownload\/SZ\/reserved\/6xykWLEnztJ649NJWA2QNpQnO60FV3es98fD3ic1nqfE9ADTiawgEjxtT3Qia0sJgkC0Qv1VCpPGv1kXaIdJAhnsA?ck=7dfbfec2a56571980e87501eb27308ae&idx=1&m=7dfbfec2a56571980e87501eb27308ae&sha256=aba52a73e40f79a776aefeada66975cf8d79dcad0b997edb1a81302e27028325&token=6xykWLEnztL4weIvrU6UicTe88syvZWTcg2HIN6RvHKzQdwib2XpiazZwGZWUs4fy8lbJ4ItMh0ubZx22GWImZL5g",
|
|
|
+ "file_uri_local": "",
|
|
|
+ "file_md5": "7dfbfec2a56571980e87501eb27308ae",
|
|
|
+ "unique_key": "c71a7d54bae6974d41650f6ad670c570",
|
|
|
+ "unique_key_by_file_url": "f175c74d37a3e81e0cc08dd310d152de",
|
|
|
+ "create_time": "2022-08-15 18:10:06",
|
|
|
+ "create_user_id": 0,
|
|
|
+ "update_time": "2022-08-15 18:10:06",
|
|
|
+ "update_user_id": 0,
|
|
|
+ "is_upload_cos": 0,
|
|
|
+ "main_user_id": 10000006600
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "id": 10000019780,
|
|
|
+ "app_id": 0,
|
|
|
+ "company_admin_user_id": 10000006600,
|
|
|
+ "type": 3,
|
|
|
+ "brand_name": "\u70ed\u95e8\u5c0f\u8bf4",
|
|
|
+ "description": "\u5168\u7f51\u8d85\u706b\u70ed\u95e8\u5c0f\u8bf4\uff01",
|
|
|
+ "file_uri": "https:\/\/wxsnsencsvp.wxs.qq.com\/141\/20204\/snscosdownload\/SZ\/reserved\/6xykWLEnztJhQ4jPM2vDczvxPaLYQicQkI9lYT97xbicxuktc9kiaLZB7rwbaogBc7tHGAhW5p0fHGj2Ov0sr5EXg?ck=c0cf5f032e0cfa600e27f0a8183891b3&idx=1&m=c0cf5f032e0cfa600e27f0a8183891b3&sha256=be7f5f69ba4925bde4bd70b1687bbbbf4a367d29555b562537cd73d01b64848f&token=cztXnd9GyrHQWaiafRG2RM6bqiblkVM0vsf4ZwjJvzV6Rwf32JwGu5brGOOjQNAyZfxlt066tw84lZia4Pjibwdz7w",
|
|
|
+ "file_uri_local": "\/data\/chuangliang_storage\/public\/material_gdt\/images\/20220815181138-62fa1bda6cea7.jpg",
|
|
|
+ "file_md5": "c0cf5f032e0cfa600e27f0a8183891b3",
|
|
|
+ "unique_key": "9af7aa2f9c40c50b5f333f4c72f8538d",
|
|
|
+ "unique_key_by_file_url": "affd3e3ee54a6d937d7791031bb012bf",
|
|
|
+ "create_time": "2022-08-08 17:36:21",
|
|
|
+ "create_user_id": 0,
|
|
|
+ "update_time": "2022-08-15 18:11:38",
|
|
|
+ "update_user_id": 0,
|
|
|
+ "is_upload_cos": 0,
|
|
|
+ "main_user_id": 10000006600
|
|
|
+ }
|
|
|
+]
|
|
|
/**创意模板*/
|
|
|
function CreativePup(props: Props) {
|
|
|
let { visible, confirmLoading, PupFn, callback, type, dataInfo, queryForm } = props
|
|
@@ -160,6 +237,14 @@ function CreativePup(props: Props) {
|
|
|
newValues.adcreativeElements = { ...newValues.adcreativeElements, endPage: { ...newValues.adcreativeElements.endPage, endPageDesc: newValues.endPageDesc } }
|
|
|
delete newValues[key]
|
|
|
break;
|
|
|
+ case 'brand'://品牌形象
|
|
|
+ newValues.adcreativeElements = {
|
|
|
+ ...newValues.adcreativeElements, brand: {
|
|
|
+ brandName: newValues.brand.split('_')[0],
|
|
|
+ brandImg: newValues.brand.split('_')[1]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
if (!newValues.adcreativeElements) {
|
|
@@ -178,6 +263,7 @@ function CreativePup(props: Props) {
|
|
|
delete newValues.adcreativeElementsType //删除创意形式
|
|
|
delete newValues.dataShow //删除数据开关
|
|
|
delete newValues.actionBtn //删除行动开关
|
|
|
+ delete newValues.brand //品牌形象
|
|
|
// 假如使用了落地页顶部素材替换外部素材
|
|
|
if (newValues.overrideCanvasHeadOption === 'OPTION_CANVAS_OVERRIDE_CREATIVE') {
|
|
|
console.log(adcreative_template?.adcreativeElements)
|
|
@@ -276,6 +362,7 @@ function CreativePup(props: Props) {
|
|
|
form.setFieldsValue({ overrideCanvasHeadOption: creativeConfig[id].overrideCanvasHeadOption[0] })
|
|
|
}
|
|
|
}
|
|
|
+ templateChange(res[0], ok)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -314,7 +401,7 @@ function CreativePup(props: Props) {
|
|
|
}, [adcreative_template_list])
|
|
|
|
|
|
//每次选中创意设置该展示的界面
|
|
|
- useEffect(() => {
|
|
|
+ const templateChange = useCallback((adcreative_template, ok?: any) => {
|
|
|
let states = {
|
|
|
kp_show: false,
|
|
|
xd_show: true,
|
|
@@ -324,13 +411,13 @@ function CreativePup(props: Props) {
|
|
|
}
|
|
|
let values: any = { pageType: 'PAGE_TYPE_CANVAS_WECHAT', }
|
|
|
if (adcreative_template) {
|
|
|
- let pageList = adcreative_template?.landingPageConfig?.supportPageTypeList
|
|
|
+ let pageList = adcreative_template?.landingPageConfig?.supportPageTypeList?.filter((i: { description: string | string[] }) => i.description.includes('微信原生推广页'))//当前版本只获取微信原生页,后期改进
|
|
|
let pageType = pageList?.length ? pageList[0]?.pageType : null
|
|
|
//数据展示组件
|
|
|
- if (adcreative_template.adcreativeAttributes.some(item => item.name === 'conversion_data_type' || item.name === 'conversion_target_type')) {
|
|
|
+ if (adcreative_template.adcreativeAttributes.some((item: { name: string }) => item.name === 'conversion_data_type' || item.name === 'conversion_target_type')) {
|
|
|
let arr = adcreative_template.adcreativeAttributes?.filter((item: { name: string; }) => item.name === 'conversion_data_type' || item.name === 'conversion_target_type')
|
|
|
let newObj: any = {}
|
|
|
- arr.forEach((item) => {
|
|
|
+ arr.forEach((item: { propertyDetail: { enumDetail: { enumeration: any[] } }; name: string | number }) => {
|
|
|
let arr: any[] = mySet(item.propertyDetail.enumDetail.enumeration)
|
|
|
newObj[item.name] = arr
|
|
|
})
|
|
@@ -349,16 +436,17 @@ function CreativePup(props: Props) {
|
|
|
let linkNameList = (pageList?.filter((item: { pageType: any; }) => item.pageType === pageType)[0] as any)?.supportLinkNameType?.list
|
|
|
let linkPageList = (pageList?.filter((item: { pageType: any; }) => item.pageType === pageType)[0] as any)?.supportLinkPageType?.list
|
|
|
if (linkNameList && !linkPageType) {
|
|
|
- let linkNameType = linkNameList[0]?.linkNameType
|
|
|
- let linkPageType = linkPageList[0]?.linkPageType
|
|
|
- values = { ...values, linkNameType, linkPageType, actionBtn: true }
|
|
|
-
|
|
|
+ if (!ok) {
|
|
|
+ let linkNameType = linkNameList[0]?.linkNameType
|
|
|
+ let linkPageType = linkPageList?.some((i: { linkPageType: string }) => i.linkPageType === "LINK_PAGE_TYPE_CANVAS_WECHAT") ? "LINK_PAGE_TYPE_CANVAS_WECHAT" : linkPageList[0]?.linkPageType
|
|
|
+ values = { ...values, linkNameType, linkPageType, actionBtn: true }
|
|
|
+ }
|
|
|
} else {
|
|
|
states = { ...states, xd_show: false }
|
|
|
}
|
|
|
}
|
|
|
// 视频结束页 end_page
|
|
|
- if (adcreative_template.adcreativeElements.some(item => item.name === 'end_page')) {
|
|
|
+ if (adcreative_template.adcreativeElements.some((item: { name: string }) => item.name === 'end_page')) {
|
|
|
// let endPageType =adcreative_template?.adcreativeElements?.filter(item=>item.name === 'end_page_type')[0]?.enumProperty?.enumeration
|
|
|
values = { ...values, endPageType: 'END_PAGE_AVATAR_NICKNAME_HIGHLIGHT' }
|
|
|
states = { ...states, sp_show: true }
|
|
@@ -366,7 +454,7 @@ function CreativePup(props: Props) {
|
|
|
setPupState(states)
|
|
|
form.setFieldsValue(values)
|
|
|
}
|
|
|
- }, [adcreative_template])
|
|
|
+ }, [pageType, linkPageType])
|
|
|
// 版位改变清空数据
|
|
|
useEffect(() => {
|
|
|
if (imgMaterialConfig.adcreativeTemplateId && adcreativeTemplateId !== imgMaterialConfig.adcreativeTemplateId) {
|
|
@@ -416,6 +504,7 @@ function CreativePup(props: Props) {
|
|
|
adcreativeTemplateId,
|
|
|
}
|
|
|
getTemplate(adcreativeTemplateId, true)
|
|
|
+ console.log(2222)
|
|
|
if ([720, 721, 618, 1708].some(n => n === adcreativeTemplateId)) {
|
|
|
obj = { ...obj, adcreativeElementsType: '视频' }
|
|
|
} else {
|
|
@@ -512,6 +601,7 @@ function CreativePup(props: Props) {
|
|
|
message.warning('请先选择视频文件!!!')
|
|
|
}
|
|
|
}, [videoMaterialConfig.list])
|
|
|
+ console.log('linkPageList===>', linkPageList, linkPageType)
|
|
|
return <Modal
|
|
|
visible={visible}
|
|
|
title={type === 'add' ? '新建创意' : type === 'look' ? '创意详情' : '编辑创意'}
|
|
@@ -534,6 +624,7 @@ function CreativePup(props: Props) {
|
|
|
form={form}
|
|
|
labelCol={{ span: 5 }}
|
|
|
labelWrap={true}
|
|
|
+ className='ad_form_style'
|
|
|
initialValues={
|
|
|
{
|
|
|
adcreativeElementsType: '视频',
|
|
@@ -583,6 +674,35 @@ function CreativePup(props: Props) {
|
|
|
</Form.Item>
|
|
|
{/* ============================================================创意内容============================================================= */}
|
|
|
<Divider orientation='center'>创意内容</Divider>
|
|
|
+ {/* =============================================================品牌形象===================================================================== */}
|
|
|
+ {
|
|
|
+ queryForm.promotedObjectType === 'PROMOTED_OBJECT_TYPE_LEAD_AD' && <Form.Item label={<strong>品牌形象</strong>} name='brand' rules={[{ required: true, message: '请选择一个头像及昵称跳转页,与广告创意一起展示' }]}>
|
|
|
+ <Select
|
|
|
+ showSearch
|
|
|
+ placeholder="请选择一个头像及昵称跳转页,与广告创意一起展示"
|
|
|
+ optionFilterProp="children"
|
|
|
+ style={{ width: 400 }}
|
|
|
+ onChange={() => { }}
|
|
|
+ allowClear
|
|
|
+ filterOption={(input, option) => {
|
|
|
+ return (option!.value as unknown as string).toLowerCase().includes(input.toLowerCase())
|
|
|
+ }
|
|
|
+ }
|
|
|
+ >
|
|
|
+ {
|
|
|
+ changgui?.map(item => {
|
|
|
+ return <Select.Option value={item.brand_name + '_' + item.file_uri} key={item.id}>
|
|
|
+ <Space>
|
|
|
+ <img src={item.file_uri} style={{ width: 20 }} />
|
|
|
+ <span>{item.brand_name}</span>
|
|
|
+ </Space>
|
|
|
+ </Select.Option>
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ </Select>
|
|
|
+ </Form.Item>
|
|
|
+ }
|
|
|
{/* ============================================================素材============================================================= */}
|
|
|
{/* 优先展示视频或图片,朋友圈常规不勾选使用外部素材替换内部,隐藏此选项,后期自动将落地页顶部素材添加进入 */}
|
|
|
{((overrideCanvasHeadOption !== 'OPTION_CANVAS_OVERRIDE_CREATIVE') || siteSet.every((name: string) => name !== 'SITE_SET_MOMENTS')) && <div style={{ display: 'flex', flexFlow: 'column' }}>
|
|
@@ -781,23 +901,19 @@ function CreativePup(props: Props) {
|
|
|
}
|
|
|
{
|
|
|
actionBtn && <>
|
|
|
- <div style={{ display: 'flex' }}>
|
|
|
- <p style={{ marginBottom: 5, marginLeft: 177 }}><strong style={{ marginRight: 20 }}>按钮文案</strong></p>
|
|
|
- <Form.Item name='linkNameType'>
|
|
|
- <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>
|
|
|
- })
|
|
|
- }
|
|
|
- </Select>
|
|
|
- </Form.Item>
|
|
|
- </div>
|
|
|
- <div style={{ display: 'flex' }}>
|
|
|
- <p style={{ marginBottom: 5, marginLeft: 177 }}><strong style={{ marginRight: 20 }}>跳转落地页</strong></p>
|
|
|
- <Form.Item name='linkPageType'>
|
|
|
+ <Form.Item name='linkNameType' label={<strong>按钮文案</strong>}>
|
|
|
+ <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>
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </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) => {
|
|
@@ -806,7 +922,24 @@ function CreativePup(props: Props) {
|
|
|
}
|
|
|
</Radio.Group>
|
|
|
</Form.Item>
|
|
|
- </div>
|
|
|
+ {/* 自定义落地页地址 */}
|
|
|
+ {linkPageType === "LINK_PAGE_TYPE_DEFAULT" && <Form.Item name='pageUrl' rules={[{ required: true, message: '请输入自定义落地页地址' }]} 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>
|
|
|
+ {/* 落地页 */}
|
|
|
+
|
|
|
</>
|
|
|
}
|
|
|
{/* ============================================================数据展示============================================================= */}
|
|
@@ -815,30 +948,24 @@ function CreativePup(props: Props) {
|
|
|
</Form.Item>}
|
|
|
{
|
|
|
dataShow && <>
|
|
|
- <div style={{ display: 'flex' }}>
|
|
|
- <p style={{ marginBottom: 5, marginLeft: 177 }}><strong style={{ marginRight: 20 }}>数据类型</strong></p>
|
|
|
- <Form.Item name='conversionDataType'>
|
|
|
- <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>
|
|
|
- })
|
|
|
- }
|
|
|
- </Radio.Group>
|
|
|
- </Form.Item>
|
|
|
- </div>
|
|
|
- {conversionList?.conversion_target_type && conversionDataType === 'CONVERSION_DATA_ADMETRIC' && <div style={{ display: 'flex' }}>
|
|
|
- <p style={{ marginBottom: 5, marginLeft: 177 }}><strong style={{ marginRight: 20 }}>转化行为</strong></p>
|
|
|
- <Form.Item name='conversionTargetType'>
|
|
|
- <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>
|
|
|
- })
|
|
|
- }
|
|
|
- </Radio.Group>
|
|
|
- </Form.Item>
|
|
|
- </div>}
|
|
|
+ <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>
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </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>
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </Radio.Group>
|
|
|
+ </Form.Item>}
|
|
|
</>
|
|
|
}
|
|
|
{/* ============================================================视频结束页============================================================= */}
|
|
@@ -847,22 +974,18 @@ function CreativePup(props: Props) {
|
|
|
</Form.Item>}
|
|
|
{
|
|
|
videoOver && <>
|
|
|
- <div style={{ display: 'flex', alignItems: 'center', marginBottom: 10 }}>
|
|
|
- <p style={{ marginBottom: 5, marginLeft: 177 }}><strong style={{ marginRight: 20 }}>视频结束页类型</strong></p>
|
|
|
- <Form.Item name='endPageType' style={{ marginBottom: 0 }} >
|
|
|
- <Radio.Group>
|
|
|
- {
|
|
|
- adcreative_template?.adcreativeElements?.filter(item => item.name === 'end_page_type')[0]?.enumProperty?.enumeration?.map((item) => {
|
|
|
- return <Radio.Button value={item.value} key={item.value}>{item.description}</Radio.Button>
|
|
|
- })
|
|
|
- }
|
|
|
- </Radio.Group>
|
|
|
- </Form.Item>
|
|
|
- </div>
|
|
|
- <div className={'my_endPageDesc'}>
|
|
|
- <div style={{ display: 'flex', alignItems: 'center' }} >
|
|
|
- <p style={{ marginBottom: 5, marginLeft: 177 }}><strong style={{ marginRight: 20 }}>结束文案</strong></p>
|
|
|
- <Form.Item name='endPageDesc' rules={[{ required: true, pattern: RegExp("^[^\\<\\>\\&'\\\"\\/\\x08\\x09\\x0A\\x0D\\\\]{1,12}$"), message: '请输入正确的结束页文案' }]} style={{ marginBottom: 0, marginRight: 10 }}>
|
|
|
+ <Form.Item name='endPageType' label={<strong>视频结束页类型</strong>} >
|
|
|
+ <Radio.Group>
|
|
|
+ {
|
|
|
+ adcreative_template?.adcreativeElements?.filter(item => item.name === 'end_page_type')[0]?.enumProperty?.enumeration?.map((item) => {
|
|
|
+ return <Radio.Button value={item.value} key={item.value}>{item.description}</Radio.Button>
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </Radio.Group>
|
|
|
+ </Form.Item>
|
|
|
+ <div className={'my_endPageDesc'} >
|
|
|
+ <Form.Item label={<strong>结束文案</strong>}>
|
|
|
+ <Form.Item name='endPageDesc' rules={[{ required: true, pattern: RegExp("^[^\\<\\>\\&'\\\"\\/\\x08\\x09\\x0A\\x0D\\\\]{1,12}$"), message: '请输入正确的结束页文案' }]} noStyle>
|
|
|
<Input
|
|
|
placeholder='请输入结束页文案'
|
|
|
style={{ width: 300 }}
|
|
@@ -878,20 +1001,20 @@ function CreativePup(props: Props) {
|
|
|
/>
|
|
|
</Form.Item>
|
|
|
<span>{endPageDesc?.length || 0}/12</span>
|
|
|
- </div>
|
|
|
- {
|
|
|
- endPageDescShow && <List
|
|
|
- loading={getTextLsit?.loading}
|
|
|
- size="small"
|
|
|
- style={{ maxHeight: 300, maxWidth: 300, overflowX: 'auto', marginLeft: 253 }}
|
|
|
- bordered
|
|
|
- dataSource={getTextLsit?.data?.returnTexts}
|
|
|
- renderItem={(item: any) => <List.Item onClick={(e: any) => {
|
|
|
- form.setFieldsValue({ endPageDesc: item.text })
|
|
|
- setendPageDescnshow(false)
|
|
|
- }}><span >{item.text}{item.tag && <span className={styles.crt}>{'CTR 高'}</span>}</span></List.Item>}
|
|
|
- />
|
|
|
- }
|
|
|
+ {
|
|
|
+ endPageDescShow && <List
|
|
|
+ loading={getTextLsit?.loading}
|
|
|
+ size="small"
|
|
|
+ style={{ maxHeight: 300, maxWidth: 300, overflowX: 'auto' }}
|
|
|
+ bordered
|
|
|
+ dataSource={getTextLsit?.data?.returnTexts}
|
|
|
+ renderItem={(item: any) => <List.Item onClick={(e: any) => {
|
|
|
+ form.setFieldsValue({ endPageDesc: item.text })
|
|
|
+ setendPageDescnshow(false)
|
|
|
+ }}><span >{item.text}{item.tag && <span className={styles.crt}>{'CTR 高'}</span>}</span></List.Item>}
|
|
|
+ />
|
|
|
+ }
|
|
|
+ </Form.Item>
|
|
|
</div>
|
|
|
</>
|
|
|
}
|