import request from '@/utils/request'
import { sellerShopHeaders } from '@/utils/sellerShop'

// 售后列表
export function listSellerAftersale(query) {
  return request({
    url: '/agri/seller/aftersale/list',
    method: 'get',
    params: query,
    headers: sellerShopHeaders()
  })
}

// 售后详情
export function getSellerAftersale(aftersaleId) {
  return request({
    url: '/agri/seller/aftersale/' + aftersaleId,
    method: 'get',
    headers: sellerShopHeaders()
  })
}

// 处理完结
export function finishSellerAftersale(aftersaleId, data) {
  return request({
    url: '/agri/seller/aftersale/' + aftersaleId + '/finish',
    method: 'put',
    data: data,
    headers: sellerShopHeaders()
  })
}
