|
@@ -6,7 +6,7 @@ import { PromotedObjectType } from "@/services/launchAdq/enum"
|
|
|
import { getTagsList, get_adcreative_template } from "@/services/launchAdq/global"
|
|
|
import { getSysAdgroupsInfo } from "@/services/launchAdq/localAd"
|
|
|
import { getsysTargetingInfo } from "@/services/launchAdq/targeting"
|
|
|
-import { CheckOutlined, CloseOutlined, ExclamationCircleFilled, SearchOutlined } from "@ant-design/icons"
|
|
|
+import { CheckOutlined, CloseOutlined, ExclamationCircleFilled, QuestionCircleOutlined, SearchOutlined } from "@ant-design/icons"
|
|
|
import { Button, Card, Col, Empty, Row, Select, Space, Spin, Tooltip, Image, message, Tabs, notification, Divider, Checkbox, Modal, Tag } from "antd"
|
|
|
import React, { useCallback, useEffect, useState } from "react"
|
|
|
import { useModel } from "umi"
|
|
@@ -32,6 +32,7 @@ import { getAccountListApi, getGroupListApi } from "@/services/launchAdq/subgrou
|
|
|
import TacticsS from "./tacticsS"
|
|
|
import UserTactics from "./tacticsS/userTactics"
|
|
|
import VideoNews from "../../components/newsModal/videoNews"
|
|
|
+import { putPromotedObjectSync } from "@/services/launchAdq/adq"
|
|
|
|
|
|
const CreateAd: React.FC = () => {
|
|
|
/*************************/
|
|
@@ -82,6 +83,7 @@ const CreateAd: React.FC = () => {
|
|
|
const getTaskDetails = useAjax((params) => getTaskDetailsApi(params))
|
|
|
const getAdcreativeTemplate = useAjax((params) => get_adcreative_template(params))
|
|
|
const getGroupList = useAjax(() => getGroupListApi())
|
|
|
+ const syncAjax = useAjax((adAccountId) => putPromotedObjectSync(adAccountId))
|
|
|
/*************************/
|
|
|
useEffect(() => {
|
|
|
getGroupList.run()
|
|
@@ -931,11 +933,17 @@ const CreateAd: React.FC = () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ const synTgmb = () => {
|
|
|
+ syncAjax.run({ accountIdList: accountCreateLogs.map(item => item.id) }).then(res => {
|
|
|
+ res ? message.success('同步成功!') : message.error('同步失败!')
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
return <Space direction="vertical" style={{ width: '100%' }}>
|
|
|
+ <h3 style={{ textAlign: 'center', color: 'red', marginBottom: 0 }}>请注意:除了普通模式选择创意模板,叉乘模式和顺序模式都属于新建创意,腾讯规定每个广告账户每天新建创意限制20条。</h3>
|
|
|
<Card
|
|
|
title={
|
|
|
<div>
|
|
|
- <h3 style={{textAlign:'center',color:'red'}}>请注意:除了普通模式选择创意模板,叉乘模式和顺序模式都属于新建创意,腾讯规定每个广告账户每天新建创意限制20条。</h3>
|
|
|
<Space>
|
|
|
<div className={style.cardTitle}>配置区</div>
|
|
|
<Select
|
|
@@ -972,7 +980,15 @@ const CreateAd: React.FC = () => {
|
|
|
}
|
|
|
className={style.createAd}
|
|
|
hoverable
|
|
|
- extra={<UserTactics setQueryForm={setQueryForm} setAccountCreateLogs={setAccountCreateLogs} setLaunchMode={setLaunchMode} />}
|
|
|
+ extra={<Space>
|
|
|
+ {accountCreateLogs?.length > 0 && <Button loading={syncAjax.loading} onClick={synTgmb}>
|
|
|
+ 同步推广目标
|
|
|
+ <Tooltip title="近期账号更改推广目标(比如以前推广公众,现在投企微),选择媒体账号后同步">
|
|
|
+ <QuestionCircleOutlined />
|
|
|
+ </Tooltip>
|
|
|
+ </Button>}
|
|
|
+ <UserTactics setQueryForm={setQueryForm} setAccountCreateLogs={setAccountCreateLogs} setLaunchMode={setLaunchMode} />
|
|
|
+ </Space>}
|
|
|
>
|
|
|
<Space wrap>
|
|
|
<Selector label="媒体账户组">
|
|
@@ -1260,8 +1276,8 @@ const CreateAd: React.FC = () => {
|
|
|
<Row className={style.items}>
|
|
|
{/* 创意 */}
|
|
|
<CreativeCL queryForm={queryForm} setQueryForm={setQueryForm} clearData={clearData} getSysAdcreative={getSysAdcreative} targetKey={targetKey} />
|
|
|
- {/* 落地页 */}
|
|
|
- <Col className={style.conRightBorder} style={{ maxWidth: '25%', border: 'none' }}>
|
|
|
+ {/* 落地页 maxWidth: '25%', */}
|
|
|
+ <Col className={style.conRightBorder} style={{ border: 'none' }}>
|
|
|
<div className={style.top}>
|
|
|
落地页
|
|
|
{(queryForm?.taskMediaMaps && queryForm?.taskMediaMaps[targetKey]?.cropUserGroupMap?.length > 0) && <CustomerServiceModal data={queryForm?.taskMediaMaps[targetKey]?.cropUserGroupMap} onChange={(data) => {
|
|
@@ -1340,7 +1356,7 @@ const CreateAd: React.FC = () => {
|
|
|
|
|
|
</Row>
|
|
|
{/* =============广告底部按钮=========== */}
|
|
|
- <Space className={style.bts}>
|
|
|
+ <Space className={style.bts} wrap>
|
|
|
<TacticsS queryForm={queryForm} accountCreateLogs={accountCreateLogs} launchMode={launchMode} />
|
|
|
<Button type='primary' onClick={severBd}>存为预设</Button>
|
|
|
<Button type='primary' onClick={preview}><SearchOutlined /> 批量预览广告</Button>
|