import request from '@/utils/request'

// 查询运费模板列表
export function listShippingTemplates(query) {
  return request({
    url: '/store/store/shippingTemplates/list',
    method: 'get',
    params: query
  })
}

// 查询运费模板详细
export function getShippingTemplates(shippingId) {
  return request({
    url: '/store/store/shippingTemplates/' + shippingId,
    method: 'get'
  })
}

// 新增运费模板
export function addShippingTemplates(data) {
  return request({
    url: '/store/store/shippingTemplates',
    method: 'post',
    data: data
  })
}

// 修改运费模板
export function updateShippingTemplates(data) {
  return request({
    url: '/store/store/shippingTemplates',
    method: 'put',
    data: data
  })
}

// 删除运费模板
export function delShippingTemplates(shippingId) {
  return request({
    url: '/store/store/shippingTemplates/' + shippingId,
    method: 'delete'
  })
}

// 导出运费模板
export function exportShippingTemplates(query) {
  return request({
    url: '/store/store/shippingTemplates/export',
    method: 'get',
    params: query
  })
}
export function getAllShippingTemplates() {
  return request({
    url: '/store/store/shippingTemplates/getAllList',
    method: 'get'
  })
}
