import { request } from '@/service/request';

/**
 * 分页获取物流公司
 * @param params
 * @returns
 */
export function fetchGetDelivery(params: any) {
  return request<Api.delivery.devList>({
    url: '/platform/delivery/page',
    method: 'get',
    params
  });
}
/**
 * 新增物流公司
 * @param params
 * @returns
 */

export function fetchAddDelivery(params: any) {
  return request({
    url: '/platform/delivery',
    method: 'post',
    data: params
  });
}

/**
 * 删除物流公司

*/
export function fetchDeleteDelivery(dvyId: number) {
  return request({
    url: `/platform/delivery/${dvyId}`,
    method: 'delete'
  });
}

/**
 * 修改物流公司
 * @param params
 * @returns

 */
export function fetchUpdateDelivery(params: any) {
  return request({
    url: '/platform/delivery',
    method: 'put',
    data: params
  });
}
