import request from '@/utils/request'

// 查询百度账号列表
export function listBdAccount(query) {
  return request({
    url: '/bd/BdAccount/list',
    method: 'get',
    params: query
  })
}

// 查询百度账号列表
export function listAll(query) {
  return request({
    url: '/bd/BdAccount/listAll',
    method: 'get',
    params: query
  })
}
// 查询百度账号列表
export function listAllPlan(query) {
  return request({
    url: '/bd/BdAccount/listAllPlan',
    method: 'get',
    params: query
  })
}
// 查询百度账号列表
export function listAllUnit(query) {
  return request({
    url: '/bd/BdAccount/listAllUnit',
    method: 'get',
    params: query
  })
}
// 查询百度账号列表
export function listAllCreative(query) {
  return request({
    url: '/bd/BdAccount/listAllCreative',
    method: 'get',
    params: query
  })
}

// 查询百度账号详细
export function getBdAccount(id) {
  return request({
    url: '/bd/BdAccount/' + id,
    method: 'get'
  })
}

// 新增百度账号
export function addBdAccount(data) {
  return request({
    url: '/bd/BdAccount',
    method: 'post',
    data: data
  })
}

// 修改百度账号
export function updateBdAccount(data) {
  return request({
    url: '/bd/BdAccount',
    method: 'put',
    data: data
  })
}

// 删除百度账号
export function delBdAccount(id) {
  return request({
    url: '/bd/BdAccount/' + id,
    method: 'delete'
  })
}

// 导出百度账号
export function exportBdAccount(query) {
  return request({
    url: '/bd/BdAccount/export',
    method: 'get',
    params: query
  })
}
// 导出百度账号
export function authorizationUrl() {
  return request({
    url: '/bd/BdAccount/authorizationUrl',
    method: 'get',
  })
}
// 导出百度账号
export function syncAccount(id) {
  return request({
    url: '/bd/BdAccount/syncAccount',
    method: 'get',
    params:{id}
  })
}
