import { request } from '/@/utils/service';


const apiPrefix = '/api/cms/sku_attr/';

export function getTableData(query: any) {
  return request({
    url: apiPrefix,
    method: 'GET',
    params: query
  });
}

export function deleteRow(query: any) {
  return request({
    url: apiPrefix + query.id + '/',
    method: 'DELETE',
    params: query
  });
}

export function updateRow(query: any) {
  return request({
    url: apiPrefix + query.id + '/',
    method: 'PUT',
    data: query
  });
}

export function createAttr(data:any) {
  return request({
    url: apiPrefix,
    method: 'post',
    data: data
  })
}

export function getAllDept(query: any) {
  return request({
    url: '/api/system/dept/all_dept/',
    method: 'GET',
    params: query
  });
}

