Browse Source

开发练习模块5

JXDS18FUJT 1 year ago
parent
commit
b6ee33fb11
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/hooks/exam/driverExam.ts

+ 6 - 0
src/hooks/exam/driverExam.ts

@@ -529,6 +529,11 @@ export const useDriverExam = (requestFn: Promise<openApi.selectFreeQuestionInfoR
     return listIndex.value + 1
   })
   const countDown = ref('00:45:00')
+  const setPageNumToListIndex = (page:string|number)=>{
+    page = Number(page)
+    listIndex.value = page-1
+    
+  }
   const playIssueAudio = ()=>{
     audio.playAudio(list.value[listIndex.value].issuemp3)
   }
@@ -793,6 +798,7 @@ export const useDriverExam = (requestFn: Promise<openApi.selectFreeQuestionInfoR
     switchIndexByJudge,
     switchAnswerBySelect,
     switchIndexBySelect,
+    setPageNumToListIndex,
     playIssueAudio
 
   }