import request from '@/utils/request'

// 获取营销管理列表数据
export function getOrderLists(params) {
  return request({
    url: 'api/Marketing/getlist',
    method: 'get',
    params
  })
}

// 获取工单数据
export function getOrder(ordercode) {
  return request({
    url: 'callcenterapi/api/BusOrder/getsingle',
    method: 'get',
    params: {
      ordercode
    }
  })
}

// 添加满赠营销数据
export function addFullMarketing(data) {
  return request({
    url: 'api/Marketing/add',
    method: 'post',
    data
  })
}

// 编辑工单数据
export function editFullMarketing(data) {
  return request({
    url: 'api/Marketing/update',
    method: 'post',
    data
  })
}

// 删除工单数据
export function deleteFullMarketing(ids) {
  return request({
    url: 'api/Marketing/delete',
    method: 'post',
    data: {
      ids
    }
  })
}
// 获取详情数据
export function getFullMarketingDetail(id) {
  return request({
    url: 'api/Marketing/getdetails',
    method: 'get',
    params: {
      id
    }
  })
}
// 获取绑定赠品数据
export function getGifts(data) {
  return request({
    headers: {
      'Content-Type': 'application/json'
    },
    transformRequest: [function(data) {
      data = JSON.stringify(data)
      return data
    }],
    url: 'api/product/getproduct',
    method: 'post',
    data
  })
}
// 获取商品标签
export function getshopping(data) {
  return request({
    url: 'api/tag/getacttag',
    method: 'post',
    data
  })
}
