import { request } from 'umi';

export async function GetStoreInfos(data) {
  return request(`/kitchen/api/printer/store-infos`, {
    method: 'Post',
    data: data,
  });
}


//添加设备
export  function GetPrinter(data) {
  return request(`/kitchen/api/printer/printer-list/${data}`, {
    method: 'get',
    data: data,
  });
}


//添加设备
export async function AddPrinter(data) {
  return request(`/kitchen/api/printer/printer`, {
    method: 'Post',
    data: data,
  });
}

//修改设备
export async function UpdatePrinter(data) {
  return request(`/kitchen/api/printer/printer`, {
    method: 'PUT',
    data: data,
  });
}

//设置主机
export async function SetPrinterHost(storeid,id ) {
  return request(`/kitchen/api/printer/set-printer-host/${storeid}/${id}`, {
    method: 'post',
  });
}

//设置主机
export async function DelPrinter(data) {
  return request(`/kitchen/api/printer/del-printer`, {
    method: 'post',
    data: data,
  });
}

  //获取模板
  export async function GetPrinterTemplater(data) {
    return request(`/kitchen/api/printer/printer-templater`, {
      method: 'get',
      data: data,
    });
  }
  //获取店铺菜单
  export async function GetStoreFoodMenu(data) {
    return request(`/kitchen/api/printer/store-food-menu/${data}`, {
      method: 'get',
      data: data,
    });
  }
