@@ -70,7 +70,7 @@ const isIndexPage = computed(() => {
return route.name === "CurExam";
});
const backToIndexPage = () => {
- router.back();
+ router.push({ name: "CurExam" });
};
const windowToMin = () => {
@@ -90,7 +90,7 @@ function createService() {
}
const appStore = useAppStore();
if (error.config?.loading) {
- appStore.setLoading(true);
+ appStore.setLoading(false);
const err = (text: string) => {
!rejectWhiteList.includes(error.config?.url) &&
@@ -359,6 +359,9 @@ const _getExamList = () => {
} else {
examList.value = [];
+ if (!userStore.curExam && examList.value.length === 1) {
+ userStore.setCurExam(examList.value[0]);
+ }
);
@@ -305,7 +305,8 @@ watch(
() => dataCheckStore.curPageIndex,
(val, oldval) => {
if (val !== oldval) {
- questions.value = [...(dataCheckStore.curPage?.question || [])];
+ if (!dataCheckStore.curPage || !dataCheckStore.curPage.question) return;
+ questions.value = [...(dataCheckStore.curPage?.question?.result || [])];