import request from '@/utils/request'

// 查询选品中心的数据
export function getSelectionData(data) {
  return request({
    url: '/platformProduct/getClaasifyProducts',
    method: 'post',
    data
  })
}

// 商家添加选品库
export function shopSelectionAddShopLibrary(data) {
  return request({
    url: '/shopSelection/addShopLibrary',
    method: 'post',
    data
  })
}

// 商家选品库
export function shopSelectionGetLibrary(data) {
  return request({
    url: '/shopSelection/shopSelectionLibrary',
    method: 'post',
    data
  })
}

// 选品中心（平台选品库）
export function shopSelectionGetPlatformLibrary(data) {
  return request({
    url: '/shopSelection/platformSelectionLibrary',
    method: 'post',
    data
  })
}

// 商家选择（平台）选品商品
export function shopSelectionSelectShopLibrary(data) {
  return request({
    url: '/shopSelection/selectShopLibrary',
    method: 'post',
    data
  })
}

// 平台选择商品分组查询
export function getAdminGroupSelectProduct(data) {
  return request({
    url: '/product/getAdminGroupSelect',
    method: 'post',
    data
  })
}

// 分页查询商家分销定价方案信息表
export function priceControlGetPage(data) {
  return request({
    url: '/priceControl/page',
    method: 'post',
    data
  })
}

// 查询商家分销定价方案信息表
export function priceControlGetById(params) {
  return request({
    url: `/priceControl/${params.id}`,
    method: 'get',
    params
  })
}

// 新增商家分销定价方案信息表
export function priceControlSavePlan(data) {
  return request({
    url: '/priceControl/save',
    method: 'post',
    data
  })
}

// 修改商家分销定价方案信息表
export function priceControlUpdatePlan(data) {
  return request({
    url: '/priceControl/update',
    method: 'put',
    data
  })
}

// 删除商家分销定价方案信息表
export function priceControlDeletePlan(params) {
  return request({
    url: '/priceControl/delete',
    method: 'delete',
    params
  })
}
