import BaseAPI from './base_api'

export default class TestAPI extends BaseAPI {
  /**
   * 获取考试信息
   * @param {[string]} examId resource_id
   */
  getExamInfo = (examId) => this.get(`/ehall/v1/exam/view/${examId}`, {})
  /**
   * 进入考试
   */
  userLogin = (obj = {}) => this.post('/ehall/v1/user/login', obj, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
  confirmInfo = (obj = {}) => this.post('/ehall/v1/user/confirm', obj, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
  // /**
  //  * post传输方式
  //  * @param {[object]} obj
  //  */
  // postTest = (obj = {}) => this.post('/passport/rest/login', obj, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
  // /**
  // * 当前登录用户，检测是否该系统有权限
  // */
  // getInfo = () => this.post('/user_center/get_user_info', {}, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
}
