import request from '@/utils/request'

// 分页查询代理产品推荐列表
export function pageListRecommend(query) {
  return request({
    url: '/product/recommend/pageList',
    method: 'get',
    params: query
  })
}

// 查询代理产品推荐列表
export function listRecommend(query) {
  return request({
    url: '/product/recommend/list',
    method: 'get',
    params: query
  })
}

// 查询代理产品推荐详细
export function getRecommend(id) {
  return request({
    url: '/product/recommend/' + id,
    method: 'get'
  })
}

// 新增代理产品推荐
export function addRecommend(data) {
  return request({
    url: '/product/recommend',
    method: 'post',
    data: data
  })
}

// 修改代理产品推荐
export function updateRecommend(data) {
  return request({
    url: '/product/recommend',
    method: 'put',
    data: data
  })
}

// 修改代理产品推荐
export function editByProducts(data) {
  return request({
    url: '/product/recommend/editByProducts',
    method: 'put',
    data: data
  })
}

// 移除代理产品推荐
export function delInfoByRecommend(data) {
  return request({
    url: '/product/recommend/delInfoByRecommend',
    method: 'post',
    data: data
  })
}
// delInfoByRecommend

// 删除代理产品推荐
export function delRecommend(id) {
  return request({
    url: '/product/recommend/' + id,
    method: 'delete'
  })
}

// 导出代理产品推荐
export function exportRecommend(query) {
  return request({
    url: '/product/recommend/' + 'export',
    method: 'post',
    params: query
  })
}
