import req from '../request';

export default {
  //登录
  login: (data: any) => {
    return req({
      url: '/user/login',
      method: 'post',
      data: data,
      headers: {
        auth: false //不要鉴权
      }
    });
  },

  //退出
  logout: (data: any) => {
    return req({
      url: '/user/logout',
      method: 'get',
      data: data
    });
  },

  //获取登录信息
  getUserInfo: (data: any) => {
    return req({
      url: '/user/userinfo',
      method: 'get',
      data: data
    });
  },

  //获取班级列表
  classList: (data: any) => {
    return req({
      url: '/school/classes_list',
      method: 'get',
      data: data
    });
  },

  //获取学生列表
  studentList: (data: any) => {
    return req({
      url: '/user/student_list',
      method: 'get',
      data: data
    });
  },

  //获取百度语音token
  baiduToken: (data: any) => {
    return req({
      url: '/bdapi_token',
      method: 'get',
      data: data
    });
  },

  //获取测试数据列表
  reportList: (data: any) => {
    return req({
      url: '/exam/today/examdata/list',
      method: 'get',
      data: data
    });
  },

  //获取测试数据明细2
  reportDetails: (data: any) => {
    return req({
      url: '/exam/search',
      method: 'get',
      data: data
    });
  },

  //获取工作站列表
  allExams: (data: any) => {
    return req({
      url: '/school/get_all_exams',
      method: 'post',
      data: data
    });
  },

  //删除工作站
  delExamSettings: (data: any) => {
    return req({
      url: '/school/del_gpu_exam_setting',
      method: 'post',
      data: data
    });
  },

  //下课
  closeExamForce: (data: any) => {
    return req({
      url: '/school/close_exam_force',
      method: 'post',
      data: data
    });
  },

  //关闭工作站
  stopGpu: (data: any) => {
    return req({
      url: '/school/stop_gpu',
      method: 'post',
      data: data
    });
  },

  //重启工作站
  restartGpu: (data: any) => {
    return req({
      url: '/school/restart_gpu',
      method: 'post',
      data: data
    });
  },

  //重启后获取工作站状态
  checkWkState: (data: any) => {
    return req({
      url: '/school/check_wk_state',
      method: 'post',
      data: data
    });
  },

  //关闭LED
  closeLedScreen: (data: any) => {
    return req({
      url: '/school/close_led_screen',
      method: 'post',
      data: data
    });
  },

  //获取序号
  serialNumber: (data: any) => {
    return req({
      url: '/gpu/get_config_exams',
      method: 'post',
      baseURL: import.meta.env.VITE_APP_BASE_CTRL,
      data: data
    });
  },

  //添加项目
  addExamSettings: (data: any) => {
    return req({
      url: '/school/add_gpu_exam_setting',
      method: 'post',
      data: data
    });
  },

  //密码校验
  checkPassword: (data: any) => {
    return req({
      url: '/device/config/check_password',
      method: 'post',
      data: data
    });
  },

  //测试手势
  cmdtest: (data: any) => {
    return req({
      url: '/device/handcontroller/cmdtest',
      method: 'post',
      data: data
    });
  },

  //设备信息
  deviceInfo: (data: any) => {
    return req({
      url: '/log/hctrl_device_info/list',
      method: 'get',
      data: data
    });
  },

  //扫码登录验证
  qrlogin: (data: any) => {
    return req({
      url: '/user/qr_login',
      method: 'post',
      data: data,
      headers: {
        auth: false //不要鉴权
      }
    });
  },

  //模拟阳光跑数据
  sunshineRunPushData: (data: any) => {
    return req({
      url: '/test/sunlight/pushdata',
      method: 'post',
      data: data
    });
  },

  //获取学生成绩
  studentReport: (data: any) => {
    return req({
      url: '/report/index',
      method: 'get',
      data: data
    });
  },

};
