import request from '@/utils/request'
//获取分类
export function getList(data) {
    return request({
      url: '/category/getList',
      method: 'get',
      params:data
    })
  }

  //全部分类
  export function getAllCategory(data) {
    return request({
      url: '/category/getAll',
      method: 'get',
      params:data
    })
  }

  //添加分类
  export function addCategory(data) {
    return request({
      url: '/category/addCategory',
      method: 'post',
     data: data
    })
  }

  //修改分类
  export function updateCategory(data) {
    return request({
      url: '/category/updateCategory',
      method: 'post',
     data: data
    })
  }

  //移动顺序
  export function updateSort(data) {
    return request({
      url: '/category/updateSort',
      method: 'get',
      params:data
    })
  }

  //删除分类
  export function deleteCategory(data) {
    return request({
      url: '/category/deleteCategory',
      method: 'get',
      params:data
    })
  }
