|
@@ -7,6 +7,12 @@ type PRACTICE_TYPE = "IN_PRACTICE" | "NO_ANSWER";
|
|
|
|
|
|
export async function initExamData(examId: number, examRecordDataId: number) {
|
|
export async function initExamData(examId: number, examRecordDataId: number) {
|
|
logger({ cnl: ["server", "local"], pgn: "答题页面", act: "before initData" });
|
|
logger({ cnl: ["server", "local"], pgn: "答题页面", act: "before initData" });
|
|
|
|
+ const { courseName, courseCode } = (
|
|
|
|
+ await httpApp.post<{ courseName: string; courseCode: string }>(
|
|
|
|
+ "/api/ecs_oe_student/examControl/getCourseInfo/" + examRecordDataId,
|
|
|
|
+ { "axios-retry": { retries: 4 }, noErrorMessage: true }
|
|
|
|
+ )
|
|
|
|
+ ).data;
|
|
const [
|
|
const [
|
|
{ data: weixinAnswerEnabled },
|
|
{ data: weixinAnswerEnabled },
|
|
{ data: faceCheckEnabled },
|
|
{ data: faceCheckEnabled },
|
|
@@ -15,11 +21,10 @@ export async function initExamData(examId: number, examRecordDataId: number) {
|
|
{ data: exam },
|
|
{ data: exam },
|
|
{ data: paperStruct },
|
|
{ data: paperStruct },
|
|
{ data: examQuestionListOrig },
|
|
{ data: examQuestionListOrig },
|
|
- { data: _courseName },
|
|
|
|
] = await Promise.all([
|
|
] = await Promise.all([
|
|
// 是否开放微信小程序作答
|
|
// 是否开放微信小程序作答
|
|
httpApp.get<boolean>(
|
|
httpApp.get<boolean>(
|
|
- "/api/ecs_exam_work/exam/weixinAnswerEnabled/" + examId,
|
|
|
|
|
|
+ `/api/ecs_exam_work/exam/weixinAnswerEnabled/${examId}?courseCode=${courseCode}`,
|
|
{
|
|
{
|
|
"axios-retry": { retries: 4 },
|
|
"axios-retry": { retries: 4 },
|
|
noErrorMessage: true,
|
|
noErrorMessage: true,
|
|
@@ -62,12 +67,8 @@ export async function initExamData(examId: number, examRecordDataId: number) {
|
|
"/api/ecs_oe_student/examQuestion/findExamQuestionList",
|
|
"/api/ecs_oe_student/examQuestion/findExamQuestionList",
|
|
{ "axios-retry": { retries: 4 }, noErrorMessage: true }
|
|
{ "axios-retry": { retries: 4 }, noErrorMessage: true }
|
|
),
|
|
),
|
|
- httpApp.get<string>(
|
|
|
|
- "/api/ecs_oe_student/examControl/courseName/" + examRecordDataId,
|
|
|
|
- { "axios-retry": { retries: 4 }, noErrorMessage: true }
|
|
|
|
- ),
|
|
|
|
]);
|
|
]);
|
|
- store.exam.courseName = _courseName;
|
|
|
|
|
|
+ store.exam.courseName = courseName;
|
|
|
|
|
|
let examQuestionList = examQuestionListOrig;
|
|
let examQuestionList = examQuestionListOrig;
|
|
|
|
|