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

export function appList(data) {
    return request({
        url: '/agent-service/app/searchApps',
        method: 'post',
        data
    })
}
//应用新增或修改
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 channelList(data) {
    return request({
        url: '/agent-service/channel/list',
        method: 'post',
        data
    })
}
// 获取广告位列表
export function placementList(data) {
    return request({
        url: '/agent-service/placement/list',
        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
    })
}



