From f81e5fe6561f221a2be93487be0a1286a65041c5 Mon Sep 17 00:00:00 2001
From: yiming <m13691596795@163.com>
Date: 星期一, 29 七月 2024 16:09:36 +0800
Subject: [PATCH] 五单元

---
 src/books/mathBook/view/components/index.vue |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/src/books/mathBook/view/components/index.vue b/src/books/mathBook/view/components/index.vue
index 415d301..65ba975 100644
--- a/src/books/mathBook/view/components/index.vue
+++ b/src/books/mathBook/view/components/index.vue
@@ -163,7 +163,7 @@
 
     // 娴嬭瘯椤甸潰璺宠浆
     // setTimeout(() => {
-    //   this.gotoPage(1, 10);
+    //   this.gotoPage(1, 9);
     //   setTimeout(() => {
     //     this.renderSign("Highlight", {
     //       id: "2ACA9359",
@@ -191,7 +191,7 @@
     //   txt: " 杩愬姩绯荤粺鏄敱楠ㄣ�侀杩炵粨鍜岄楠艰倢涓夐儴鍒嗙粍鎴愮殑銆傚叏韬殑楠ㄩ�氳繃楠ㄨ繛缁撶粍鎴愪汉浣撻楠硷紙瑙佸浘1-1锛夈�傞楠兼槸浜轰綋鐨勬敮鏋讹紝鍏锋湁淇濇姢鍐呰剰鍣ㄥ畼銆佷緵鑲岃倝闄勭潃鍜屼綔涓鸿倢鑲夎繍鍔ㄧ殑鏉犳潌绛変綔鐢ㄣ�傚湪绁炵粡绯荤粺鐨勬敮閰嶄笅锛岃倢鑲夋敹缂╃壍鍔ㄦ墍闄勭潃鐨勯缁曠潃鍏宠妭杞姩锛屼娇韬綋浜х敓鍚勭鍔ㄤ綔銆傛墍浠ワ紝杩愬姩绯荤粺鍏锋湁杩愬姩銆佹敮鎸佸拰淇濇姢绛夊姛鑳斤紝骞煎勾鏃舵湡鐨勯楠艰繕鍏锋湁閫犺鍔熻兘銆� ",
     //   txtIndex: 57
     // });
-    // }, 5000);
+    // }, 500);
 
     // 鑾峰彇棰樼洰id鍒楄〃
     this.getQuestionId();
@@ -809,9 +809,9 @@
     // 鑾峰彇棰樼洰鍒楄〃
     getQuestionId() {
       axios
-        .get(this.config.activeBook.resourceUrl + "/question-list.json")
+        .get(this.config.activeBook.resourceUrl + "/question.json")
         .then((res) => {
-          this.questionId = res.data.list;
+          this.questionId = res.data.data;
         });
     },
     // 鑾峰彇棰樼洰鏀惰棌id鍒楄〃
@@ -826,7 +826,6 @@
             const collect = JSON.parse(res[0].value);
             if (collect.length) {
               this.collectId = collect.find(item => item.type == 'json').collectList
-              console.log('鏀惰棌鍒楄〃',this.collectId);
             }
           } catch (error) {
             console.log("鏆傛棤鏁版嵁");
@@ -867,8 +866,16 @@
           if (!res.data.data) return [];
           for (let index = 0; index < res.data.data.length; index++) {
             const item = res.data.data[index];
+            // 鏁板鍏紡鍔犵被鍚嶅幓淇敼鏍峰紡
+            if(item.type && item.type == 'material') {
+              if(!item.infoList.length) return false
+              item.infoList.forEach(citem => {
+                if(citem.answer) citem.answer = citem.answer.replace(/\<math/gi, '<math class="examination-math"')
+              })
+            } else {
+              if(item.answer) item.answer = item.answer.replace(/\<math/gi, '<math class="examination-math"')
+            }
               item.isCollect = this.collectId.indexOf(item.id) > -1 ? true :false
-            console.log(item.id ,this.collectId.indexOf(item.id));
             if (this.questionId[num][page].indexOf(item.id) > -1) {
               if (item.type && item.type == "material") {
                 cardList.push(item);

--
Gitblit v1.9.1