import request from '@/utils/request' /** * 人群客户管理-用户列表 */ export function getPackList(data) { return request({ url: '/tools/ads_dmp/customer/search', method: 'POST', data }) } /** * 人群客户管理-获取客户下拉列表 */ export function getPackOption({ ...data }) { return request({ url: '/tools/ads_dmp/customer/add/select', method: 'POST', data }) } /** * 人群客户管理-确认添加 */ export function addCustomer(data) { return request({ url: '/tools/ads_dmp/customer/add', method: 'POST', data }) } /** * 人群客户管理-配置 */ export function updateCustomer(data) { return request({ url: '/tools/ads_dmp/customer/config', method: 'POST', data }) } /** * 人群客户管理-配置-详情 */ export function getCustomerInfo({ ...data }) { return request({ url: '/tools/ads_dmp/customer/config/get', method: 'POST', data }) } /** * 人群客户管理-充值 */ export function rechargeCustomer(data) { return request({ url: '/tools/ads_dmp/customer/recharge', method: 'POST', data }) } /** * 人群客户管理-充值-明细 */ export function getRechargeDetail({ ...data }) { return request({ url: '/tools/ads_dmp/customer/amount_journal/search', method: 'POST', data }) } /** * 人群客户管理-人群客户投放账号添加接口 */ export const addMedia = ({ ...data }) => { return request({ url: '/user/dmp/media_account/add', method: 'POST', data }) } /** * 人群客户管理-模板下载 */ export const Downloads = () => { return request({ method: 'POST', url: '/user/dmp/media_account/template/download', responseType: 'arraybuffer', data: {} }) } /** * 人群客户管理-列表 */ export const getLists = (data) => { return request({ method: 'POST', url: '/user/dmp/media_account/search', data }) } /** * 人群客户管理-修改 */ export const updateMedia = (data) => { return request({ method: 'POST', url: '/user/dmp/media_account/edit', data }) } /** * 人群客户管理-删除 */ export const deleteMedia = (data) => { return request({ method: 'POST', url: '/user/dmp/media_account/delete', data }) } /** * 人群客户管理-上传 */ export const trackUpload = (formData) => { return request({ method: 'POST', url: '/user/dmp/media_account/template/upload', headers: { 'Content-Type': 'multipart/form-data' }, data: formData }) } // 二进制流下载 export const hackDownloadFile = (data, filename) => { if (!data) { return } let url = window.URL.createObjectURL(new Blob([data])) let link = document.createElement('a') link.style.display = 'none' link.href = url link.setAttribute('download', filename || `模板.xls`) document.body.appendChild(link) link.click() }