import request from '../request/index.js';

export function queryQuestion(data) {
  return request({
    url: 'driver-api/tdQuestion/queryQuestion',
    method: 'POST',
    data,
    noToken: true
  });
}

export function questionCategory(data) {
  return request({
    url: 'driver-api/tdQuestion/questionCategory',
    method: 'POST',
    data
  });
}

export function getTestQuestion(data) {
  return request({
    url: 'driver-api/tdQuestion/getTestQuestion',
    method: 'POST',
    data
  });
}

export function submitTest(data) {
  return request({
    url: 'driver-api/tdQuestionTest/testSubmit',
    method: 'POST',
    data
  });
}

export function testTotal(data) {
  return request({
    url: 'driver-api/tdQuestionTest/testTotal',
    method: 'POST',
    data
  });
}

//获取配置
export function querySysConfigList(carTypeId, configKey) {
  return request({
    url: 'driver-api/tdSysConfigList/querySysConfigList?configKey=' + configKey + '&carTypeId=' + carTypeId,
    method: 'GET'
  });
}

//获取项目列表 (考试项目和基础操作)
export function queryProjectList(data) {
  return request({
    url: 'driver-api/tdTestProject/queryProjectList',
    method: 'POST',
    data
  });
}
