|
|
@@ -34,6 +34,7 @@ import {
|
|
|
} from '@/types/injectionSymbols';
|
|
|
import { useAppStore } from '@/store/appStore';
|
|
|
import { useEnv } from '@/hooks/useEnv';
|
|
|
+import { events } from '@/common/report';
|
|
|
|
|
|
const appStore = useAppStore();
|
|
|
const { platform } = useEnv();
|
|
|
@@ -203,6 +204,7 @@ const handleSubmit = (tempSave: boolean = false) => {
|
|
|
};
|
|
|
console.log('提交试卷参数', params)
|
|
|
await commitExamineePaper(params);
|
|
|
+ uni.report(events.examStartSubmitSuccess, getReportData(params));
|
|
|
if (isSimulationExam.value || isTestExam.value) {
|
|
|
if (!tempSave) {
|
|
|
setTimeout(async () => {
|
|
|
@@ -407,9 +409,9 @@ const combinePaperData = async (examinee: Study.Examinee, paperType: EnumPaperTy
|
|
|
startTime();
|
|
|
}
|
|
|
}
|
|
|
- uni.report('exam-start-success', getReportData());
|
|
|
+ uni.report(events.examStartLoadSuccess, getReportData());
|
|
|
} else {
|
|
|
- uni.report('exam-start-error[no examinee.paperId]', getReportData());
|
|
|
+ uni.report(events.examStartLoadError, getReportData());
|
|
|
}
|
|
|
}
|
|
|
const handleSwiperTipNext = () => {
|
|
|
@@ -425,28 +427,30 @@ const handleGuideClose = () => {
|
|
|
const loadData = async () => {
|
|
|
uni.$ie.showLoading();
|
|
|
const { paperType } = prevData.value;
|
|
|
- if (paperType === EnumPaperType.PRACTICE || paperType === EnumPaperType.COURSE) {
|
|
|
- loadPracticeData();
|
|
|
- } else if (paperType === EnumPaperType.SIMULATED || paperType === EnumPaperType.TEST) {
|
|
|
- // if (paperType === EnumPaperType.SIMULATED && userStore.isVHS) {
|
|
|
- // loadVHSPaperData();
|
|
|
- // } else {
|
|
|
- // loadExamData();
|
|
|
- // }
|
|
|
- loadExamData();
|
|
|
+ try {
|
|
|
+ if (paperType === EnumPaperType.PRACTICE || paperType === EnumPaperType.COURSE) {
|
|
|
+ loadPracticeData();
|
|
|
+ } else if (paperType === EnumPaperType.SIMULATED || paperType === EnumPaperType.TEST) {
|
|
|
+ loadExamData();
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ uni.report(events.examStartLoadError, getReportData(error));
|
|
|
}
|
|
|
};
|
|
|
-const getReportData = () => {
|
|
|
+const getReportData = (extraData: any = {}) => {
|
|
|
return {
|
|
|
pageOptions: prevData.value,
|
|
|
- userInfo: userStore.userInfo,
|
|
|
+ userInfo: {
|
|
|
+ userName: userStore.userInfo.userName,
|
|
|
+ phonenumber: userStore.userInfo.phonenumber,
|
|
|
+ },
|
|
|
platform: platform.value,
|
|
|
- envInfo: appStore.systemInfo,
|
|
|
+ extraData
|
|
|
}
|
|
|
}
|
|
|
onLoad(() => {
|
|
|
console.log(prevData.value)
|
|
|
- uni.report('exam-start-enter', getReportData());
|
|
|
+ uni.report(events.examStartEnter, getReportData());
|
|
|
loadData();
|
|
|
uni.addInterceptor('navigateBack', {
|
|
|
invoke: (e) => {
|