import { request } from 'umi';

/** 获取店铺上架商品  */
export async function GetStoreGoodsAsync(data) {
  return request(`​​/kitchen/api/store-info/store-goods`, {
    method: 'POST',
    data: data,
    // params: { ...params },

    // ...(options || {}),
  });
}

/** 获取商品  sdsa GET /kitchen/api/rule */
export async function getGoods() {
  var data = { current: 1, pageSize: 1000, goods_Enable: 0 };
  return request(`/kitchen/api/goods/goodss`, {
    method: 'Post',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}

/** 修改  */
export async function UpdateStoreGoodsAsync(data) {
  return request(`/kitchen/api/store-info/store-goods`, {
    method: 'put',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}

/** 启用停用  */
export async function UpdateStoreGoodsStatusAsync(data) {
  return request(`/kitchen/api/store-info/store-goods-status`, {
    method: 'put',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}

/** 新增  */
export async function AddStoreGoodAsync(data) {
  return request(`/kitchen/api/store-info/store-good`, {
    method: 'POST',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}

/** 删除上架商品  */
export async function DelStoreGoodAsync(data) {
  return request(`/kitchen/api/store-info/del-store-good`, {
    method: 'POST',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}
