提交错题本

This commit is contained in:
田岩
2025-08-30 10:20:16 +08:00
parent 2ee3099e6d
commit c4841aaa78
30 changed files with 1494 additions and 570 deletions
+2 -5
View File
@@ -6,7 +6,6 @@ export const startPracticeByCrs = (data) => {
return request({
url: base_url + '/traCrsPractice/startPracticeByCrs',
method: 'post',
toastErrors: true,
data
});
};
@@ -16,17 +15,16 @@ export const practiceAnswer = (data) => {
return request({
url: base_url + '/traCrsPractice/practiceAnswer',
method: 'post',
toastErrors: true,
data
});
};
// 3.课程练习状态变更
export const practiceCommit = (data) => {
export const practiceCommit = (data, suppressErrors=true) => {
return request({
url: base_url + '/traCrsPractice/practiceCommit',
method: 'post',
toastErrors: true,
suppressErrors: suppressErrors,
data
});
};
@@ -36,7 +34,6 @@ export const queryPracticeRecordByExrId = (data) => {
return request({
url: base_url + '/traCrsPractice/queryPracticeRecordByExrId',
method: 'post',
toastErrors: true,
data
});
};
+5 -6
View File
@@ -61,8 +61,8 @@ export default function request({
data,
meta,
isStream,
suppressErrors,
toastErrors,
suppressErrors = false,
toastErrors = true,
header = {},
timeout = 6000,
baseUrl = ''
@@ -97,10 +97,9 @@ export default function request({
const res = response.data
if (res?.rtnCode === '0000') {
return resolve(res)
} else {
if (toastErrors) {
common.msg(res?.message)
}
} else if (toastErrors) {
// common.msg(res?.message)
}
//到这里下面全是异常的处理
if (suppressErrors) { // 静默的接口,报错也不处理,因为下面有公共处理
+21
View File
@@ -20,3 +20,24 @@ export const mistakesCorrect = (data) => {
data
});
};
// 错题本id集合
export const queryTraMistakesCollection = (data) => {
return request({
url: base_url + '/traMistakesCollection/queryTraMistakesCollection',
method: 'post',
toastErrors: true,
data
});
};
// 根据ID查题
export const queryMistakesAnswerByMisId = (data) => {
return request({
url: base_url + '/traMistakesCollection/queryMistakesAnswerByMisId ',
method: 'post',
toastErrors: true,
data
});
};