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,
		noToken: true
  });
}

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',
		noToken: true
  });
}
//获取配置
export function querySysConfig(carTypeId, configKey) {
  return request({
    url: 'driver-api/tdSysConfig/queryConfigByKey?configKey=' + configKey + '&carTypeId=' + carTypeId,
    method: 'GET',
		noToken: true
  });
}
//获取项目列表 (考试项目和基础操作)
export function queryProjectList(data) {
  return request({
    url: 'driver-api/tdTestProject/queryProjectList',
    method: 'POST',
    data,
		noToken:true
  });
}
// 

//获取专项题目数量
export function querySpecialNum(data) {
  return request({
    url: 'driver-api/tdQuestion/querySpecialNum',
    method: 'POST',
    data,
		noToken:true
  });
}


//获取题库版本
export function getVersion(carTypeId) {
  return request({
    url: '/driver-api/tdQuestionVersion/currentVersion?carTypeId='+carTypeId,
    method: 'GET',
		noToken:true
  });
}

//获取题目ID
export function queryQuestionId(data) {
  return request({
    url: '/driver-api/tdQuestion/queryQuestionId',
    method: 'POST',
    data,
		noToken:true
  });
}

//获取模拟考试ID
export function getTestQuestionId(data) {
  return request({
    url: '/driver-api/tdQuestion/getTestQuestionId',
    method: 'POST',
    data,
		noToken:true
  });
}
