import request from '@/utils/request'

/*新增套餐*/
export function addProduct(params) {
    return request({
      url: `/admin/erp/product/addProduct`,
      method: 'post',
      headers: { 'Content-Type': 'application/json' },
      data: params
    })
  }

  /*修改套餐 */
export function editProduct(id,params) {
    return request({
      url: `/admin/erp/product/updateProduct/${id}`,
      method: 'post',
      headers: { 'Content-Type': 'application/json' },
      data: params
    })
  }

  /*商品列表 */
  export function productList(params) {
    return request({
      url: '/admin/erp/product',
      method: 'get',
      params
    })
  }

  /*  删除商品*/
  export function delProduct(id) {
    return request({
      url: `/admin/erp/product/deletedProduct/${id}`,
      method: 'post',
      headers: { 'Content-Type': 'application/json' },
    })
  }