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

// 查询当前店铺评价列表
export function listSellerReview(query) {
  return request({
    url: '/agri/seller/review/list',
    method: 'get',
    params: query,
    headers: sellerShopHeaders()
  })
}

// 查询评价详情
export function getSellerReview(reviewId) {
  return request({
    url: '/agri/seller/review/' + reviewId,
    method: 'get',
    headers: sellerShopHeaders()
  })
}

// 商家回复（新增/修改）
export function replySellerReview(reviewId, data) {
  return request({
    url: '/agri/seller/review/' + reviewId + '/reply',
    method: 'put',
    data: data,
    headers: sellerShopHeaders()
  })
}

// 删除评价（逻辑删除）
export function delSellerReview(reviewId) {
  return request({
    url: '/agri/seller/review/' + reviewId,
    method: 'delete',
    headers: sellerShopHeaders()
  })
}
