shenwu 1 năm trước cách đây
mục cha
commit
38479bc4c6

+ 73 - 7
src/pages/launchSystemNew/account/index.tsx

@@ -1,6 +1,6 @@
 
 import HocError from '@/Hoc/HocError'
-import { Col, Modal, Row, Input, message, Space, Tabs, Button, Radio } from 'antd'
+import { Col, Modal, Row, Input, message, Space, Tabs, Button, Radio, Select } from 'antd'
 import React, { useCallback, useEffect, useState } from 'react'
 import { columnsMp } from './tableConfig'
 import { useAjax } from '@/Hook/useAjax'
@@ -11,7 +11,7 @@ import GroupLeft from './groupLeft'
 import QQAuth from './qqAuto'
 import { MenuFoldOutlined, MenuUnfoldOutlined, PlusOutlined, SwapOutlined } from '@ant-design/icons'
 import TeamMembers from '../components/teamMembers'
-import { getAdAccountAllOfMember, getErpUserAll } from '@/services/launchAdq/adq'
+import { getAdAccountAllOfMember, getErpUserAll, getServiceProviderAll, putConfigServiceProvider } from '@/services/launchAdq/adq'
 import AddAccountToGroup from './addAccountToGroup'
 import { delAccountToGroupApi } from '@/services/launchAdq/subgroup'
 import { useModel } from 'umi'
