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

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 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)
}