shenwu 1 year ago
parent
commit
03e180d3a4
1 changed files with 31 additions and 32 deletions
  1. 31 32
      src/pages/launchSystemNew/launchManage/createAd/index.tsx

+ 31 - 32
src/pages/launchSystemNew/launchManage/createAd/index.tsx

@@ -34,7 +34,6 @@ import UserTactics from "./tacticsS/userTactics"
 import VideoNews from "../../components/newsModal/videoNews"
 
 const CreateAd: React.FC = () => {
-
     /*************************/
     const { getAllUserAccount } = useModel('useLaunchAdq.useAdAuthorize')
     const [queryForm, setQueryForm] = useState<Partial<CreateAdProps>>({
@@ -74,8 +73,6 @@ const CreateAd: React.FC = () => {
     const { init, get } = useModel('useLaunchAdq.useBdMediaPup')
     const [cloudParams, setCloudParams] = useState<{ adcreativeTemplateId?: number }>({})
     const [accSearch, setAccSearch] = useState<string>()
-
-
     const tagsList_REGION = useAjax((params) => getTagsList(params))
     const tagsList_MODEL = useAjax((params) => getTagsList(params))
     const getSysAdgroups = useAjax((params) => getSysAdgroupsInfo(params))
@@ -86,7 +83,6 @@ const CreateAd: React.FC = () => {
     const getAdcreativeTemplate = useAjax((params) => get_adcreative_template(params))
     const getGroupList = useAjax(() => getGroupListApi())
     /*************************/
-
     useEffect(() => {
         getGroupList.run()
     }, [])
@@ -107,7 +103,7 @@ const CreateAd: React.FC = () => {
         let taskId = sessionStorage.getItem('TASKID')
         if (taskId) {
             getTaskDetails.run(taskId).then(async res => {
-                const { adCreateLogs, campaignType, promotedObjectType, speedMode, sysAdgroup, sysAdgroupId, sysTargeting, sysTargetingId,putModel } = res
+                const { adCreateLogs, campaignType, promotedObjectType, speedMode, sysAdgroup, sysAdgroupId, sysTargeting, sysTargetingId, putModel } = res
                 let adcreativeTemplateId = adCreateLogs[0]?.sysAdcreative?.adcreativeTemplateId
                 let sysPageId = adCreateLogs[0]?.sysPageId
                 let pageId = adCreateLogs[0]?.pageId
@@ -131,7 +127,7 @@ const CreateAd: React.FC = () => {
                 }).filter((item: any, index: number, self: any) => self.findIndex((i: any) => i.id == item.id) === index)
                 setAccountCreateLogs(adCreateLogsData)
 
-                let type:0| 1 | 2 = putModel
+                let type: 0 | 1 | 2 = putModel
                 // if (sysPageId && pageId) {
                 //     type = 0
                 // } else if (sysPageId) {
@@ -903,7 +899,7 @@ const CreateAd: React.FC = () => {
     const switchLaunchMode = (mode: number) => {
         setLaunchMode(mode)
         localStorage.setItem('LAUNCHMODE', mode.toString())
-        if(launchMode === 0 || mode === 0){
+        if (launchMode === 0 || mode === 0) {
             delBdPlan()
         }
         set_targetKey('0')
@@ -939,30 +935,32 @@ const CreateAd: React.FC = () => {
     return <Space direction="vertical" style={{ width: '100%' }}>
         <Card
             title={
-                <Space>
-                    <div className={style.cardTitle}>配置区</div>
-                    <Select
-                        style={{ width: 100 }} size="small"
-                        value={Number(launchMode)}
-                        onChange={(value) => {
-                            switchLaunchMode(value)
-                        }}
-                        options={[
-                            {
-                                value: 0,
-                                label: "普通模式",
-                            },
-                            {
-                                value: 1,
-                                label: "叉乘模式",
-                            },
-                            {
-                                value: 2,
-                                label: "顺序模式",
-                            }
-                        ]}>
-                    </Select>
-                    {/* <Popconfirm
+                <div>
+                    <h3 style={{textAlign:'center',color:'red'}}>请注意:叉乘模式和顺序模式都属于新建创意,腾讯规定每个广告账户每天新建创意限制20条.</h3>
+                    <Space>
+                        <div className={style.cardTitle}>配置区</div>
+                        <Select
+                            style={{ width: 100 }} size="small"
+                            value={Number(launchMode)}
+                            onChange={(value) => {
+                                switchLaunchMode(value)
+                            }}
+                            options={[
+                                {
+                                    value: 0,
+                                    label: "普通模式",
+                                },
+                                {
+                                    value: 1,
+                                    label: "叉乘模式",
+                                },
+                                {
+                                    value: 2,
+                                    label: "顺序模式",
+                                }
+                            ]}>
+                        </Select>
+                        {/* <Popconfirm
                         title={<>当前已编辑的数据部分不会保存,是否切换?</>}
                         onConfirm={switchLaunchMode}
                         okText="是"
@@ -970,7 +968,8 @@ const CreateAd: React.FC = () => {
                     >
                         <Button type="link" style={{ padding: 0 }}>切换投放模式</Button>
                     </Popconfirm> */}
-                </Space>
+                    </Space>
+                </div>
             }
             className={style.createAd}
             hoverable