import request from '@/utils/system/request'

// 查询应用列表
export function appList(data) {
    return request({
        url: '/agent-service/app/searchApps',
        method: 'post',
        data
    })
}
// 查询加盟商应用列表
export function issuedApps(params) {
    return request({
        url: '/agent-service/app/getIssuedAppList',
        method: 'get',
        params
    })
}
//应用新增或修改
export function saveOrUpdate(data) {
    return request({
        url: '/agent-service/app/saveApp',
        method: 'post',
        data
    })
}

//应用删除
export function delApp(data) {
    return request({
        url: '/agent-service/app/delApp?appId='+data.appId,
        method: 'get'
    })
}
//应用关联广告平台 & 广告平台应用
export function relativeChannel(data) {
    return request({
        url: '/agent-service/app/relativeChannel',
        method: 'post',
        data
    })
}
//获取指定平台下的一级分类
export function getPrimaryCategories(data) {
    return request({
        url: '/agent-service/app/getPrimaryCategories',
        method: 'post',
        data
    })
}
//获取指定平台下的一级分类下的二级分类
export function getSecondaryCategories(data) {
    return request({
        url: '/agent-service/app/getSecondaryCategories',
        method: 'post',
        data
    })
}
// 获取广告渠道列表
export function channelList(data) {
    return request({
        url: '/agent-service/channel/list',
        method: 'post',
        data
    })
}
// 过滤指定app已经关联过的渠道
export function relativeChannelList(data) {
    return request({
        url: '/agent-service/channel/relativeChannel',
        method: 'post',
        data
    })
}
// 获取广告位列表
export function placementList(data) {
    return request({
        url: '/agent-service/placement/list',
        method: 'post',
        data
    })
}
// 删除广告位
export function placementDel(params) {
    return request({
        url: '/agent-service/placement/del',
        method: 'get',
        params
    })
}
// 保存广告位
export function placementSave(data) {
    return request({
        url: '/agent-service/placement/save',
        method: 'post',
        data
    })
}
// 新增广告渠道
export function channelAddOne(data) {
    return request({
        url: '/agent-service/channel/addOne',
        method: 'post',
        data
    })
}

// 修改广告渠道
export function channelUpdateOne(data) {
    return request({
        url: '/agent-service/channel/updateOne',
        method: 'post',
        data
    })
}

// 删除广告渠道
export function channelDeleteOne(params) {
    return request({
        url: '/agent-service/channel/deleteOne',
        method: 'get',
        params
    })
}

// 获取广告源列表
export function adSourceList(data) {
    return request({
        url: '/agent-service/adSource/list',
        method: 'post',
        data
    })
}

// 新增广告源
export function adSourceAddOne(data) {
    return request({
        url: '/agent-service/adSource/addOne',
        method: 'post',
        data
    })
}

// 修改广告源
export function adSourceUpdateOne(data) {
    return request({
        url: '/agent-service/adSource/updateOne',
        method: 'post',
        data
    })
}

// 删除广告源
export function adSourceDeleteOne(params) {
    return request({
        url: '/agent-service/adSource/deleteOne',
        method: 'get',
        params
    })
}





