import request from '@/utils/request';

// 查询商品列表分页
export function doGetShoplist(data) {
  return request({
    url: '/admin/warehouse/product/page',
    method: 'post',
    data
  });
}

// 添加-编辑
export function doEditShop(data) {
  return request({
    url: '/admin/warehouse/product/add',
    method: 'post',
    data
  });
}
// 删除
// export function doDeleteBuyer(id) {
//   return request({
//     url: "/admin/auth/doDeleteAdmin",
//     method: "delete",
//     params: {
//       id: id,
//     },
//   });
// }
export function doDeleteShop(id) {
  return request({
    url: `/admin/warehouse/product/del/${id}`,
    method: 'get'
  });
}
// 上架
export function doShopOn(id) {
  return request({
    url: `/admin/warehouse/product/shelve/on/${id}`,
    method: 'get'
  });
}
// 下架
export function doShopOff(id) {
  return request({
    url: `/admin/warehouse/product/shelve/off/${id}`,
    method: 'get'
  });
}
