import request from '@/utils/request'
import { URL } from '@/config'

export function getList(params) {
  return request({
    url: URL.shop.chain.category.getList,
    method: 'get',
    params,
  })
}

export function getCategoryTree(params) {
  return request({
    url: URL.shop.chain.category.getChooseTree,
    method: 'get',
    params,
  })
}

export function doEdit(data) {
  return request({
    url: URL.shop.chain.category.doEdit,
    method: 'post',
    data,
  })
}

export function doDelete(data) {
  return request({
    url: URL.shop.chain.category.doDelete,
    method: 'post',
    data,
  })
}

export function editState(data) {
  return request({
    url: URL.shop.chain.category.updateState,
    method: 'post',
    data,
  })
}
