import request from '@/utils/request'

// /prod-api/front/test/major/getMatchCategoryTree
// 04 提取测试结果涉及的一二级专业
export function getMatchCategoryTree(params) {
  return request({
    url: '/front/test/major/getMatchCategoryTree',
    method: 'get',
    params
  })
}

// GET
// /prod-api/front/test/major/getSelectMajorSubjectTree
// 05 提取测试结果涉及的一二三级专业树
export function getSelectMajorSubjectTree() {
  return request({
    url: '/front/test/major/getSelectMajorSubjectTree',
    method: 'get'
  })
}

// GET
// /prod-api/front/test/major/getTestList
// 01 查询测试历史
export function getTestList(params) {
  return request({
    url: '/front/test/major/getTestList',
    method: 'get',
    params
  })
}

// GET
// /prod-api/front/test/major/getTestMajorResult
// 03 提取测试结果
export function getTestMajorResult(params) {
  return request({
    url: '/front/test/major/getTestMajorResult',
    method: 'get',
    params
  })
}

// GET
// /prod-api/front/test/major/loadExamineePaper
// 02 查询测试内容
export function loadExamineePaper(params) {
  return request({
    url: '/front/test/major/loadExamineePaper',
    method: 'get',
    params
  })
}

// POST
// /prod-api/front/test/major/saveUserSelectedCategory
// 06 保存选择的专业类
export function saveUserSelectedCategory(data) {
  return request({
    url: '/front/test/major/saveUserSelectedCategory?testType=' + data.testType,
    method: 'post',
    data
  })
}

// POST
// /prod-api/front/test/major/saveUserSelectedMajor
// 07 保存选择的专业
export function saveUserSelectedMajor(data) {
  return request({
    url: '/front/test/major/saveUserSelectedMajor',
    method: 'post',
    data
  })
}

// GET
// /prod-api/front/test/major/getAllTestMajorResult
// 08 查询所有测试结果及选专业
export function getAllTestMajorResult() {
  return request({
    url: '/front/test/major/getAllTestMajorResult',
    method: 'post'
  })
}

// 全量的专业树
export function loadAllMajorSubjectTree() {
  return request({
    url: '/front/test/major/loadAllMajorSubjectTree',
    method: 'get'
  })
}
