import request from '@/utils/request';

/**
 * 获取当前位置
 * @returns
 */
export function getGoodsList(data) {
  return request({
    url: '/maintain/merchant/getMerchantGoodsList',
    method: 'post',
    data: data,
    headers: {
      'content-type': 'application/json',
    },
  });
}
export function getCategories(merchantId) {
  return request({
    url: '/maintain/merchant/getCategories',
    method: 'post',
    data: {merchantId},
    headers: {
      'content-type': 'application/json',
    },
  });
}

// 上架商品

export function upGoods(goodsIds) {
  return request({
    url: `/maintain/merchant/list-goods/${goodsIds}`,
    method: 'PUT',
    headers: {
      'content-type': 'application/x-www-form-urlencoded',
    },
  });
}
