import { request } from 'umi';

/** 获取商品属性列表  sdsa GET /kitchen/api/rule */
export async function getgoodsattributepage(data) {
  return request(`/saasbase/api/goodsattribute/getgoodsattributepage`, {
    method: 'POST',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}
export async function addgoodsattribute(data) {
    return request(`/saasbase/api/goodsattribute/addgoodsattribute`, {
      method: 'POST',
      data: data,
      // params: { ...params },
      // ...(options || {}),
    });
  }
  export async function deletegoodsattribute(data) {
    return request(`/saasbase/api/goodsattribute/deletegoodsattribute`, {
      method: 'POST',
      data: data,
      // params: { ...params },
      // ...(options || {}),
    });
  }
  export async function getgoodsattributevalue(data) {
    return request(`/saasbase/api/goodsattribute/getgoodsattributevalue?goodsAttributeId=`+data, {
      method: 'GET',
      // params: { ...params },
      // ...(options || {}),
    });
  }
  export async function addgoodsattributevalue(data) {
    return request(`/saasbase/api/goodsattribute/addgoodsattributevalue`, {
      method: 'POST',
      data: data,
      // params: { ...params },
      // ...(options || {}),
    });
  }
  export async function deletegoodsattributevalue(data) {
    return request(`/saasbase/api/goodsattribute/deletegoodsattributevalue?id=`+data, {
      method: 'GET',
      // params: { ...params },
      // ...(options || {}),
    });
  }

  export async function gettree(params) {
    return request('​/saasbase/api​/goodstype/tree', {
      method: 'GET',
      data: {
        ...params,
      },
    });
  }
