import request from "@/utils/request";
import type { smartWarningQuery } from "./type";

//校园概览页面相关的请求地址
enum API {
  // 办学规模信息接口地址
  SCALE_URL = "/wanzai/api/driver/getClassTj",
  // 近一年访客管理信息接口地址
  VISITOR_URL = "/wanzai/api/driver/getVisitorTj",
  // 预警推送信息接口地址
  WARNING_URL = "/wanzai/api/driver/queryPageSmartWarning",
}

// 办学规模信息接口
export const reqGetSchoolScale = () => request.get(API.SCALE_URL);

// 近一年访客管理信息接口
export const reqGetSchoolVisitor = () => request.get(API.VISITOR_URL);

// 预警推送信息接口
export const reqGetSmartWarning = (data: smartWarningQuery) =>
  request.get(
    `${API.WARNING_URL}?currentPage=${data.currentPage}&pageCount=${data.pageCount}`
  );
