You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
847 B
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import request from '@/utils/network/request';
/**
* 获取考试列表
* @param {Object} data
* { studentid: 学生id, status: 考试状态进行中1 已结束: 2 }
*/
export function getExamList(data, config = {}) {
return request({
url: '/api/user.ashx?act=studentexamlist',
method: 'GET',
data
}, config)
}
/**
* 获取考试详情
* @param {Object} data
* { examid: 考试id studentid 学生id }
*/
export function getExamInfo(data, config = {}) {
return request({
url: '/api/user.ashx?act=studentexaminfo',
method: 'GET',
data
})
}
/**
* 上传考试图片
*/
export function uploadExamImg(data, config = {}) {
const { userId, examId, file } = data;
return request({
url: `/api/user.ashx?act=subexaminfo&studentid=${userId}&examid=${examId}`,
method: 'POST',
data: file
}, config)
}