import request from '@/router/axios'

export function getClassifyDropDown() {
  return request({
    url: '/admin/mallGoodsSpec/dropDownBox',
    method: 'get'
  })
}

export function searchSpecByName(query) {
  return request({
    url: '/general/mallGoodsSpec/getSpecByName',
    method: 'get',
    params: query
  })
}

export function getSpecValue(query) {
  return request({
    url: '/admin/mallGoodsSpec/getSpecValueById',
    method: 'get',
    params: query
  })
}

export function getGoodsDetails(query) {
  return request({
    url: '/admin/mallGoodsSpec/getDetails',
    method: 'get',
    params: query
  })
}

export function addOrEditGoods(data) {
  return request({
    url: '/admin/merchantMallGoods/addOrEditGoods',
    method: 'post',
    data
  })
}
