import request from '@/router/request';

// 删除商品
export function delefood(id){
  return request({
    url: '/chanting/food/delefood',
    method: 'get',
    headers: {
      isToken: true,
    },
    params:{
    	id:id
    }
  })
}


export function getFood(id) {
  return request({
    url: '/chanting/food/' + id,
    method: 'get',
    headers: {
      isToken: true,
    },
  })
}
// 添加商品
export function setposfood(data){
  return request({
    url: '/chanting/food/setposfood',
    method: 'post',
    headers: {
      isToken: false,
    },
    data:data
  })
}
// 获取商品列表
export function getidlist(id,lang,name){
  return request({
    url: '/chanting/food/getidlist',
    method: 'get',
    headers: {
      isToken: true,
    },
    params:{
		id:id,
		language:lang,
        name:name
	}
  })
}
// 获取商家门店列表
export function storelistlist(){
  return request({
    url: '/chanting/store/storelistlist',
    method: 'get',
    headers: {
      isToken: true,
    },
    params:{
		page:1,
		size:50
	}
  })
}
//获取商品分类
export function getordfenlei(id,lang){
  return request({
    url: '/system/fenlei/getfenlei',
    method: 'get',
    headers: {
      isToken: false,
    },
    params: {
      id:id,
	  language:lang
    }
  })
}
export function getFoodPageList(params){
  return request({
    url: '/chanting/food/getFoodPageList',
    method: 'get',
    headers: {
      isToken: true,
    },
    params:params
  })
}
