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

8 months ago
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)
}