瀏覽代碼

开发练习模块5

JXDS18FUJT 1 年之前
父節點
當前提交
b6ee33fb11
共有 1 個文件被更改,包括 6 次插入0 次删除
  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
 
   }