import request from "@/utils/request";

/**
 * Pad商品版式布局列表
 * @returns
 */
export function layoutlist(params) {
  return request({
    url: "/api/pad/layout/list",
    method: "get",
    params
  });
}

/**
 * 新建
 * @returns
 */
export function productGroup(data) {
  return request({
    url: "/api/pad/productCategory",
    method: "post",
    data
  });
}

/**
 * Pad点餐列表
 * @returns
 */
export function productGrouppage(params) {
  return request({
    url: "/api/pad/productCategory/page",
    method: "get",
    params
  });
}

/**
 * 获取详情
 * @returns
 */
export function productCategoryDetail(id) {
  return request({
    url: `/api/pad/productCategory/${id}`,
    method: "get"
  });
}

/**
 * 删除
 * @returns
 */
export function productCategoryDelete(id) {
  return request({
    url: `/api/pad/productCategory/${id}`,
    method: "DELETE"
  });
}

/**
 * 修改
 * @returns
 */
export function productGroupPut(data) {
  return request({
    url: "/api/pad/productCategory",
    method: "put",
    data
  });
}

/**
 * 拖动排序
 * @returns
 */
export function productCategorySort(data) {
  return request({
    url: "/api/pad/productCategory/sort",
    method: "post",
    data
  });
}
