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

// export async function queryFakeList(params: {
//   count: number;
// }): Promise<{ data: { list: CardListItemDataType[] } }> {
//   return request('/api/card_fake_list', {
//     params,
//   });
// }


//获取课节
export async function listMyLearningChapterCourse1(params: {
  chapter_id: number;
  identity_id: number;
  person_id: number;
  subject_id: number
}){
  return request(' /dsideal_yy/ypt/careerTraining/learning/listMyLearningChapterCourse', {
    params,
  });
}


export async function viewCourseGetMyLearning(data: { [key: string]: any }, options?: { [key: string]: any }) {
  return request('/dsideal_yy/ypt/careerTraining/learning/viewCourseGetMyLearning', {
    data,
    method: 'POST',
    requestType: "form",
    ...(options || {}),
  });
}

//保存进度
export async function saveMyLearning(data: { [key: string]: any }, options?: { [key: string]: any }) {
  return request('/dsideal_yy/ypt/careerTraining/learning/saveMyLearning', {
    data,
    method: 'POST',
    requestType: "form",
    ...(options || {}),
  });
}
