import request from '@/utils/request'

// 获取器免列表
export function getExemptSecondMedicalDeviceList() {
  return request({
    url: '/store/exemptSecondMedicalDevice/getList',
    method: 'get'
  })
}

//产品成分校验
export function selectForbiddenKeywords(fieldName, keywords) {
  return request({
    url: '/store/storeProduct/selectForbiddenKeywords',
    method: 'post',
    data: {
      field: fieldName,
      keywords: keywords
    }
  })
}

// 查询商品列表
export function listStoreProduct(query) {
  return request({
    url: '/store/platformProduct/list',
    method: 'get',
    params: query
  })
}

// 查询商品详细
export function getStoreProduct(productId) {
  return request({
    url: '/store/platformProduct/' + productId,
    method: 'get'
  })
}

// 删除商品
export function delStoreProduct(productId) {
  return request({
    url: '/store/platformProduct/' + productId,
    method: 'delete'
  })
}

//编辑商品
export function oneClickStorage(data) {
  return request({
    url: '/store/platformProduct/oneClickStorage',
    method: 'post',
    data: data
  })
}

//一键复制
export function copyProduct(data) {
  return request({
    url: '/store/platformProduct/copyProduct',
    method: 'post',
    data: data
  })
}

//获取规格
export function genFormatAttr(productId,json) {
  return request({
    url: '/store/storeProduct/genFormatAttr/'+productId,
    method: 'post',
    data: json
  })
}


