wjx 8 months ago
parent
commit
a7c8e22115

+ 1 - 1
config/config.ts

@@ -75,7 +75,7 @@ export default defineConfig({
   // @ts-ignore
   title: false,
   ignoreMomentLocale: true,
-  proxy: proxy[REACT_APP_ENV || 'dev'],
+  proxy: proxy[(REACT_APP_ENV || 'dev') as keyof typeof proxy],
   manifest: {
     basePath: '/',
   },

+ 2 - 2
config/proxy.ts

@@ -10,8 +10,8 @@
  export default {
   dev: {
     '/api/': {
-      // target: 'https://testapi.zanxiangwl.com',
-      target: 'https://api.zanxiangwl.com',
+      target: 'https://testapi.zanxiangwl.com',
+      // target: 'https://api.zanxiangwl.com',
       changeOrigin: true,
       pathRewrite: { '/api': '' },
     },

+ 0 - 1
src/Hook/useEcharts.tsx

@@ -1,5 +1,4 @@
 import React, { useEffect, useRef, useState } from 'react'
-import * as echarts from 'echarts'
 import { EChartsOption, init, dispose, registerMap } from 'echarts'
 import { Empty } from 'antd'
 import { china } from '@/utils/dictionary'

+ 6 - 6
src/pages/launchSystemNew/launchManage/createAd/creativeCL/modal/index.tsx

@@ -359,9 +359,9 @@ function CreativePup(props: Props) {
                         set_adcreative_template(res[0])
                         if (siteSet?.some((name: string) => name === 'SITE_SET_MOMENTS')) {
                             let id = res[0].adcreativeTemplateId
-                            set_isShowSc(!!creativeConfig[id])//判定当前创意是否需要展示替换素材选项
-                            if (creativeConfig[id] && !ok) {//假如不等于回填元素的ID
-                                let overrideCanvasHeadOption = creativeConfig[id].overrideCanvasHeadOption
+                            set_isShowSc(!!creativeConfig[id as keyof typeof creativeConfig])//判定当前创意是否需要展示替换素材选项
+                            if (creativeConfig[id as keyof typeof creativeConfig] && !ok) {//假如不等于回填元素的ID
+                                let overrideCanvasHeadOption = creativeConfig[id as keyof typeof creativeConfig].overrideCanvasHeadOption
                                 form.setFieldsValue({ overrideCanvasHeadOption: overrideCanvasHeadOption?.includes('OPTION_CREATIVE_OVERRIDE_CANVAS') ? 'OPTION_CREATIVE_OVERRIDE_CANVAS' : overrideCanvasHeadOption[0] })
                             }
                         }
@@ -416,7 +416,7 @@ function CreativePup(props: Props) {
         }
         return null
     }, [pageType, pageTypeList])
-    const typeChange = useCallback((adcreativeElementsType) => {
+    const typeChange = useCallback((adcreativeElementsType: any) => {
         if (adcreativeElementsType && adcreative_template_list?.length > 0) {
             let adcreativeTemplateIdArr = adcreative_template_list?.filter(item => item.adcreativeTemplateStyle === adcreativeElementsType)
             if (adcreativeTemplateIdArr?.length > 0) {
@@ -722,8 +722,8 @@ 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 as keyof typeof creativeConfig]?.overrideCanvasHeadOption?.map((item: string | number) => {
+                                        return <Radio value={item} key={item}>{overrideCanvasHeadOptionEnum[item as keyof typeof overrideCanvasHeadOptionEnum]}</Radio>
                                     })}
                                 </Radio.Group>
                             </Form.Item>

+ 35 - 6
src/pages/launchSystemV3/adMonitorListV3/CreativePreview.tsx

@@ -4,6 +4,7 @@ import './index.less'
 import cpTableConfig from "./cpTableConfig"
 
 interface Props {
+    deliveryMode: string[]
     creativePreview: {
         brand?: {
             value: {
@@ -26,10 +27,29 @@ interface Props {
                 videoUrl: string
             }
         }[],
+        shortVideo?: {
+            value: {
+                videoUrl: string
+            }
+        }[],
         image?: {
             value: {
                 imageUrl: string
             }
+        }[],
+        elementStory?: {
+            value: {
+                list: {
+                    imageUrl: string
+                }[]
+            }
+        }[],
+        imageList?: {
+            value: {
+                list: {
+                    imageUrl: string
+                }[]
+            }
         }[]
     }[]
 }
@@ -39,11 +59,20 @@ interface Props {
  * @param param0 
  * @returns 
  */
-const CreativePreview: React.FC<Props> = ({ creativePreview }) => {
+const CreativePreview: React.FC<Props> = ({ creativePreview, deliveryMode }) => {
 
     /***************************/
     let video = creativePreview?.[0]?.video?.[0]?.value?.videoUrl
-    let imageUrl = creativePreview?.[0]?.image
+    let imageUrl = creativePreview?.[0]?.image?.[0]?.value?.imageUrl
+    if (!imageUrl && creativePreview?.[0]?.elementStory) {
+        imageUrl = creativePreview?.[0]?.elementStory?.[0]?.value?.list?.[0]?.imageUrl
+    }
+    if (!imageUrl && creativePreview?.[0]?.imageList) {
+        imageUrl = creativePreview?.[0]?.imageList?.[0]?.value?.list?.[0]?.imageUrl
+    }
+    if (!video && !imageUrl && creativePreview?.[0]?.shortVideo) {
+        video = creativePreview?.[0]?.shortVideo?.[0]?.value?.videoUrl
+    }
     let titles = creativePreview?.[0]?.brand
     let descriptions = creativePreview?.[0]?.description
     let title = creativePreview?.[0]?.title
@@ -55,7 +84,7 @@ const CreativePreview: React.FC<Props> = ({ creativePreview }) => {
                 <Table
                     bordered
                     columns={cpTableConfig()}
-                    dataSource={creativePreview?.map((item, index) => ({ ...item, id: index }))}
+                    dataSource={creativePreview?.map((item, index) => ({ ...item, deliveryMode: deliveryMode[index], id: index + 1 }))}
                     scroll={{ y: 380 }}
                     rowKey={'id'}
                     size="small"
@@ -67,12 +96,12 @@ const CreativePreview: React.FC<Props> = ({ creativePreview }) => {
             placement="left"
         >
             <div>
-                {video ? <video src={video} style={{ maxHeight: 18, maxWidth: 25 }} /> : (imageUrl && imageUrl?.length > 0) ? <div>
-                    {imageUrl?.[0]?.value?.imageUrl ? <img src={imageUrl?.[0]?.value?.imageUrl} height={18} /> : <span>无图片地址</span>}
+                {video ? <video src={video} style={{ maxHeight: 18, maxWidth: 25 }} /> : imageUrl ? <div>
+                    {imageUrl ? <img src={imageUrl} height={18} /> : <span>无图片地址</span>}
                 </div> : (titles && titles?.length > 0) ? <Space>
                     <img src={titles?.[0]?.value?.brandImageUrl} height={18} />
                     <span>{titles?.[0]?.value?.brandName}</span>
-                </Space> : (title && title?.length > 0) ? <span>{title?.[0]?.value?.content}</span> : (descriptions && descriptions?.length > 0) ? <span>{descriptions?.[0]?.value?.content}</span> : <span>--</span>}
+                </Space> : (title && title?.length > 0) ? <span>{title?.[0]?.value?.content}</span> : (descriptions && descriptions?.length > 0) ? <span>{descriptions?.[0]?.value?.content}</span> : <span>没有素材</span>}
             </div>
         </Popover>
     </>

+ 1 - 1
src/pages/launchSystemV3/adMonitorListV3/Details.tsx

@@ -45,7 +45,7 @@ const Details: React.FC<Props> = ({ data, onClose, visible }) => {
                         if (index === 0) value.legendName = LineField[field as keyof typeof LineField];
                         value[item?.trend_unit] = item?.[field]
                     });
-                    return value
+                    return Object.keys(value)?.length > 0 ? value : { legendName: LineField[field as keyof typeof LineField] }
                 })
                 setLineDis(() => data)
             }

+ 2 - 2
src/pages/launchSystemV3/adMonitorListV3/TabDynamic.tsx

@@ -60,7 +60,7 @@ const TabDynamic: React.FC = () => {
     }
 
     const dynamicHandle = (type: '删除' | '启动' | '暂停', data?: any) => {
-        let accountAdgroupMaps = data ? [data.accountId + ',' + data.dynamicCreativeId] : [...new Set(selectedRows?.map(item => item.accountId + ',' + item.dynamicCreativeId))]
+        let accountAdgroupMaps = data ? [data.account_id + ',' + data.dynamic_creative_id] : [...new Set(selectedRows?.map(item => item.account_id + ',' + item.dynamic_creative_id))]
         let hide: any
         if (data) {
             hide = message.loading(`正在设置...`, 0, () => {
@@ -104,7 +104,7 @@ const TabDynamic: React.FC = () => {
                 className='expendTable'
                 columns={() => tableDynamicConfig((data, type) => dynamicHandle(type, data))}
                 ajax={getDynamicCreativeMonitorList}
-                fixed={{ left: 2, right: 4 }}
+                fixed={{ left: 2, right: 2 }}
                 dataSource={getDynamicCreativeMonitorList?.data?.data?.records}
                 loading={getDynamicCreativeMonitorList?.loading}
                 scroll={{ y: 560 }}

+ 2 - 1
src/pages/launchSystemV3/adMonitorListV3/config.ts

@@ -190,7 +190,8 @@ const dynamicConfig = [
             { title: '创意形式匹配方式', dataIndex: 'dynamic_creative_type', label: '基本信息', serverIndex: 'dynamic_creative.dynamic_creative_type', default: 10, width: 70 },
             { title: '创意形式', dataIndex: 'creative_template_id', label: '基本信息', serverIndex: 'dynamic_creative.creative_template_id', default: 11, width: 90 },
             { title: '是否已删除', dataIndex: 'is_deleted', serverIndex: 'dynamic_creative.is_deleted', label: '基本信息', default: 12, width: 60 },
-            { title: '操作', dataIndex: 'cz', label: '基本信息', default: 20, width: 235 },
+            { title: '创意预览', dataIndex: 'creative_components_json', serverIndex: 'dynamic_creative.creative_components_json', label: '基本信息', default: 20, width: 120 },
+            { title: '操作', dataIndex: 'cz', label: '基本信息', default: 21, width: 100 },
         ]
     },
     {

+ 97 - 86
src/pages/launchSystemV3/adMonitorListV3/cpTableConfig.tsx

@@ -1,5 +1,10 @@
 import React from "react"
-import { Image, Popover, Space } from "antd"
+import { Space, Typography } from "antd"
+import style from '../tencentAdPutIn/create/index.less'
+import styles from '../tencentAdPutIn/create/Material/index.less'
+import VideoNews from "@/pages/launchSystemNew/components/newsModal/videoNews";
+
+const { Text, Title } = Typography;
 
 function cpTableConfig(): any {
     return [
@@ -7,7 +12,7 @@ function cpTableConfig(): any {
             title: '品牌形象',
             dataIndex: 'brand',
             key: 'brand',
-            width: 110,
+            width: 120,
             ellipsis: true,
             render: (a: any[]) => {
                 return a?.length > 0 ? <Space>
@@ -17,98 +22,104 @@ function cpTableConfig(): any {
             }
         },
         {
-            title: '文本标题',
-            dataIndex: 'title',
-            key: 'title',
-            width: 140,
+            title: '创意素材',
+            dataIndex: 'dynamicGroup',
+            key: 'dynamicGroup',
+            width: 400,
             ellipsis: true,
-            render: (a: any[]) => {
-                return a?.length > 0 ? a.map((item, index) => `标题${index + 1}:${item?.value?.content}`)?.toString() : '--'
+            render: (_: any, b: any) => {
+                let deliveryMode = b?.deliveryMode
+                if (b?.image || b?.video || b?.shortVideo || b?.elementStory || b?.imageList) {
+                    if (deliveryMode === "DELIVERY_MODE_CUSTOMIZE") {
+                        return <>
+                            <div className={style.detail_body_m}>
+                                {(b?.video || b?.shortVideo) ? <>
+                                    <div className={style.video}>
+                                        <VideoNews src={b?.video?.[0]?.value?.videoUrl || b?.shortVideo?.[0]?.value?.videoUrl} />
+                                    </div>
+                                </> : b?.image ? <>
+                                    <div className={style.cover_image}>
+                                        <img src={b?.image?.[0]?.value?.imageUrl} />
+                                    </div>
+                                </> : (b?.elementStory || b?.imageList) ? <>
+                                    {b?.[b?.imageList ? 'imageList' : 'elementStory']?.[0]?.value?.list?.map((item: { imageUrl: string }, index: undefined) => <div className={style.cover_image} key={index} style={{ width: 30, height: 24, minWidth: 32 }}>
+                                        <img src={item?.imageUrl} />
+                                    </div>)}
+                                </> : null}
+                            </div>
+                        </>
+                    } else {
+                        return <div style={{ display: 'flex', gap: 5, flexWrap: 'wrap' }}>
+                            {b?.imageList && b?.imageList.map((item: any, index: number) => {
+                                return <div className={styles.boxList_body_item} key={'list' + index} style={{ width: 60, height: 60 }}>
+                                    <div className={styles.content} style={{ width: 60, height: 60 }}>
+                                        {item?.value?.list?.map((u: { imageUrl: string }, i: number, data: any[]) => <img src={u?.imageUrl} key={i} style={{ width: data.length === 6 ? 9.999 : 14.999 }} />)}
+                                    </div>
+                                </div>
+                            })}
+                            {b?.video && b?.video.map((item: any, index: number) => {
+                                return <div className={styles.boxList_body_item} key={'video' + index} style={{ width: 60, height: 60 }}>
+                                    <div className={styles.content} style={{ width: 60, height: 60 }}>
+                                        <VideoNews src={item?.value?.videoUrl} style={{ width: 60, height: 60 }} maskBodyStyle={{ backgroundColor: "rgba(242, 246, 254, 0.1)" }} />
+                                    </div>
+                                </div>
+                            })}
+                            {b?.image && b?.image.map((item: any, index: number) => {
+                                return <div className={styles.boxList_body_item} key={'image' + index} style={{ width: 60, height: 60 }}>
+                                    <div className={styles.content} style={{ width: 60, height: 60 }}><img src={item?.value?.imageUrl} /></div>
+                                </div>
+                            })}
+                        </div>
+                    }
+                } else {
+                    return <Text style={{ fontSize: 12 }}>无需配置</Text>
+                }
             }
         },
         {
-            title: '文本描述',
+            title: '创意文案',
             dataIndex: 'description',
             key: 'description',
-            width: 140,
-            ellipsis: true,
-            render: (a: any[]) => {
-                return a?.length > 0 ? a.map((item, index) => `描述${index + 1}:${item?.value?.content}`)?.toString() : '--'
-            }
-        },
-        {
-            title: '单图片',
-            dataIndex: 'image',
-            key: 'image',
-            width: 140,
-            ellipsis: true,
-            render: (a: any[]) => {
-                return <div style={{ minHeight: 50 }}>
-                    {a?.length > 0 ? <div className='tableScrollbar' style={{ overflow: 'hidden', overflowX: 'auto' }}>
-                        <Image.PreviewGroup>
-                            {a?.map((item, index) => <Image key={item?.componentId + '_' + index} src={item?.value?.imageUrl} height={45} />)}
-                        </Image.PreviewGroup>
-                    </div> : '--'}
-                </div>
-            }
-        },
-        {
-            title: '图集',
-            dataIndex: 'imageList',
-            key: 'imageList',
-            width: 140,
-            ellipsis: true,
-            render: (a: any[]) => {
-                return a?.length > 0 ? <div className='tableScrollbar' style={{ overflow: 'hidden', overflowX: 'auto', display: 'flex', gap: 10 }}>
-                    {a?.map((item, index) => <Image.PreviewGroup key={index}>
-                        {item?.value?.list?.map((list: any, i: number) => <Image key={i} src={list?.imageUrl} height={45} />)}
-                    </Image.PreviewGroup>)}
-                </div> : '--'
-            }
-        },
-        {
-            title: '视频',
-            dataIndex: 'video',
-            key: 'video',
-            width: 140,
-            ellipsis: true,
-            render: (a: any[]) => {
-                return a?.length > 0 ? < Popover
-                    placement='right'
-                    content={< div >
-                        <Space style={{ maxWidth: 300, display: 'flex', flexFlow: 'row wrap', margin: '10px 0' }}>
-                            {a?.map((item, index) => <video key={index} src={item?.value?.videoUrl} style={{ width: 250 }} controls />)}
-                        </Space>
-                    </div >}
-                    destroyTooltipOnHide
-                    mouseEnterDelay={0.5}
-                >
-                    <Space style={{ width: '100%' }}>
-                        <video src={a?.[0]?.value?.videoUrl} style={{ maxHeight: 40, maxWidth: 60 }} />
-                    </Space>
-                </Popover> : '--'
-            }
-        },
-        {
-            title: '轮播',
-            dataIndex: 'floatingZone',
-            key: 'floatingZone',
-            width: 150,
-            ellipsis: true,
-            render: (a: any[]) => {
-                return a?.length > 0 ? <div className='tableScrollbar' style={{ overflow: 'hidden', overflowX: 'auto' }}>
-                    {a?.map((item, index) => <div key={index} style={{ display: 'flex', alignItems: 'center', gap: 1 }}>
-                        <div style={{ width: 40 }}>
-                            <Image src={item?.value?.floatingZoneImageUrl} width={40} height={40} />
-                        </div>
-                        <div>
-                            <span>{item?.value?.floatingZoneName}</span><br />
-                            <span>{item?.value?.floatingZoneDesc}</span>
-                        </div>
-                    </div>)}
-                </div> : '--'
+            width: 200,
+            render: (a: any[] = [], b: any) => {
+                let title: any[] = b?.title || []
+                if (a?.length || title?.length) {
+                    return <div className={style.detail_body} style={{ height: 'auto' }}>
+                        {title?.length > 0 && <div>
+                            <Title level={5} style={{ fontSize: 12 }}>{'标题'}</Title>
+                            {title.map((t: any, index: number) => <div className={style.text} key={index}><Text ellipsis={{ tooltip: true }}>{t?.value?.content}</Text></div>)}
+                        </div>}
+                        {a?.length > 0 && <div>
+                            <Title level={5} style={{ fontSize: 12 }}>{'描述'}</Title>
+                            {a.map((t: any, index: number) => <div className={style.text} key={index}><Text ellipsis={{ tooltip: true }}>{t?.value?.content}</Text></div>)}
+                        </div>}
+                    </div>
+                } else {
+                    return '--'
+                }
             }
         },
+        
+        // {
+        //     title: '轮播',
+        //     dataIndex: 'floatingZone',
+        //     key: 'floatingZone',
+        //     width: 150,
+        //     ellipsis: true,
+        //     render: (a: any[]) => {
+        //         return a?.length > 0 ? <div className='tableScrollbar' style={{ overflow: 'hidden', overflowX: 'auto' }}>
+        //             {a?.map((item, index) => <div key={index} style={{ display: 'flex', alignItems: 'center', gap: 1 }}>
+        //                 <div style={{ width: 40 }}>
+        //                     <Image src={item?.value?.floatingZoneImageUrl} width={40} height={40} />
+        //                 </div>
+        //                 <div>
+        //                     <span>{item?.value?.floatingZoneName}</span><br />
+        //                     <span>{item?.value?.floatingZoneDesc}</span>
+        //                 </div>
+        //             </div>)}
+        //         </div> : '--'
+        //     }
+        // },
     ]
 }
 export default cpTableConfig

+ 1 - 1
src/pages/launchSystemV3/adMonitorListV3/index.tsx

@@ -8,7 +8,7 @@ import TabDynamic from "./TabDynamic"
 const AdMonitorListV3: React.FC = () => {
 
     // 变量开始
-    const [tab, setTab] = useState<string>('dynamic')  // tab切换
+    const [tab, setTab] = useState<string>('monitor')  // tab切换
     const { getPlanList, getPlanDetailList, getAllPlanList } = useModel('useAdMonitor.useMonitor')
     const [userId] = useState(localStorage.getItem("userId") as string)
     const { getPicherList } = useModel('useOperating.useWxGroupList')

+ 1 - 1
src/pages/launchSystemV3/adMonitorListV3/monitor.tsx

@@ -208,7 +208,7 @@ function Monitor(props: { onChange: () => void }) {
     }, [])
 
     //图形排列样式改变重新获取数据刷新图形
-    const set = useCallback((b) => {
+    const set = useCallback((b: any) => {
         setPx(b)
         getCostTrendV3List.refresh()
         getCostTopV3List.refresh()

+ 11 - 0
src/pages/launchSystemV3/adMonitorListV3/tableDynamicConfig.tsx

@@ -7,6 +7,7 @@ import StatisticNull from '@/components/StatisticNull'
 import { QuestionCircleOutlined } from '@ant-design/icons'
 import { DELIVERY_MODE, DYNAMIC_CREATIVE_TYPE } from '../adqv3/const'
 import { creativeTemplate } from '../tencentAdPutIn/const'
+import CreativePreview from './CreativePreview'
 
 function tableDynamicConfig(
     suspendHandle: (b: any, suspend: '启动' | '暂停') => void
@@ -156,6 +157,16 @@ function tableDynamicConfig(
             width: 140,
             ellipsis: true,
         },
+        {
+            title: '创意预览',
+            dataIndex: 'creative_components_json',
+            key: 'creative_components_json',
+            width: 140,
+            ellipsis: true,
+            render: (_: any, b: any) => {
+                return <CreativePreview creativePreview={b?.creative_components ? [b?.creative_components] : []} deliveryMode={[b?.delivery_mode]} />
+            }
+        },
         {
             title: '操作',
             dataIndex: 'cz',

+ 5 - 5
src/pages/launchSystemV3/adMonitorListV3/tableMonitorConfig.tsx

@@ -8,8 +8,8 @@ import '@/pages/adMonitor/adMonitorList/index.less'
 import { CHUJIAFANGSHI, YOUHUAMUBIAO } from '@/pages/adMonitor/adMonitorList/enum'
 import { copy } from '@/utils/utils'
 import { ADGROUP_STATUS } from '../adqv3/const'
-import BoxOther from '../adqv3/creative/boxOther'
 import CreativePreview from './CreativePreview'
+
 function columnsMonitor(planDetail: (id: number) => void, details: (id: number) => void, onChange: (value: any) => void, log: (value: any) => void, sync: (data: any) => void) {
     const { copy } = useCopy()
     return function columns() {
@@ -67,7 +67,7 @@ function columnsMonitor(planDetail: (id: number) => void, details: (id: number)
                 width: 110,
                 render: (_: any, b: any) => {
                     // return <BoxOther creativeComponents={b?.creative_preview?.[0] || {}} />
-                    return <CreativePreview creativePreview={b?.creative_preview || []} />
+                    return <CreativePreview creativePreview={b?.creative_preview || []} deliveryMode={b.delivery_mode}/>
                 }
             },
             {
@@ -89,7 +89,7 @@ function columnsMonitor(planDetail: (id: number) => void, details: (id: number)
                 width: 105,
                 ellipsis: true,
                 render: (a: any) => {
-                    return ADGROUP_STATUS[a] || '--'
+                    return ADGROUP_STATUS[a as keyof typeof ADGROUP_STATUS] || '--'
                 }
             },
             {
@@ -111,7 +111,7 @@ function columnsMonitor(planDetail: (id: number) => void, details: (id: number)
                 align: 'center',
                 width: 80,
                 render: (a: any) => {
-                    return CHUJIAFANGSHI[a] || '--'
+                    return CHUJIAFANGSHI[a as keyof typeof CHUJIAFANGSHI] || '--'
                 }
             },
             {
@@ -354,7 +354,7 @@ function columnsMonitor(planDetail: (id: number) => void, details: (id: number)
                 align: 'center',
                 width: 115,
                 render: (a: any) => {
-                    return YOUHUAMUBIAO[a] || '--'
+                    return YOUHUAMUBIAO[a as keyof typeof YOUHUAMUBIAO] || '--'
                 }
             },
             {

+ 1 - 1
src/pages/launchSystemV3/adMonitorListV3/tablePlanListConfig.tsx

@@ -303,7 +303,7 @@ function tablePlanConfig(
             ellipsis: true,
             render: (_: any, b: any) => {
                 // return <BoxOther creativeComponents={b?.creative_preview?.[0] || {}} />
-                return <CreativePreview creativePreview={b?.creative_preview || []} />
+                return <CreativePreview creativePreview={b?.creative_preview || []} deliveryMode={b?.delivery_mode}/>
             }
         },
         {

+ 1 - 1
src/pages/launchSystemV3/tencentAdPutIn/const.ts

@@ -470,7 +470,7 @@ export enum WECHAT_AD_NEHAVIOR_ENUM {
 	WECHAT_MOMENTS_AD_LIKE = '曾对你的朋友圈广告感兴趣',
 	// WECHAT_OFFICIAL_ACCOUNT_FOLLOWED = '已关注过你的公众号',
 	GDT_WECHAT_OFFICIAL_ACCOUNT_FOLLOWED = '已关注过你的公众号',
-	// WECHAT_WORK_CONTACTS_ADDED = '已经添加过企业微信',
+	// WECHAT_WORK_CONTACTS_ADDED = '已经添加过企业微信'
 }
 
 /** 投放模式 */

+ 1 - 1
src/pages/launchSystemV3/tencentAdPutIn/create/Ad/adgroupsMarketingContent.tsx

@@ -182,7 +182,7 @@ const AdgroupsMarketingContent: React.FC<{ value?: any }> = ({ value }) => {
         </Form.Item>}
         {marketingTargetType === 'MARKETING_TARGET_TYPE_MINI_PROGRAM_WECHAT' ? <Form.Item label={<strong>微信小程序</strong>} name='sysWechatAppId' rules={[{ required: true, message: '请选择微信小程序' }]}>
             <SelectMiniProgramWechat />
-        </Form.Item> : marketingTargetType === 'MARKETING_TARGET_TYPE_WECHAT_WORK' ? <Form.Item label={<strong>企业微信</strong>} name='sysCorpWechatId' rules={[{ required: true, message: '请选择微信小程序' }]}>
+        </Form.Item> : marketingTargetType === 'MARKETING_TARGET_TYPE_WECHAT_WORK' ? <Form.Item label={<strong>企业微信</strong>} name='sysCorpWechatId' rules={[{ required: true, message: '请选择企业微信' }]}>
             <SelectCorpWechat />
         </Form.Item> : null}
         {marketingCarrierTypeList?.length > 0 && <Form.Item name="marketingCarrierType" label={<strong>营销载体类型</strong>} rules={[{ required: true, message: '请选择营销载体类型!' }]}>

+ 6 - 0
src/pages/launchSystemV3/tencentAdPutIn/create/Target/addTarget.tsx

@@ -11,6 +11,7 @@ import moment from "moment"
 import { txtLength } from "@/utils/utils"
 import { addTargetingApi, checkTargetingApi, updateTargetingApi } from "@/services/adqV3"
 import { useModel } from "umi"
+import { SelectCorpWechat } from "@/pages/launchSystemV3/tencenTasset/corpWechat"
 const { Title, Paragraph } = Typography;
 
 interface Props {
@@ -772,6 +773,11 @@ const AddTarget: React.FC<Props> = ({ isBackVal, value, visible, onChange, onClo
                                 <Checkbox.Group options={Object.keys(WECHAT_AD_NEHAVIOR_ENUM).map(key => ({ label: WECHAT_AD_NEHAVIOR_ENUM[key as keyof typeof WECHAT_AD_NEHAVIOR_ENUM], value: key, disabled: actions?.some((k: string) => k === key) }))} />
                             </Form.Item>
                         </>}
+                        {excludedActions?.includes('WECHAT_WORK_CONTACTS_ADDED') && <>
+                            <Form.Item label={<strong>企业微信</strong>} name={['wechatAdBehavior', 'corpId']} rules={[{ required: true, message: '请选择微信小程序' }]}>
+                                <SelectCorpWechat />
+                            </Form.Item>
+                        </>}
                     </div>}
                 </div>
             </Card>

+ 3 - 4
src/pages/launchSystemV3/tencentAdPutIn/create/index.tsx

@@ -330,7 +330,7 @@ const Create: React.FC = () => {
             message.error('请先选择转化归因')
             return
         }
-        
+
         if (!accountCreateLogs?.some(item => item?.pageList?.length)) {
             message.error('请先选择落地页')
             return
@@ -1000,9 +1000,8 @@ const Create: React.FC = () => {
                             setSubVisible(true)
                         }}>提交创建</Button>
                     </Space>}
-                >
-                    {accountCreateLogs.map(item => <Tabs.TabPane tab={item.accountId} key={item.accountId} />)}
-                </Tabs>
+                    items={accountCreateLogs.map(item => ({ label: item.accountId, key: item.accountId })) as any[]}
+                />
                 {addelivery?.dynamicCreativesTextDTOS?.type === 4 && <Title level={5} style={{ color: 'red', fontSize: 12 }}>因为选择的是“创意组和文案叉乘打乱后分配”模式,会随机打乱,当前预览广告下创意内容会与实际建出来的创意有偏差,请以建出来的为准</Title>}
                 <div className={style.content} style={{ marginTop: 20 }}>
                     <Table