import request from '@/utils/request'

/** 售后列表 */
export function listAftersales(params) {
  return request({
    url: '/api/order/aftersale/list',
    method: 'GET',
    params
  })
}

/** 售后详情 */
export function getAftersaleDetail(aftersaleId) {
  return request({
    url: `/api/order/aftersale/${aftersaleId}`,
    method: 'GET'
  })
}

/** 提交售后申请 */
export function submitAftersale(data) {
  return request({
    url: '/api/order/aftersale/submit',
    method: 'POST',
    data,
    header: { repeatSubmit: false }
  })
}
