|
|
@@ -36,11 +36,24 @@ export async function goToExamPage(item, callbacks = {}) {
|
|
|
url: `/pages_safetyEducationExamination/views/webViewPage/courseLearning?courseId=${item.courseId}&examId=${item.examId}`,
|
|
|
});
|
|
|
} else if (item.conditionType == 3) {
|
|
|
+ console.log('item',item)
|
|
|
+ const pages = getCurrentPages();
|
|
|
+ const currentPage = pages[pages.length - 1];
|
|
|
+ const currentRoute = currentPage.route;
|
|
|
if (item.mockExamId) {
|
|
|
const examData = encodeURIComponent(JSON.stringify(item));
|
|
|
uni.navigateTo({
|
|
|
- url: `/pages_safetyEducationExamination/views/exam/mockExamInfo?examData=${examData}`,
|
|
|
+ url: `/pages_safetyEducationExamination/views/exam/mockExamPlay?examId=${item.examId}&attemptId=${item.mockExamId}`,
|
|
|
});
|
|
|
+ // if(currentRoute == 'pages_safetyEducationExamination/views/exam/mockExamInfo' || currentRoute == 'pages_safetyEducationExamination/views/exam/onlineExamInfo'){
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: `/pages_safetyEducationExamination/views/exam/mockExamPlay?examId=${item.examId}&attemptId=${item.mockExamId}`,
|
|
|
+ // });
|
|
|
+ // }else{
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: `/pages_safetyEducationExamination/views/exam/mockExamInfo?examData=${examData}`,
|
|
|
+ // });
|
|
|
+ // }
|
|
|
} else {
|
|
|
try {
|
|
|
const { data } = await examUserExamStart({ examId: item.examId, examScene: 2 });
|
|
|
@@ -48,8 +61,17 @@ export async function goToExamPage(item, callbacks = {}) {
|
|
|
const filled = { ...item, attemptId: data.data.attemptId };
|
|
|
const examData = encodeURIComponent(JSON.stringify(filled));
|
|
|
uni.navigateTo({
|
|
|
- url: `/pages_safetyEducationExamination/views/exam/mockExamInfo?examData=${examData}`,
|
|
|
+ url: `/pages_safetyEducationExamination/views/exam/mockExamPlay?examId=${item.examId}&attemptId=${data.data.attemptId}`,
|
|
|
});
|
|
|
+ // if(currentRoute == 'pages_safetyEducationExamination/views/exam/mockExamInfo'){
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: `/pages_safetyEducationExamination/views/exam/mockExamPlay?examId=${item.examId}&attemptId=${data.data.attemptId}`,
|
|
|
+ // });
|
|
|
+ // }else{
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: `/pages_safetyEducationExamination/views/exam/mockExamInfo?examData=${examData}`,
|
|
|
+ // });
|
|
|
+ // }
|
|
|
} else {
|
|
|
uni.showToast({ title: data.message || '获取模拟试卷失败', icon: 'none' });
|
|
|
}
|