import request from "@/utils/request";
import { AxiosPromise } from "axios";
import { DashboardCard, DashboardData } from "./types";

/**
 * 获取学校列表
 */
export function getDashboardTop(id: number): AxiosPromise<DashboardCard> {
  return request({
    url: "/board/v1/top",
    method: "get",
    params: { school_id: id },
  });
}
/**
 * 获取班级列表
 */
export function getDashboardData(id: number): AxiosPromise<DashboardData> {
  return request({
    url: "/board/v1/bottom",
    method: "get",
    params: { grade_id: id },
  });
}
