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
855 B
JavaScript

6 months ago
import request from '@/utils/network/request';
/**
* 获取作业列表
* @param {Object} data
* { studentid: 学生id, status: 作业状态已提交1 未提交 2 }
*/
export function getTaskList(data, config = {}) {
return request({
url: '/api/user.ashx?act=studenthomeworklist',
method: 'GET',
data
}, config)
}
/**
* 获取作业详情
* @param {Object} data
* { taskid: 考试id studentid 学生id }
*/
export function getTaskInfo(data, config = {}) {
return request({
url: '/api/user.ashx?act=studenthomeworkinfo',
method: 'GET',
data
})
}
/**
* 上传作业图片
*/
export function uploadTaskImg(data, config = {}) {
const { userId, workId, file } = data;
return request({
url: `/api/user.ashx?act=subworkinfo&studentid=${userId}&workid=${workId}`,
method: 'POST',
data: file
}, config)
}