import { request } from 'umi';

/** 获取场景列表  */
export async function GetFoodPage(data) {
  return request(`/saasstore/api/foodmenu/page`, {
    method: 'POST',
    data: data,
  });
}
export async function FoodAdd(data) {
    return request(`/saasstore/api/foodmenu/add`, {
      method: 'POST',
      data: data,
    });
  }
  export async function FoodUpdate(data) {
    return request(`/saasstore/api/foodmenu/update`, {
      method: 'POST',
      data: data,
    });
  }
  export async function FoodDelete(data) {
    return request(`/saasstore/api/foodmenu/delete`, {
      method: 'POST',
      data: data,
    });
  }
  export async function EditFoodMenuGoods(data) {
    return request(`/saasstore/api/foodmenu/editfoodmenugoods`, {
      method: 'POST',
      data: data,
    });
  }
  export async function GetFoodMenuGoods(data) {
    return request(`/saasstore/api/foodmenu/getfoodmenugoods?foodMenuId=`+data, {
      method: 'GET',
    });
  }
  export async function GetGoodsList(data) {
    return request(`/saasbase/api/goods/page`, {
      method: 'POST',
      data: data,
    });
  }
  
  export async function gettree(params) {
    return request('​/saasbase/api​/goodstype/tree', {
      method: 'GET',
      data: {
        ...params,
      },
    });
  }
  export async function GetDeviceList() {
    return request(`/saasbase/api/device/list`, {
      method: 'GET',
    });
  }