wjx 10 months ago
parent
commit
46a811244d

+ 0 - 63
src/pages/launchSystemV3/tencentAdPutIn/create/Material/index.tsx

@@ -19,75 +19,12 @@ const Material: React.FC = () => {
     /***************************************/
 
     useEffect(() => {
-        console.log(materialData)
         if (materialData && Object.keys(materialData).length > 0) {
             let type = Object.keys(materialData)[0];
             setMtype(type)
         }
     }, [materialData])
 
-    // 提交测试用 后期删除
-    useEffect(() => {
-        if (dynamicMaterialDTos && Object.keys(dynamicMaterialDTos) && mType) {
-            console.log('创意素材拼装', dynamicMaterialDTos)
-            console.log(dynamicMaterialDTos.dynamicGroup?.map((item: any) => {
-                if (mType === 'image') {
-                    return [{
-                        type: mType,
-                        valueJson: JSON.stringify({
-                            value: {
-                                imageUrl: item?.image_id?.url,
-                                imageId: item?.image_id?.id,
-                                materialType: item?.image_id?.materialType
-                            }
-                        })
-                    }]
-                } else if (mType === 'image_list' || mType === 'element_story') {
-                    let key = 'image_list'
-                    if (mType === 'element_story') {
-                        key = 'element_story'
-                    }
-                    let list = item?.[key]?.map((l: any) => {
-                        return {
-                            imageUrl: l?.url,
-                            imageId: l?.id,
-                            materialType: l?.materialType
-                        }
-                    })
-                    return [{
-                        type: mType,
-                        valueJson: JSON.stringify({
-                            value: {
-                                list
-                            }
-                        })
-                    }]
-                } else if (['short_video', 'video'].includes(mType)) {
-                    let value: any = {
-                        materialType: item?.video_id?.materialType || item?.short_video1?.materialType || 0,
-                        videoUrl: item?.video_id?.url || item?.short_video1?.url,
-                        videoId: item?.video_id?.id || item?.short_video1?.id
-                    }
-                    if (item?.cover_id?.url) {
-                        value.imageUrl = item?.cover_id?.url
-                        value.imageId = item?.cover_id?.id
-                        value.materialCoverType = item?.cover_id?.materialType
-                    }
-                    return [{
-                        type: mType,
-                        valueJson: JSON.stringify({
-                            value
-                        })
-                    }]
-                }
-                return [{
-                    type: mType,
-                    valueJson: ''
-                }]
-            }))
-        }
-    }, [dynamicMaterialDTos, mType])
-
     return <div className={`${style.settingsBody_content_row} ${style.row4}`}>
         <div className={style.title}>
             <span>创意素材 <span className={style.selected}>已选 {dynamicMaterialDTos?.dynamicGroup?.length || 0}</span></span>

+ 1 - 8
src/pages/launchSystemV3/tencentAdPutIn/create/index.tsx

@@ -190,7 +190,6 @@ const Create: React.FC = () => {
                 productList = item?.wechatChannelList || []
             }
             let data = cartesianProduct(productList, targeting).map(newD => {
-                console.log('newD-->', newD)
                 let [productDto, targetDto, index] = newD
                 let suffix = '_' + item.accountId + '_' + index
                 let dat: any = {
@@ -216,7 +215,6 @@ const Create: React.FC = () => {
                 return dat
             })
             newAdCount += data.length
-            console.log('data--->', data)
             let newData = cartesianProduct(data, dynamicMaterialDTos.dynamicGroup || [{}]).map((item, index) => {
                 let [d1, group] = item
                 return {
@@ -232,7 +230,6 @@ const Create: React.FC = () => {
         })
         setAdCount(newAdCount)
         setDynamicCount(newdynamicCount)
-        console.log('111111-->', newTableData)
         setActiveKey(accountCreateLogs?.[0].accountId?.toString())
         setTableData(newTableData)
     }
@@ -329,7 +326,6 @@ const Create: React.FC = () => {
             dynamicMaterialDTOS,
             accountIdParamDTOMap
         }
-        console.log(params)
         // setSubVisible(false)
         createAdgroupTask.run(params).then(res => {
             if (res) {
@@ -417,11 +413,8 @@ const Create: React.FC = () => {
                                 return newInput?.some(val => option!.children?.toString().toLowerCase()?.includes(val))
                             }}
                             value={accountCreateLogs?.map(item => item?.accountId)}
-                            onChange={(e, option) => {
-                                console.log(e, option)
-                                // setQueryForm({ ...queryForm, adqPageList: [], pageList: [], taskMediaMaps: queryForm?.taskMediaMaps?.map((item: { sysPageId: number }) => ({ ...item, sysPageId: '', accountPageIdMap: {}, cropUserGroupMap: [] })) })
+                            onChange={(e) => {
                                 setAccountCreateLogs(e?.map((item: any) => ({ accountId: item })))
-                                // clearData()
                             }}
                             searchValue={accSearch}
                             onSearch={(val) => {