import request from '@/utils/request' // 创建商品 export function createGoods(data) { return request({ url: '/restaurant/goods/create', method: 'post', data: data }) } // 更新商品 export function updateGoods(data) { return request({ url: '/restaurant/goods/update', method: 'put', data: data }) } // 删除商品 export function deleteGoods(id) { return request({ url: '/restaurant/goods/delete?id=' + id, method: 'delete' }) } // 获得商品 export function getGoods(id) { return request({ url: '/restaurant/goods/get?id=' + id, method: 'get' }) } // 获得商品分页 export function getGoodsPage(params) { return request({ url: '/restaurant/goods/page', method: 'get', params }) } // 导出商品 Excel export function exportGoodsExcel(params) { return request({ url: '/restaurant/goods/export-excel', method: 'get', params, responseType: 'blob' }) }