import http from "@/util/http.js";

export function postadd(params) {
  // 传递id
  return http({
    url: "/api/admin/auth/login",
    method: "post",
    params: params,
  });
}

// 列表
export function store_list(params) {
  return http({
    url: "/api/admin/shopGroups",
    method: "get",
    params: params,
  });
}

export function storeDetail(params) {
  return http({
    url: "/storess/show",
    method: "get",
    params: params,
  });
}

// 商品种类列表
export function goods_types(params) {
  return http({
    url: "/api/goodsTypes/tree",
    method: "get",
    params,
  });
}
export function goods_types_detail(id) {
  return http({
      url: `/api/goods_types/${id}`,
      method: "get",
  });
}
// 商品种类列表删除
export function Delgoods_types(id) {
  return http({
    url: `/api/goods_types/${id}`,
    method: "delete",
  });
}
// 新增种类
export function Addgoods_types(data) {
  return http({
    url: "/api/goods_types/",
    method: "post",
    data,
  });
}
// 编辑种类
export function editGoods_types(id, data) {
  return http({
    url: `/api/goods_types/${id}`,
    method: "patch",
    data,
  });
}
// 商品品牌列表
export function Brand_goods_types(params) {
  return http({
    url: "/api/goods_brands",
    method: "get",
    params
  });
}
// 商品品牌列表删除
export function DelBrand_goods_types(id) {
  return http({
    url: `/api/goods_brands/${id}`,
    method: "delete",
  });
}
// 新增品牌
export function AddBrandgoods_types(data) {
  return http({
    url: "/api/goods_brands",
    method: "post",
    data,
  });
}
// 编辑品牌
export function editBrand_types(id, data) {
  return http({
    url: `/api/goods_brands/${id}`,
    method: "patch",
    data,
  });
}
