Browse Source

修改取题目的方式和参数

JXDS18FUJT 1 year ago
parent
commit
b751745591
2 changed files with 16 additions and 2 deletions
  1. 14 0
      src/api/api.ts
  2. 2 2
      src/hooks/examTest.ts

+ 14 - 0
src/api/api.ts

@@ -62,6 +62,19 @@ function openApiquestionInfoSelectTestQuestionInfo(params: {
 
     })
 
+}
+//查询模拟考试题库的新接口(通用)
+function openApiquestion2InfoSelectTestQuestionInfo(params: {
+    model:string,
+    subject: number,
+}): AxiosPromise<selectTestQuestionInfo.response> {
+    return request({
+        url: import.meta.env.MODE === "production" ?"https://jpcj.zzxcx.net/jpcj-admin/open-api/question2/info/selectTestK14QuestionInfoList":"https://jpcj1.zzxcx.net/jpcj-admin/open-api/question2/info/selectTestK14QuestionInfoList",
+        method: "get",
+        params
+
+    })
+
 }
 //查询用户信息
 function studentUserInfo(): AxiosPromise<studentUserInfo.response> {
@@ -93,6 +106,7 @@ export default {
     studentQuestionInfoSelectTestQuestionInfo,
     studentUserInfo,
     openApiquestionInfoSelectTestQuestionInfo,
+    openApiquestion2InfoSelectTestQuestionInfo,
     questionTwoList,
     studentEmailInfo
 

+ 2 - 2
src/hooks/examTest.ts

@@ -650,11 +650,11 @@ export function useExamTest() {
     let getPgae = () => {
         console.log(router)
         let params = {
-            gs: router.currentRoute.value.query.gs as string,
+            model: router.currentRoute.value.query.model as string,
             subject: Number(router.currentRoute.value.query.subject)
         }
 
-        Api.openApiquestionInfoSelectTestQuestionInfo(params).then((res) => {
+        Api.openApiquestion2InfoSelectTestQuestionInfo(params).then((res) => {
             res.data.rows.forEach((item) => {
                 item.optsArr = item.opts.split('-');
                 item.answerArr = item.answer.split('-');