@@ -36,6 +36,8 @@ const AdAuthorize: React.FC = () => {
     const [crShow, setCrShow] = useState<boolean>(false) // 变更记录控制
     const [crData, setCrData] = useState<{ name: number, id: number } | null>(null)
     const [checkAccShow, setCheckAccShow] = useState<boolean>(false)
+    const [openServer, setOpenServer] = useState<any[]>([])//配置服务商数据
+    const [serverName, setServerName] = useState<any>(null)//选择的服务商名称
     const [data, setData] = useState<{
         putResourceId?: number | undefined,
         beginTime?: string | undefined,
@@ -53,18 +55,20 @@ const AdAuthorize: React.FC = () => {
     const [selectAccData, setSelectAccData] = useState<any[]>([])
     const [puShow, setPuShow] = useState<boolean>(false)
     const [puData, setPuData] = useState<any[]>([])
-    const [switchType, setSwitchType] = useState<'account' | 'putUser'>('account')
-
+    const [switchType, setSwitchType] = useState<'account' | 'putUser' | 'setServer'>('account')
     const putRemark = useAjax((adAccountId: any, remark: any) => putAdAccountApi(adAccountId, remark))
     const delAccountToGroup = useAjax((params) => delAccountToGroupApi(params))
     const getAdAccountList = useAjax((params) => getAdAccountListApi(params), { formatResult: true })
     const allOfMember = useAjax(() => getAdAccountAllOfMember(), { formatResult: true })
     const erpUserALL = useAjax(() => getErpUserAll(), { formatResult: true })
+    const api_getServiceProviderAll = useAjax(() => getServiceProviderAll(), { formatResult: true })
+    const api_putConfigServiceProvider = useAjax((params) => putConfigServiceProvider(params), { formatResult: true })
     /*************************/
 
     useEffect(() => {
         groupListInit()
         !erpUserALL.data && erpUserALL.run()
+        !api_getServiceProviderAll.data && api_getServiceProviderAll.run()
     }, [])
 
     useEffect(() => {
@@ -123,7 +127,20 @@ const AdAuthorize: React.FC = () => {
         setPuData(data)
         setPuShow(true)
     }
-
+    // 批量配置服务商
+    const setServiceProviderName = (accountIds: any) => {
+        api_putConfigServiceProvider.run({ accountIds, serviceProviderName: serverName.label }).then(res => {
+            if (res.data) {
+                message.success("配置成功!")
+                setOpenServer([]);
+                setServerName(null)
+                getAdAccountList.refresh()
+            } else {
+                message.error("配置失败!")
+            }
+        })
+    }
+    // 
     return <div style={{ height: '100%' }}>
         <Tabs
             tabBarStyle={{ marginBottom: 1 }}
@@ -156,7 +173,7 @@ const AdAuthorize: React.FC = () => {
                     ajax={getAdAccountList}
                     dataSource={getAdAccountList?.data?.data?.records}
                     loading={getAdAccountList?.loading}
-                    columns={() => columnsMp(edit, del, checkAccount, changeRecord, putUserHandle, activeKey, userInfo?.userId?.toString(), queryForm?.groupId, getAdAccountList)}
+                    columns={() => columnsMp(edit, setOpenServer, del, checkAccount, changeRecord, putUserHandle, activeKey, userInfo?.userId?.toString(), queryForm?.groupId, getAdAccountList)}
                     total={getAdAccountList?.data?.data?.total}
                     page={getAdAccountList?.data?.data?.current}
                     pageSize={getAdAccountList?.data?.data?.size}
@@ -166,6 +183,7 @@ const AdAuthorize: React.FC = () => {
                         <Radio.Group value={switchType} onChange={(e) => { setSwitchType(e.target.value); setSelectAccData([]) }}>
                             <Radio.Button value="account">批量切号</Radio.Button>
                             <Radio.Button value="putUser">批量指派投放助理</Radio.Button>
+                            <Radio.Button value="setServer">批量配置服务商</Radio.Button>
                         </Radio.Group>
                         <Input.TextArea
                             placeholder="多个广告账号以,隔开(id1,id2)"
@@ -182,7 +200,9 @@ const AdAuthorize: React.FC = () => {
                         <Button type='primary' onClick={() => setVisible(true)}><PlusOutlined />广告账号授权</Button>
                         {switchType === 'account' ?
                             (selectAccData?.length > 0 && <Button type="primary" ghost icon={<SwapOutlined />} onClick={() => { checkAccount(selectAccData) }}>批量切号</Button>) :
-                            (selectAccData?.length > 0 && <Button type="primary" ghost icon={<SwapOutlined />} onClick={() => { putUserHandle(selectAccData) }}>批量指派投放助理</Button>)}
+                            switchType === 'putUser' ? (selectAccData?.length > 0 && <Button type="primary" ghost icon={<SwapOutlined />} onClick={() => { putUserHandle(selectAccData) }}>批量指派投放助理</Button>) :
+                                selectAccData?.length > 0 && <Button type="primary" ghost icon={<SwapOutlined />} onClick={() => { setOpenServer(selectAccData) }}>批量配置服务商</Button>
+                        }
                     </Space>}
                     rowSelection={{
                         selectedRowKeys: selectAccData?.map((item: any) => item.id?.toString()),
@@ -229,6 +249,52 @@ const AdAuthorize: React.FC = () => {
                 />
             </div>
         </div>
+        {/* 批量设置服务商 */}
+        {openServer.length > 0 && <Modal
+            title="配置服务商"
+            onOk={() => setServiceProviderName(openServer?.map(item => item.accountId))}
+            onCancel={() => { setOpenServer([]); setServerName(null) }}
+            visible={openServer.length > 0}
+            confirmLoading={api_putConfigServiceProvider.loading}
+        >
+            <Row gutter={[20, 20]}>
+                <Col span={24}>
+                    <Row>
+                        <Col span={3}><b>广告主:</b></Col>
+                        <Col span={21}>
+                            {openServer.map((item, index) => {
+                                return index === openServer.length - 1 ? item.accountId : item.accountId + ','
+                            })}
+                        </Col>
+                    </Row>
+                </Col>
+                <Col span={24}>
+                    <Row>
+                        <Col span={3}><b>服务商:</b></Col>
+                        <Col span={21}>
+                            <Select
+                                style={{ minWidth: 200 }}
+                                showSearch
+                                allowClear
+                                placeholder="请选择服务商"
+                                optionFilterProp="children"
+                                onChange={(value: any, option: any) => {
+                                    setServerName(option)
+                                }}
+                                filterOption={(input, option: any) =>
+                                    (option?.label ?? '').toLowerCase().includes(input.toLowerCase())
+                                }
+                                value={serverName}
+                                options={api_getServiceProviderAll?.data?.data?.map((item: { id: any, serviceProviderName: any }) => {
+                                    return { value: item.id, label: item.serviceProviderName }
+                                })}
+                            />
+                        </Col>
+                    </Row>
+                </Col>
+            </Row>
+
+        </Modal>}
         {/* 广告授权 */}
         {visible && <QQAuth qqVisible={visible} callBack={() => setVisible(false)} />}
         {/* 变更记录 */}

+ 15 - 4
src/pages/launchSystemNew/account/tableConfig.tsx

@@ -1,10 +1,10 @@
 import { FundStatusEnum } from "@/services/launchAdq/enum"
-import { EditOutlined, FileSearchOutlined, SwapOutlined, UploadOutlined, UserSwitchOutlined } from "@ant-design/icons"
+import { EditOutlined, FileSearchOutlined, SettingOutlined, SwapOutlined, UploadOutlined, UserSwitchOutlined } from "@ant-design/icons"
 import { Badge, Button, Popconfirm, Space, Tooltip } from "antd"
 import React from "react"
 import DivideIntoGroups from "./divideIntoGroups"
 import './index.less'
-export function columnsMp(edit: (params: any) => void, del: (groupId: number, accountId: number) => void, checkAccount: (value: any[]) => void, changeRecord: (accountId: number, id: number) => void, putUserHandle: (data: any) => void, activeKey: string, userId: string | undefined, groupId?: number, getAdAccountList?: any): any {
+export function columnsMp(edit: (params: any) => void, setOpenServer: (data: any) => void, del: (groupId: number, accountId: number) => void, checkAccount: (value: any[]) => void, changeRecord: (accountId: number, id: number) => void, putUserHandle: (data: any) => void, activeKey: string, userId: string | undefined, groupId?: number, getAdAccountList?: any): any {
     return [
         {
             title: 'ID',
@@ -99,6 +99,14 @@ export function columnsMp(edit: (params: any) => void, del: (groupId: number, ac
             align: 'center',
             ellipsis: true
         },
+        {
+            title: '服务商',
+            dataIndex: 'serviceProviderName',
+            key: 'serviceProviderName',
+            width: 150,
+            align: 'center',
+            ellipsis: true
+        },
         // {
         //     title: '服务商ID列表',
         //     dataIndex: 'agencyIdList',
@@ -164,10 +172,13 @@ export function columnsMp(edit: (params: any) => void, del: (groupId: number, ac
             dataIndex: 'cz',
             key: 'cz',
             align: 'center',
-            width: 180,
+            width: 200,
             fixed: 'right',
             render: (a: any, b: any) => {
                 return <Space>
+                    <Tooltip title="配置服务商">
+                        <Button size="small" style={{ color: "#00bcd4" }} onClick={() => setOpenServer([b])} icon={<SettingOutlined />}></Button>
+                    </Tooltip>
                     <Tooltip title="备注">
                         <Button size="small" style={{ color: '#52c41a' }} onClick={() => edit(b)} icon={<EditOutlined />}></Button>
                     </Tooltip>
@@ -178,7 +189,7 @@ export function columnsMp(edit: (params: any) => void, del: (groupId: number, ac
                         <Button size="small" style={{ color: '#4d5aaf' }} onClick={() => changeRecord(b?.accountId, b?.id)} icon={<FileSearchOutlined />}></Button>
                     </Tooltip>
                     {activeKey === '1' && <>
-                        {userId === b?.putUserInfo?.userId?.toString() && <Tooltip title="指派投放助理">
+                        {userId == b?.putUserInfo?.userId?.toString() && <Tooltip title="指派投放助理">
                             <Button size="small" style={{ color: '#0eb83a' }} onClick={() => putUserHandle([b])} icon={<UserSwitchOutlined />}></Button>
                         </Tooltip>}
                         {!groupId && <DivideIntoGroups groupIds={b?.groupIds} getAdAccountList={getAdAccountList} accountId={b?.accountId} />}

+ 39 - 24
src/pages/launchSystemNew/launchManage/createAd/index.tsx

@@ -56,7 +56,7 @@ const CreateAd: React.FC = () => {
         expandTargeting: [],
         model: 'cross'
     })
-    const [launchMode, setLaunchMode] = useState<number>(Number(localStorage.getItem('LAUNCHMODE')) || 1) // 投放模式 1 现在投放模式  2 创量模式
+    const [launchMode, setLaunchMode] = useState<number>(Number(localStorage.getItem('LAUNCHMODE')) || 0) // 0普通模式 1叉乘 2顺序
     const [accountCreateLogs, setAccountCreateLogs] = useState<{ adAccountId: number, id: number, userActionSetsList?: any[], productList?: any, conversionList?: any, customAudienceList?: any, excludedCustomAudienceList?: any, pageList?: any, coldStartAudienceList?: any[] }[]>([])  // 账户
     const [goodsVisible, setGoodsVisible] = useState<boolean>(false) // 选择商品弹窗控制
     const [sourceVisible, setSourceVisible] = useState<boolean>(false) // 选择数据源弹窗控制
@@ -107,7 +107,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 } = 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,6 +131,7 @@ const CreateAd: React.FC = () => {
                 }).filter((item: any, index: number, self: any) => self.findIndex((i: any) => i.id == item.id) === index)
                 setAccountCreateLogs(adCreateLogsData)
 
+<<<<<<< HEAD
                 let type: 1 | 2 | 3 = 1
                 if (sysPageId && pageId) {
                     type = 1
@@ -147,6 +148,24 @@ const CreateAd: React.FC = () => {
                         type = 1
                     }
                 }
+=======
+                let type:0| 1 | 2 = putModel
+                // if (sysPageId && pageId) {
+                //     type = 0
+                // } else if (sysPageId) {
+                //     if (adCreateLogs?.every((item: { sysAdcreative: { adcreativeTemplateId: number }, sysPageId: number }) => item.sysAdcreative.adcreativeTemplateId === adcreativeTemplateId && (item.sysPageId === sysPageId))) {
+                //         type = 1
+                //     } else {
+                //         type = 0
+                //     }
+                // } else {
+                //     if (adCreateLogs?.every((item: { sysAdcreative: { adcreativeTemplateId: number }, pageId: number }) => item.sysAdcreative.adcreativeTemplateId === adcreativeTemplateId)) {
+                //         type = 1
+                //     } else {
+                //         type = 0
+                //     }
+                // }
+>>>>>>> d6702315621bb99938dd4c7b8c716a7be5d5d627
                 setLaunchMode(type)
 
                 /** 本地落地页处理 */
@@ -155,7 +174,7 @@ const CreateAd: React.FC = () => {
                 let adqPageList: any[] = []
                 let taskMediaMaps: any[] = []
                 let type2Data = {}
-                if (type === 1) {
+                if (type === 0) {
                     const sorted = groupBy(adCreateLogs, (item) => [item.sysAdcreativeId])
                     pageList = sorted?.map((item: any[]) => {
                         if (item.some((item1: { sysPageId: number }) => item1.sysPageId)) {
@@ -535,7 +554,7 @@ const CreateAd: React.FC = () => {
             message.error('请选择落地页')
             return
         }
-        if (launchMode !== 1) {
+        if (launchMode !== 0) {
             if ((queryForm?.materialData && queryForm?.materialData?.length > 0) && !(newQueryForm?.materials && newQueryForm?.materials?.length > 0)) {
                 message.error('请选择创意素材')
                 return
@@ -561,7 +580,7 @@ const CreateAd: React.FC = () => {
         //最终数据
         let data: any[] = []
         // 素材叉乘处理
-        if (launchMode !== 1) {
+        if (launchMode !== 0) {
             if (Array.isArray(newQueryForm.materials) && Array.isArray(newQueryForm?.texts)) {
                 let taskMediaMap = JSON.parse(JSON.stringify(newQueryForm.taskMediaMaps[0]))
                 let adcreativeElements = taskMediaMap.sysAdcreative?.adcreativeElements || {}
@@ -573,7 +592,7 @@ const CreateAd: React.FC = () => {
             }
         }
         console.log(newQueryForm.taskMediaMaps)
-        if (launchMode !== 3) {//叉乘和普通模式
+        if (launchMode !== 2) {//叉乘和普通模式
             accountCreateLogs.forEach((item: any) => {
                 newQueryForm.taskMediaMaps?.forEach((task, index) => {
                     let obj = {
@@ -582,7 +601,7 @@ const CreateAd: React.FC = () => {
                         sysAdGroupData: newQueryForm.sysAdgroup,
                         targetingData: newQueryForm.sysTargeting,
                         sysAdcreativeData: task.sysAdcreative,
-                        pageData: launchMode === 2 ? (newQueryForm.pageList as any)[0] || (newQueryForm.adqPageList as any)[0]?.find((adq: { adAccountId: any }) => adq.adAccountId === item.adAccountId)?.pageList[0] : (newQueryForm.pageList as any)[index] || (newQueryForm.adqPageList as any)[index]?.find((adq: { adAccountId: any }) => adq.adAccountId === item.adAccountId)?.pageList[0],
+                        pageData: launchMode === 1 ? (newQueryForm.pageList as any)[0] || (newQueryForm.adqPageList as any)[0]?.find((adq: { adAccountId: any }) => adq.adAccountId === item.adAccountId)?.pageList[0] : (newQueryForm.pageList as any)[index] || (newQueryForm.adqPageList as any)[index]?.find((adq: { adAccountId: any }) => adq.adAccountId === item.adAccountId)?.pageList[0],
                         myId: Number(item.id + '' + index)
                     }
                     data.push(obj)
@@ -643,7 +662,7 @@ const CreateAd: React.FC = () => {
     // 提交
     const submit = (props: { campaignName: string, count?: number }) => {
         let newQueryForm = JSON.parse(JSON.stringify(queryForm))
-        if (launchMode !== 1) {
+        if (launchMode !== 0) {
             if (Array.isArray(newQueryForm.materials) && Array.isArray(newQueryForm?.texts)) {
                 let taskMediaMap = JSON.parse(JSON.stringify(newQueryForm.taskMediaMaps[0]))
                 let adcreativeElements = taskMediaMap.sysAdcreative?.adcreativeElements || {}
@@ -719,6 +738,7 @@ const CreateAd: React.FC = () => {
             params.sysAdgroup.expandTargeting = params?.expandTargeting
         }
         params.accountCreateLogs = accountLogs
+        params.putModel = launchMode
         delete params.sysAdgroupId
         delete params.sysAdcreativeId
         delete params.sysTargetingId
@@ -902,14 +922,9 @@ const CreateAd: React.FC = () => {
     const switchLaunchMode = (mode: number) => {
         setLaunchMode(mode)
         localStorage.setItem('LAUNCHMODE', mode.toString())
-        // if (launchMode === 1) {
-        //     setLaunchMode(2)
-        //     localStorage.setItem('LAUNCHMODE', '2')
-        // } else {
-        //     setLaunchMode(1)
-        //     localStorage.setItem('LAUNCHMODE', '1')
-        // }
-        delBdPlan()
+        if(launchMode === 0 || mode === 0){
+            delBdPlan()
+        }
         set_targetKey('0')
     }
 
@@ -947,21 +962,21 @@ const CreateAd: React.FC = () => {
                     <div className={style.cardTitle}>配置区</div>
                     <Select
                         style={{ width: 100 }} size="small"
-                        value={launchMode}
+                        value={Number(launchMode)}
                         onChange={(value) => {
                             switchLaunchMode(value)
                         }}
                         options={[
                             {
-                                value: 1,
+                                value: 0,
                                 label: "普通模式",
                             },
                             {
-                                value: 2,
+                                value: 1,
                                 label: "叉乘模式",
                             },
                             {
-                                value: 3,
+                                value: 2,
                                 label: "顺序模式",
                             }
                         ]}>
@@ -1074,7 +1089,7 @@ const CreateAd: React.FC = () => {
                         })}
                     </Select>
                 </Selector>
-                {launchMode !== 1 && accountCreateLogs?.length > 0 && <>
+                {launchMode !== 0 && accountCreateLogs?.length > 0 && <>
                     <Button onClick={() => { setGoodsVisible(true) }}>商品广告(选填){accountCreateLogs?.some(item => item?.productList?.length) && <CheckOutlined style={{ color: '#1890ff' }} />}</Button>
                     <Button onClick={() => { setSourceVisible(true) }}>精准匹配归因(选填){accountCreateLogs?.some(item => item?.userActionSetsList?.length) && <CheckOutlined style={{ color: '#1890ff' }} />}</Button>
                 </>}
@@ -1082,7 +1097,7 @@ const CreateAd: React.FC = () => {
 
             <div className={style.cardBody}>
                 <Row className={style.content}>
-                    <Col span={launchMode === 1 ? 12 : 8} xl={launchMode === 1 ? 12 : 8} lg={24} md={24} sm={24} xs={24} className={style.conLeft}>
+                    <Col span={launchMode === 0 ? 12 : 8} xl={launchMode === 0 ? 12 : 8} lg={24} md={24} sm={24} xs={24} className={style.conLeft}>
                         <Row className={`${style.conTitle} ${style.conRightBorder}`}><Col span={24}>广告</Col></Row>
                         <Row className={style.items}>
                             {/* =============广告基本信息=========== */}
@@ -1101,7 +1116,7 @@ const CreateAd: React.FC = () => {
                                 accountCreateLogs={accountCreateLogs}
                             />
 
-                            {launchMode === 1 && <>
+                            {launchMode === 0 && <>
                                 {/* =============商品=========== */}
                                 <Col className={style.conRightBorder} span={5}>
                                     <div className={style.top}>
@@ -1169,7 +1184,7 @@ const CreateAd: React.FC = () => {
                         </Row>
                     </Col>
                     {/* =============广告创意=========== */}
-                    {launchMode === 1 ? <Col span={12} xl={12} lg={24} md={24} sm={24} xs={24} className={style.conRight}>
+                    {launchMode === 0 ? <Col span={12} xl={12} lg={24} md={24} sm={24} xs={24} className={style.conRight}>
                         <Row className={style.conTitle}><Col span={24}>广告创意</Col></Row>
                         <Row className={style.items}>
                             {/* 创意 */}

+ 1 - 0
src/pages/launchSystemNew/launchManage/taskList/index.tsx

@@ -44,6 +44,7 @@ const TaskList: React.FC = () => {
             case 'copy':
                 console.log('111111111111--->', data);
                 sessionStorage.setItem('TASKID', data.taskId)
+                sessionStorage.setItem('LAUNCHMODE', data.putModel)
                 window.location.href = '/#/launchSystemNew/launchManage/createAd'
                 break
         }

+ 1 - 1
src/pages/launchSystemNew/launchManage/taskList/tableConfig.tsx

@@ -14,7 +14,7 @@ function tableConfig(callback: (data: any, type: 'log' | 'page' | 'copy', allDat
             render: (a: any, b: any) => {
                 return <Space>
                     <a style={{ color: '#1890ff', fontSize: 12 }} onClick={() => { callback({ taskId: b.id, campaignName: b.campaignName }, 'log', b) }}>日志</a>
-                    <a style={{ color: '#1890ff', fontSize: 12 }} onClick={() => { callback({ taskId: b.id, campaignName: b.campaignName }, 'copy') }}>复制</a>
+                    <a style={{ color: '#1890ff', fontSize: 12 }} onClick={() => { callback({ taskId: b.id, campaignName: b.campaignName,putModel:b.putModel }, 'copy') }}>复制</a>
                 </Space>
             }
         },

+ 18 - 5
src/services/launchAdq/adq.ts

@@ -10,9 +10,9 @@ export async function getAdAccountAllOfMember() {
 /***
  * 无权限限制获取全部用户列表
  * 
- */ 
-export async function getErpUserAll(){
-  return request(api+`/erp/user/all`)
+ */
+export async function getErpUserAll() {
+  return request(api + `/erp/user/all`)
 }
 
 
@@ -340,7 +340,7 @@ export async function getLogListApi(data: { accountId?: number, adgroupId?: numb
 
 /**
  * 获取推广目标列表
- * */ 
+ * */
 export async function getPromotedObjectList(data: { accountId?: number, promotedObjectType?: string, promotedObjectName?: string, pageNum: number, pageSize: number }) {
   return request(api + `/adq/promotedObject/list`, {
     method: 'POST',
@@ -350,7 +350,7 @@ export async function getPromotedObjectList(data: { accountId?: number, promoted
 
 /**
  * 同步推广目标列表
- * */ 
+ * */
 
 export async function putPromotedObjectSync(data: any) {
   return request(api + `/adq/promotedObject/sync/all`, {
@@ -381,4 +381,17 @@ export async function putModifyCustomAudienceApi(data: { adAccountId: number, ad
     method: 'PUT',
     data
   });
+}
+/**获取服务商列表*/
+export async function getServiceProviderAll() {
+  return request(api + `/adq/serviceProvider/all`, {
+    method: 'GET',
+  });
+}
+/*配置服务商*/
+export async function putConfigServiceProvider(data: { accountIds: any[], serviceProviderName: string }) {
+  return request(api + `/adq/adAccount/configServiceProvider`, {
+    method: 'PUT',
+    data
+  });
 }