// 广告
import request from '@/utils/request'

//获取状态
export const getStatus = () => {
  return request({
    url: '/order/getStauts',
    method: 'get',
  })
}
// 获取订单列表
export const getOrderListAdmin = (data) => {
  return request({
    url: '/order/getOrderListAdmin',
    method: 'post',
    data
  })
}
// 获取订单详情
export const getOrderDetailAdmin = (data) => {
  return request({
    url: '/order/getOrderDetailAdmin',
    method: 'post',
    data
  })
}
//获取订单详情 
export const getOrderDetail = (params) => {
  return request({
    url: '/order/getOrderDetail',
    method: 'get',
    params
  })
}
// 获取订单列表
export const getOrderList = (params) => {
  return request({
    url: '/order/getOrderList',
    method: 'get',
    params
  })
}
// 审核订单状态
export const applyOrderStatusAdmin = (data) => {
  return request({
    url: '/order/applyOrderStatusAdmin',
    method: 'post',
    data
  })
}
// 修改订单价格
export const editOrderAdmin = (data) => {
  return request({
    url: '/order/editPriceOrderAdmin',
    method: 'post',
    data
  })
}
// 驳回订单
export const rejectOrderAdmin = (data) => {
  return request({
    url: '/order/rejectOrderAdmin',
    method: 'post',
    data
  })
}
// 结束订单
export const endOrderAdmin = (data) => {
  return request({
    url: '/order/endOrderAdmin',
    method: 'post',
    data
  })
}
// 删除订单
export const delOrderAdmin = (data) => {
  return request({
    url: '/order/delOrderAdmin',
    method: 'post',
    data
  })
}


//广告位 ----------------------------------------------->
// 创建广告位
export const createAdPlace = (data) => {
  return request({
    url: '/ad/createAdPlace',
    method: 'post',
    data
  })
}

// 广告位列表
export const getAdPlaceList = (params) => {
  return request({
    url: '/ad/getAdPlaceList',
    method: 'get',
    params
  })
}

// 删除广告位
export const delAdPlace = (data) => {
  return request({
    url: '/ad/delAdPlace',
    method: 'post',
    data
  })
}

// 修改广告位
export const updateAdPlace = (data) => {
  return request({
    url: '/ad/updateAdPlace',
    method: 'post',
    data
  })
}

// 获取广告位下面的广告
export const getAdList = (params) => {
  return request({
    url: '/ad/getAdList',
    method: 'get',
    params
  })
}

// 获取广告位详情
export const getAdPlaceInfo = (params) => {
  return request({
    url: '/ad/getAdPlaceInfo',
    method: 'get',
    params
  })
}

// 获取广告位尺寸
export const getSize = (data) => {
  return request({
    url: '/order/getAD',
    method: 'post',
    data
  })
}