import axiosApi from './AxiosApi.js'

const apiList = {
  productCategory: `/productCategory/findPageCategory`,
  addCategory: `/productCategory/addCategory`,
  uploadCategory: `/productCategory/updateCategory`,
  deletCategory: '/productCategory/delCategory',
  queryOneCategory: `/productCategory/queryOneCategory`,
  queryChildCategory: '/productCategory/queryChildCategory'
}
export default {
  deletCategory(data) {
    return axiosApi({
      method: 'POST',
      url: apiList.deletCategory,
      data
    })
  },
  queryChildCategory(data) {
    return axiosApi({
      method: 'POST',
      url: apiList.queryChildCategory,
      data
    })
  },
  queryOneCategory(data) {
    return axiosApi({
      method: 'POST',
      url: apiList.queryOneCategory,
      data
    })
  },
  getProductCategory(data) {
    return axiosApi({
      method: 'POST',
      url: apiList.productCategory,
      data
    })
  },
  addCategory(data) {
    return axiosApi({
      method: 'POST',
      url: apiList.addCategory,
      data
    })
  },
  uploadCategory(data) {
    return axiosApi({
      method: 'POST',
      url: apiList.uploadCategory,
      data
    })
  }
}
