import { request } from 'umi';
import type { CardListItemDataType } from './data.d';

/**
 * 【6.5】（教师首页）当前学习主题课程信息
 * /dsideal_yy/ypt/careerTraining/report/personLastLearning
 * @param params 
 * @returns 
 */
export async function personLastLearning(params: {
  page_size: number;
  //count: number;
}): Promise<{ data: { list: CardListItemDataType[] } }> {
  return request('/dsideal_yy/ypt/careerTraining/report/personLastLearning', {
    params,
  });
}

/**
 * 获取考试详情
 * /dsideal_yy/zygh/training/examination/getExaminationById
 * @param params 
 * @returns 
 */
export async function getExaminationById(params: {
  page_size: number;
  //count: number;
}): Promise<{ data: { list: CardListItemDataType[] } }> {
  return request('/dsideal_yy/zygh/training/examination/getExaminationById', {
    params,
  });
}


/**
 * 获取考试规则详情
 * /dsideal_yy/zygh/training/rules/getRulesById
 * @param params 
 * @returns 
 */
export async function getRulesById(params: {
  page_size: number;
  //count: number;
}): Promise<{ data: { list: CardListItemDataType[] } }> {
  return request('/dsideal_yy/zygh/training/rules/getRulesById', {
    params,
  });
}