فهرست منبع

修改题库查询逻辑

wyling007 3 سال پیش
والد
کامیت
e2d86caeaf
3فایلهای تغییر یافته به همراه17 افزوده شده و 9 حذف شده
  1. 5 1
      src/dataModel/collection.ts
  2. 4 0
      src/views/home/children/test/components/sujectOne.vue
  3. 8 8
      src/views/home/children/test/index.vue

+ 5 - 1
src/dataModel/collection.ts

@@ -9,7 +9,11 @@ export class CollectionModel {
   }
 
   /**获取列表 */
-  async getList(params: CollectionAndWrongType.ListParams) {
+  async getList(params: CollectionAndWrongType.ListParams): Promise<{
+    total: number;
+    rows: Test.QuestionInfo[];
+    collectionList: CollectionAndWrongType.QuestionRes[];
+  }> {
     const collectionListRes = await this.collectionApi.getList(params);
     if (collectionListRes.rows.length > 0) {
       const ids = collectionListRes.rows.map((item) => item.questionId);

+ 4 - 0
src/views/home/children/test/components/sujectOne.vue

@@ -57,6 +57,7 @@ const testList = [
             ...props.query,
             path: "selectSxQustionInfo",
             title: "顺序练习",
+            sort: 3,
           },
         },
       },
@@ -69,6 +70,7 @@ const testList = [
             ...props.query,
             path: "selectFlQustionInfo",
             title: "分类练习",
+            sort: 1,
           },
         },
       },
@@ -83,6 +85,7 @@ const testList = [
             ...props.query,
             path: "selectJxQustionInfo",
             title: "精选考题",
+            sort: 2,
           },
         },
       },
@@ -97,6 +100,7 @@ const testList = [
             ...props.query,
             path: "selectDfQustionInfo",
             title: "地方专题",
+            sort: 4,
           },
         },
       },

+ 8 - 8
src/views/home/children/test/index.vue

@@ -69,7 +69,7 @@ const carTypeList = ref([
           name: "科目一",
           cert: "C1/C2/C3",
           vehicle: "小车",
-          subject1: 1,
+          subject: 1,
         },
       },
       {
@@ -78,7 +78,7 @@ const carTypeList = ref([
           name: "科目四",
           cert: "C1/C2/C3",
           vehicle: "小车",
-          subject4: 1,
+          subject: 4,
         },
       },
     ],
@@ -95,7 +95,7 @@ const carTypeList = ref([
           name: "科目一",
           cert: "A1/A3/B1",
           vehicle: "客车",
-          subject1: 1,
+          subject: 1,
         },
       },
       {
@@ -104,7 +104,7 @@ const carTypeList = ref([
           name: "科目四",
           cert: "A1/A3/B1",
           vehicle: "客车",
-          subject4: 1,
+          subject: 4,
         },
       },
     ],
@@ -121,7 +121,7 @@ const carTypeList = ref([
           name: "科目一",
           cert: "A2/B2",
           vehicle: "货车",
-          subject1: 1,
+          subject: 1,
         },
       },
       {
@@ -130,7 +130,7 @@ const carTypeList = ref([
           name: "科目四",
           cert: "A2/B2",
           vehicle: "货车",
-          subject4: 1,
+          subject: 4,
         },
       },
     ],
@@ -147,7 +147,7 @@ const carTypeList = ref([
           name: "科目一",
           cert: "D/E/F",
           vehicle: "摩托车",
-          subject1: 1,
+          subject: 1,
         },
       },
       {
@@ -156,7 +156,7 @@ const carTypeList = ref([
           name: "科目四",
           cert: "D/E/F",
           vehicle: "摩托车",
-          subject4: 1,
+          subject: 4,
         },
       },
     ],