import request from '@/router/axios';

export const getCategoryList = (current=1, size=50, params={}) => {
  return request({
    url: '/api/bigdata/visualcategory/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/api/bigdata/visualcategory/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const categoryDel = (ids) => {
  return request({
    url: '/api/bigdata/visualcategory/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const categoryadd = (row) => {
  return request({
    url: '/api/bigdata/visualcategory/submit',
    method: 'post',
    data: row
  })
}

export const categoryupdate = (row) => {
  return request({
    url: '/api/bigdata/visualcategory/submit',
    method: 'post',
    data: row
  })
}

