import request from '@/common/request.js' /** * 开始训练了 * @param mode * @param repoId * @param userId * @returns {*} */ export function startTrain(mode, repoId, userId, clear) { return request.post('/api/repo/train/start', { mode: mode, repoId: repoId, userId: userId, clear: clear }) } /** * 是否存在训练 * @param mode * @param repoId * @param userId * @returns {*} */ export function hasTrain(mode, repoId, userId) { return request.post('/api/repo/train/check', { mode: mode, repoId: repoId, userId: userId }) } /** * 查找答题卡 * @param mode * @param repoId * @param userId * @returns {*} */ export function listCard(trainId) { return request.post('/api/repo/train/card', { id: trainId }) } /** * 开始训练了 * @param mode * @param repoId * @param userId * @returns {*} */ export function fillResult(data) { return request.post('/api/repo/train/fill', data) } /** * 手动结束训练 * @param trainId * @returns {*} */ export function finishTrain(trainId) { return request.post('/api/repo/train/finish', { id: trainId }) } /** * 查找训练题目详情 * @param trainId * @param quId * @returns {Promise} */ export function quDetail(trainId, quId) { return request.post('/api/repo/train/qu-detail', { trainId: trainId, quId: quId }) } /** * 训练记录 * @param {Object} data */ export function trainPaging(data) { return request.post('/api/repo/train/paging', data) }