import request from "@/utils/request";

// 查询图片列表
export function getImageList(query) {
  return request({
    url: "/api/imgAnalysis/list",
    method: "get",
    params: query,
  });
}

// 获取图片详情
export function getImageDetail(id) {
  return request({
    url: `/api/imgAnalysis/${id}`,
    method: "get",
  });
}

// 分析图片
export function analyzeImage(id) {
  return request({
    url: `/api/imgAnalysis/analyze/${id}`,
    method: "post",
  });
}

// 删除图片
export function deleteImage(id) {
  return request({
    url: `/api/imgAnalysis/${id}`,
    method: "delete",
  });
}

// 批量删除图片
export function batchDeleteImages(ids) {
  return request({
    url: "/api/imgAnalysis/batchDelete",
    method: "delete",
    data: { ids },
  });
}
