From 253245731d2b0c5ea4994a9c4e17ad6b60136f2c Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期二, 09 四月 2024 15:38:26 +0800
Subject: [PATCH] 答题器提交功能优化

---
 packageBookService/pages/bookServices/examination/questionList/index.wxss     |    5 
 packageBookService/pages/bookServices/examination/questionList/index.wxml     |   25 +-
 packageBookService/pages/bookServices/examination/examination.js              |  299 +++++++++++++++++++----------------------
 packageBookService/pages/bookServices/examination/questionSchedule/index.wxml |    4 
 packageBookService/pages/bookServices/detail/components/tree/index.js         |   31 +--
 packageBookService/pages/bookServices/examination/questionOptions/index.js    |   14 +
 assets/js/config.js                                                           |   15 +-
 packageBookService/pages/bookServices/examination/examination.wxml            |    7 
 packageBookService/pages/bookServices/examination/questionOptions/index.wxss  |    8 
 packageBookService/pages/bookServices/examination/questionOptions/index.wxml  |   10 +
 10 files changed, 206 insertions(+), 212 deletions(-)

diff --git a/assets/js/config.js b/assets/js/config.js
index 71c32a2..c98d8ff 100644
--- a/assets/js/config.js
+++ b/assets/js/config.js
@@ -1,13 +1,13 @@
-// export const requestCtx = "http://182.92.203.7:3001"; // 璇锋眰鍦板潃
-// export const appId = 27;
-export const requestCtx = "https://jsek.bnuic.com" // 璇锋眰鍦板潃
-export const appId = 3;
+export const requestCtx = "http://182.92.203.7:3001"; // 璇锋眰鍦板潃
+export const appId = 27;
+// export const requestCtx = "https://jsek.bnuic.com"; // 璇锋眰鍦板潃
+// export const appId = 3;
 // export const epubUrl = "http://182.92.203.7:3007/epubReadMobile/";
 export const epubUrl = "https://jsek.bnuic.com/epubReadMobile/#/";
-export const pdfUrl = "http://182.92.203.7:3007/pdfRead/"
+export const pdfUrl = "http://182.92.203.7:3007/pdfRead/";
 export const requestTimeOut = 300000; // 璇锋眰瓒呮椂鏃堕棿
 export const tokenKey = "jsek-token";
-export const userInfoKey = "website-front-userInfo"; // 鐢ㄦ埛淇℃伅key 
+export const userInfoKey = "website-front-userInfo"; // 鐢ㄦ埛淇℃伅key
 export const appRefCode = "jingshieke";
 export const goodsStore = `defaultGoodsStore${appId}`; // 榛樿鍟嗗搧搴�(涔﹀煄)
 export const publicStore = `defaultPublicStore${appId}`; // 榛樿璧勬簮寮�鏀句粨鍌�
@@ -22,7 +22,6 @@
 export const reg_tel =
   /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/; // 鐢佃瘽鍙锋鍒�
 export const reg_telphone = /^0\d{2}-\d{8}$|^0\d{3}-\d{7}$/; //搴ф満鍙锋鍒�
-
 
 const config = {
   requestCtx,
@@ -39,6 +38,6 @@
   reg_telphone,
   epubUrl,
   pdfUrl,
-  appId
+  appId,
 };
 export default config;
\ No newline at end of file
diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.js b/packageBookService/pages/bookServices/detail/components/tree/index.js
index d946ea5..21163eb 100644
--- a/packageBookService/pages/bookServices/detail/components/tree/index.js
+++ b/packageBookService/pages/bookServices/detail/components/tree/index.js
@@ -1,5 +1,7 @@
 const util = require("./components/util"); // 寮曞叆灏佽杩囩殑鍔犺浇鎻愮ず
-import { loginInfo } from "../../../../../../assets/js/login";
+import {
+  loginInfo
+} from "../../../../../../assets/js/login";
 const app = getApp();
 Component({
   // checked: false,
@@ -83,8 +85,7 @@
     handleList(tree) {
       for (let index = 0; index < tree.length; index++) {
         const item = tree[index];
-        if (item.sysType == "CmsItem" && !item.checked) {
-        }
+        if (item.sysType == "CmsItem" && !item.checked) {}
         if (item.children && item.children.length > 0) {
           this.handleList(item.children);
         }
@@ -164,10 +165,9 @@
         ) {
           return wx.showToast({
             icon: "error",
-            title:
-              item.saleMethod[0].Price > 0
-                ? "璇峰厛璐拱璇ヨ祫婧�"
-                : "璇峰厛鐐瑰嚮棰嗗彇鏌ョ湅鎸夐挳",
+            title: item.saleMethod[0].Price > 0 ?
+              "璇峰厛璐拱璇ヨ祫婧�" :
+              "璇峰厛鐐瑰嚮棰嗗彇鏌ョ湅鎸夐挳",
           });
         }
         wx.navigateTo({
@@ -383,13 +383,10 @@
         this.properties.treeList,
         citem.id
       );
-      console.log(citem.checked, "citem.checked");
       if (!citem.checked) {
         //閫変腑鐨勬椂鍊欐坊鍔爄d
         let sonPurchaseSaleMethodId = this.data.sonPurchaseSaleMethodId || [];
-        console.log(this.properties.paymentPage, "this.properties.paymentPage");
         if (this.properties.paymentPage) {
-          console.log(789987);
           sonPurchaseSaleMethodId = [];
           this.properties.paymentPage = false;
         }
@@ -437,13 +434,11 @@
         });
       } else {
         let query = {
-          requests: [
-            {
-              saleMethodId: saleMethodId,
-              storeEventId: null,
-              // agentCode: '鐢靛瓙涔�'
-            },
-          ],
+          requests: [{
+            saleMethodId: saleMethodId,
+            storeEventId: null,
+            // agentCode: '鐢靛瓙涔�'
+          }, ],
         };
         const addRes = await app.MG.store.addShoppingCart(query);
         console.log(addRes, "addRes");
@@ -461,4 +456,4 @@
   },
 
   catchtap() {},
-});
+});
\ No newline at end of file
diff --git a/packageBookService/pages/bookServices/examination/examination.js b/packageBookService/pages/bookServices/examination/examination.js
index 108f1e6..f3924ad 100644
--- a/packageBookService/pages/bookServices/examination/examination.js
+++ b/packageBookService/pages/bookServices/examination/examination.js
@@ -1,4 +1,6 @@
-import { getPublicImage } from "../../../../assets/js/middleGround/tool";
+import {
+  getPublicImage
+} from "../../../../assets/js/middleGround/tool";
 const app = getApp();
 Page({
   /**
@@ -193,6 +195,12 @@
       },
     });
   },
+  // 鏀瑰彉loading鐘舵��
+  changeLoadingState() {
+    this.setData({
+      loading: true
+    })
+  },
   // 杩斿洖鎷︽埅
   beforeleave() {
     wx.showModal({
@@ -201,8 +209,7 @@
       confirmColor: "#ff6c00",
       cancelColor: "#949494",
       complete: (res) => {
-        if (res.cancel) {
-        }
+        if (res.cancel) {}
         if (res.confirm) {
           this.setData({
             submitStatus: true,
@@ -456,6 +463,7 @@
       loading: true,
     });
     const child = this.selectComponent("#question-options");
+    debugger
     if (
       this.data.answerType == "option" ||
       this.data.answerType == "errorQuestion" ||
@@ -505,16 +513,14 @@
         });
       }
       app.MG.identity.setUserKey({
-        setKeyRequests: [
-          {
-            domain: "mockAnswerData",
-            key: this.data.uuid,
-            value: JSON.stringify({
-              time: this.data.countdownTime,
-              answerData: saveData,
-            }),
-          },
-        ],
+        setKeyRequests: [{
+          domain: "mockAnswerData",
+          key: this.data.uuid,
+          value: JSON.stringify({
+            time: this.data.countdownTime,
+            answerData: saveData,
+          }),
+        }, ],
       });
       child.openTestReportDialog();
     }
@@ -633,16 +639,14 @@
       // 缁勫嵎妯″紡
       // 娓呯┖绛旈璁板綍
       await app.MG.identity.setUserKey({
-        setKeyRequests: [
-          {
-            domain: "mockAnswerData",
-            key: this.data.uuid,
-            value: JSON.stringify({
-              time: this.data.countdownTime,
-              answerData: [],
-            }),
-          },
-        ],
+        setKeyRequests: [{
+          domain: "mockAnswerData",
+          key: this.data.uuid,
+          value: JSON.stringify({
+            time: this.data.countdownTime,
+            answerData: [],
+          }),
+        }, ],
       });
       this.init();
     } else {
@@ -783,34 +787,26 @@
             // num: index, // 棰樺彿
             id: item.id,
             type: pathitem.name,
-            stem:
-              item.Embedded_QuestionBank_QuestionType == "completion"
-                ? JSON.parse(item.Embedded_QuestionBank_Stem)
-                    .stemTxt.replaceAll("<vacancy>", ",input,")
-                    .split(",")
-                : JSON.parse(item.Embedded_QuestionBank_Stem), // 棰樺共
+            stem: item.Embedded_QuestionBank_QuestionType == "completion" ?
+              JSON.parse(item.Embedded_QuestionBank_Stem)
+              .stemTxt.replaceAll("<vacancy>", ",input,")
+              .split(",") : JSON.parse(item.Embedded_QuestionBank_Stem), // 棰樺共
             answer: item.Embedded_QuestionBank_Answer, // 绛旀
-            option: item.Embedded_QuestionBank_Option
-              ? JSON.parse(item.Embedded_QuestionBank_Option)
-              : "", // 閫夋嫨棰橀�夐」
+            option: item.Embedded_QuestionBank_Option ?
+              JSON.parse(item.Embedded_QuestionBank_Option) : "", // 閫夋嫨棰橀�夐」
             analysisCon: item.Embedded_QuestionBank_AnalysisCon, // 瑙f瀽
             questionType: item.Embedded_QuestionBank_QuestionType, // 棰樺瀷
             optionStyle: item.Embedded_QuestionBank_OptionStyle, // 閫夐」鏄剧ず绫诲瀷
             stemStyle: item.Embedded_QuestionBank_StemStyle, // 棰樺共鏄剧ず绫诲瀷
-            difficulty: item.Embedded_QuestionBank_Difficulty
-              ? 4 - item.Embedded_QuestionBank_Difficulty
-              : 0, // 闅惧害绛夌骇
-            userAnswer: oldObj
-              ? oldObj.userAnswer
-              : item.Embedded_QuestionBank_QuestionType == "completion" ||
-                item.Embedded_QuestionBank_QuestionType == "multipleChoice"
-              ? []
-              : "",
+            difficulty: item.Embedded_QuestionBank_Difficulty ?
+              4 - item.Embedded_QuestionBank_Difficulty : 0, // 闅惧害绛夌骇
+            userAnswer: oldObj ?
+              oldObj.userAnswer : item.Embedded_QuestionBank_QuestionType == "completion" ||
+              item.Embedded_QuestionBank_QuestionType == "multipleChoice" ? [] : "",
             isUserAnswer: oldObj ? this.isHaveAnswer(oldObj.userAnswer) : false,
             isRight: oldObj ? oldObj.isRight : null,
             isComplete: oldObj ? oldObj.isComplete : false,
-            isCollect:
-              this.data.collectList.indexOf(item.id) > -1 ? true : false,
+            isCollect: this.data.collectList.indexOf(item.id) > -1 ? true : false,
             isUnfold: "", // 鎺у埗瑙f瀽鐨勬姌鍙犻潰鏉挎槸鍚﹀睍寮�
           };
           // 澶氶�夊拰濉┖绛旀鑲负鏁扮粍锛岃杞崲JSON鏍煎紡
@@ -859,8 +855,8 @@
             questionObj.option.forEach((item) => {
               if (item.txt)
                 item.txt = item.txt
-                  .replace(/\<img/gi, '<img class="option-rich-img"')
-                  .replace(/\<p/gi, '<p class="stem-rich-p"');
+                .replace(/\<img/gi, '<img class="option-rich-img"')
+                .replace(/\<p/gi, '<p class="stem-rich-p"');
             });
           }
           // 瑙f瀽瀵屾枃鏈鐞�
@@ -1047,13 +1043,11 @@
       // 璁板綍閿欓
       app.MG.identity
         .setUserKey({
-          setKeyRequests: [
-            {
-              domain: "errorData",
-              key: this.data.rootCmsItemId,
-              value: JSON.stringify(this.data.errorList),
-            },
-          ],
+          setKeyRequests: [{
+            domain: "errorData",
+            key: this.data.rootCmsItemId,
+            value: JSON.stringify(this.data.errorList),
+          }, ],
         })
         .then((res) => {
           console.log(res);
@@ -1111,13 +1105,11 @@
     }
     app.MG.identity
       .setUserKey({
-        setKeyRequests: [
-          {
-            domain: "collectData",
-            key: this.data.rootCmsItemId,
-            value: JSON.stringify(this.data.collectList),
-          },
-        ],
+        setKeyRequests: [{
+          domain: "collectData",
+          key: this.data.rootCmsItemId,
+          value: JSON.stringify(this.data.collectList),
+        }, ],
       })
       .then((res) => {});
   },
@@ -1156,17 +1148,15 @@
   setAnswerInfo(data) {
     app.MG.identity
       .setUserKey({
-        setKeyRequests: [
-          {
-            domain: "answerData",
-            key: this.data.productLinkPath,
-            value: JSON.stringify(data),
-          },
-        ],
+        setKeyRequests: [{
+          domain: "answerData",
+          key: this.data.productLinkPath,
+          value: JSON.stringify(data),
+        }, ],
       })
       .then((res) => {});
   },
-  // 鑾峰彇绛旈鏁版嵁
+  // 鑾峰彇鏃х瓟棰樻暟鎹�
   getAnswerInfo(callback) {
     app.MG.identity
       .getUserKey({
@@ -1177,7 +1167,7 @@
         if (callback) callback(res);
       });
   },
-  // 鍒犻櫎绛旈鏁版嵁
+  // 鍒犻櫎鏃х瓟棰樻暟鎹�
   delAnswerInfo(callback) {
     app.MG.identity
       .delUserKey({
@@ -1230,8 +1220,7 @@
   async getCollectDataList() {
     let questionArr = [];
     this.setData({
-      cardList: [
-        {
+      cardList: [{
           catalogName: "鍗曢�夐",
           infoList: [],
         },
@@ -1285,28 +1274,21 @@
           const questionObj = {
             number: index + 1, // 棰樺彿
             id: item.id,
-            stem:
-              item.Embedded_QuestionBank_QuestionType == "completion"
-                ? JSON.parse(item.Embedded_QuestionBank_Stem)
-                    .stemTxt.replaceAll("<vacancy>", ",input,")
-                    .split(",")
-                : JSON.parse(item.Embedded_QuestionBank_Stem), // 棰樺共
+            stem: item.Embedded_QuestionBank_QuestionType == "completion" ?
+              JSON.parse(item.Embedded_QuestionBank_Stem)
+              .stemTxt.replaceAll("<vacancy>", ",input,")
+              .split(",") : JSON.parse(item.Embedded_QuestionBank_Stem), // 棰樺共
             answer: item.Embedded_QuestionBank_Answer, // 绛旀
-            option: item.Embedded_QuestionBank_Option
-              ? JSON.parse(item.Embedded_QuestionBank_Option)
-              : "", // 閫夋嫨棰橀�夐」
+            option: item.Embedded_QuestionBank_Option ?
+              JSON.parse(item.Embedded_QuestionBank_Option) : "", // 閫夋嫨棰橀�夐」
             analysisCon: item.Embedded_QuestionBank_AnalysisCon, // 瑙f瀽
             questionType: item.Embedded_QuestionBank_QuestionType, // 棰樺瀷
             optionStyle: item.Embedded_QuestionBank_OptionStyle, // 閫夐」鏄剧ず绫诲瀷
             stemStyle: item.Embedded_QuestionBank_StemStyle, // 棰樺共鏄剧ず绫诲瀷
-            difficulty: item.Embedded_QuestionBank_Difficulty
-              ? 4 - item.Embedded_QuestionBank_Difficulty
-              : 0, // 闅惧害绛夌骇
-            userAnswer:
-              item.Embedded_QuestionBank_QuestionType == "completion" ||
-              item.Embedded_QuestionBank_QuestionType == "multipleChoice"
-                ? []
-                : "",
+            difficulty: item.Embedded_QuestionBank_Difficulty ?
+              4 - item.Embedded_QuestionBank_Difficulty : 0, // 闅惧害绛夌骇
+            userAnswer: item.Embedded_QuestionBank_QuestionType == "completion" ||
+              item.Embedded_QuestionBank_QuestionType == "multipleChoice" ? [] : "",
             isSubmit: false, // 鏌ョ湅瑙f瀽
             isRight: null, // 鏄惁姝g‘
             isComplete: false,
@@ -1377,9 +1359,19 @@
             questionObj.option.forEach((item) => {
               if (item.txt)
                 item.txt = item.txt
-                  .replace(/\<img/gi, '<img class="option-rich-img"')
-                  .replace(/\<p/gi, '<p class="stem-rich-p"');
+                .replace(/\<img/gi, '<img class="option-rich-img"')
+                .replace(/\<p/gi, '<p class="stem-rich-p"');
             });
+          }
+          // 瑙f瀽瀵屾枃鏈鐞�
+          if (
+            questionObj.analysisCon &&
+            typeof questionObj.analysisCon == "string"
+          ) {
+            questionObj.analysisCon = questionObj.analysisCon.replace(
+              /\<img/gi,
+              '<img style="max-width: 300rpx !important;object-fit: contain;" class="stem-rich-img" '
+            );
           }
           if (item.Embedded_QuestionBank_QuestionType == "judge") {
             questionObj.type = "鍒ゆ柇棰�";
@@ -1467,8 +1459,7 @@
   // 鑾峰彇閿欓闆�
   async getErrorDataList() {
     this.setData({
-      cardList: [
-        {
+      cardList: [{
           catalogName: "鍗曢�夐",
           infoList: [],
         },
@@ -1520,28 +1511,21 @@
         const questionObj = {
           number: index + 1, // 棰樺彿
           id: item.id,
-          stem:
-            item.Embedded_QuestionBank_QuestionType == "completion"
-              ? JSON.parse(item.Embedded_QuestionBank_Stem)
-                  .stemTxt.replaceAll("<vacancy>", ",input,")
-                  .split(",")
-              : JSON.parse(item.Embedded_QuestionBank_Stem), // 棰樺共
+          stem: item.Embedded_QuestionBank_QuestionType == "completion" ?
+            JSON.parse(item.Embedded_QuestionBank_Stem)
+            .stemTxt.replaceAll("<vacancy>", ",input,")
+            .split(",") : JSON.parse(item.Embedded_QuestionBank_Stem), // 棰樺共
           answer: item.Embedded_QuestionBank_Answer, // 绛旀
-          option: item.Embedded_QuestionBank_Option
-            ? JSON.parse(item.Embedded_QuestionBank_Option)
-            : "", // 閫夋嫨棰橀�夐」
+          option: item.Embedded_QuestionBank_Option ?
+            JSON.parse(item.Embedded_QuestionBank_Option) : "", // 閫夋嫨棰橀�夐」
           analysisCon: item.Embedded_QuestionBank_AnalysisCon, // 瑙f瀽
           questionType: item.Embedded_QuestionBank_QuestionType, // 棰樺瀷
           optionStyle: item.Embedded_QuestionBank_OptionStyle, // 閫夐」鏄剧ず绫诲瀷
           stemStyle: item.Embedded_QuestionBank_StemStyle, // 棰樺共鏄剧ず绫诲瀷
-          difficulty: item.Embedded_QuestionBank_Difficulty
-            ? 4 - item.Embedded_QuestionBank_Difficulty
-            : 0, // 闅惧害绛夌骇
-          userAnswer:
-            item.Embedded_QuestionBank_QuestionType == "completion" ||
-            item.Embedded_QuestionBank_QuestionType == "multipleChoice"
-              ? []
-              : "",
+          difficulty: item.Embedded_QuestionBank_Difficulty ?
+            4 - item.Embedded_QuestionBank_Difficulty : 0, // 闅惧害绛夌骇
+          userAnswer: item.Embedded_QuestionBank_QuestionType == "completion" ||
+            item.Embedded_QuestionBank_QuestionType == "multipleChoice" ? [] : "",
           isSubmit: false, // 鏌ョ湅瑙f瀽
           isRight: null, // 鏄惁姝g‘
           isComplete: false,
@@ -1614,9 +1598,19 @@
           questionObj.option.forEach((item) => {
             if (item.txt)
               item.txt = item.txt
-                .replace(/\<img/gi, '<img class="option-rich-img"')
-                .replace(/\<p/gi, '<p class="stem-rich-p"');
+              .replace(/\<img/gi, '<img class="option-rich-img"')
+              .replace(/\<p/gi, '<p class="stem-rich-p"');
           });
+        }
+        // 瑙f瀽瀵屾枃鏈鐞�
+        if (
+          questionObj.analysisCon &&
+          typeof questionObj.analysisCon == "string"
+        ) {
+          questionObj.analysisCon = questionObj.analysisCon.replace(
+            /\<img/gi,
+            '<img style="max-width: 300rpx !important;object-fit: contain;" class="stem-rich-img" '
+          );
         }
         if (item.Embedded_QuestionBank_QuestionType == "judge") {
           questionObj.type = "鍒ゆ柇棰�";
@@ -1798,35 +1792,27 @@
             id: item.id,
             score: pathitem.infoList.find((infoItem) => infoItem.id == item.id)
               .score,
-            stem:
-              item.Embedded_QuestionBank_QuestionType == "completion"
-                ? JSON.parse(item.Embedded_QuestionBank_Stem)
-                    .stemTxt.replaceAll("<vacancy>", ",input,")
-                    .split(",")
-                : JSON.parse(item.Embedded_QuestionBank_Stem), // 棰樺共
+            stem: item.Embedded_QuestionBank_QuestionType == "completion" ?
+              JSON.parse(item.Embedded_QuestionBank_Stem)
+              .stemTxt.replaceAll("<vacancy>", ",input,")
+              .split(",") : JSON.parse(item.Embedded_QuestionBank_Stem), // 棰樺共
             answer: item.Embedded_QuestionBank_Answer, // 绛旀
-            option: item.Embedded_QuestionBank_Option
-              ? JSON.parse(item.Embedded_QuestionBank_Option)
-              : "", // 閫夋嫨棰橀�夐」
+            option: item.Embedded_QuestionBank_Option ?
+              JSON.parse(item.Embedded_QuestionBank_Option) : "", // 閫夋嫨棰橀�夐」
             analysisCon: item.Embedded_QuestionBank_AnalysisCon, // 瑙f瀽
             questionType: item.Embedded_QuestionBank_QuestionType, // 棰樺瀷
             optionStyle: item.Embedded_QuestionBank_OptionStyle, // 閫夐」鏄剧ず绫诲瀷
             stemStyle: item.Embedded_QuestionBank_StemStyle, // 棰樺共鏄剧ず绫诲瀷
-            difficulty: item.Embedded_QuestionBank_Difficulty
-              ? 4 - item.Embedded_QuestionBank_Difficulty
-              : 0, // 闅惧害绛夌骇
-            userAnswer: oldObj
-              ? oldObj.answer
-              : item.Embedded_QuestionBank_QuestionType == "completion" ||
-                item.Embedded_QuestionBank_QuestionType == "multipleChoice"
-              ? []
-              : "",
-            isUserAnswer: oldObj ? this.isHaveAnswer(oldObj.userAnswer) : false,
+            difficulty: item.Embedded_QuestionBank_Difficulty ?
+              4 - item.Embedded_QuestionBank_Difficulty : 0, // 闅惧害绛夌骇
+            userAnswer: oldObj ?
+              oldObj.answer : item.Embedded_QuestionBank_QuestionType == "completion" ||
+              item.Embedded_QuestionBank_QuestionType == "multipleChoice" ? [] : "",
+            isUserAnswer: oldObj ? this.isHaveAnswer(oldObj.answer) : false,
             isRight: oldObj ? oldObj.isRight : null,
             // isComplete: oldObj ? oldObj.isComplete : false,
             isComplete: this.data.mockData.state == "3" ? true : false,
-            isCollect:
-              this.data.collectList.indexOf(item.id) > -1 ? true : false,
+            isCollect: this.data.collectList.indexOf(item.id) > -1 ? true : false,
             isUnfold: "", // 鎺у埗瑙f瀽鐨勬姌鍙犻潰鏉挎槸鍚﹀睍寮�
           };
           // 澶氶�夊拰濉┖绛旀鑲负鏁扮粍锛岃杞崲JSON鏍煎紡
@@ -1957,26 +1943,22 @@
   // 璁板綍璐拱缁勫嵎鏃堕棿
   setMockInfo(data) {
     app.MG.identity.setUserKey({
-      setKeyRequests: [
-        {
-          domain: "mockData",
-          key: this.data.bookId + "",
-          value: JSON.stringify(data),
-        },
-      ],
+      setKeyRequests: [{
+        domain: "mockData",
+        key: this.data.bookId + "",
+        value: JSON.stringify(data),
+      }, ],
     });
   },
   // 璁板綍缁勫嵎棰樼洰鍒楄〃
   saveMockQuestionList(data) {
     app.MG.identity
       .setUserKey({
-        setKeyRequests: [
-          {
-            domain: "mockQuestionData",
-            key: this.data.uuid,
-            value: JSON.stringify(data),
-          },
-        ],
+        setKeyRequests: [{
+          domain: "mockQuestionData",
+          key: this.data.uuid,
+          value: JSON.stringify(data),
+        }, ],
       })
       .then((res) => {
         console.log("妯¤�冮鐩垪琛ㄥ凡璁板綍");
@@ -2008,9 +1990,8 @@
           this.setData({
             currentIndex: JSON.parse(res[0].value).currentIndex,
             "mockData.time": JSON.parse(res[0].value).time,
-            countdownTime: JSON.parse(res[0].value).time
-              ? JSON.parse(res[0].value).time
-              : this.data.mockData.sumTime,
+            countdownTime: JSON.parse(res[0].value).time ?
+              JSON.parse(res[0].value).time : this.data.mockData.sumTime,
             "mockData.answer": JSON.parse(res[0].value).answerData,
           });
           console.log(JSON.parse(res[0].value));
@@ -2054,17 +2035,15 @@
     //
     app.MG.identity
       .setUserKey({
-        setKeyRequests: [
-          {
-            domain: "mockAnswerData",
-            key: this.data.uuid,
-            value: JSON.stringify({
-              currentIndex: this.data.currentIndex,
-              time: this.data.countdownTime,
-              answerData: saveData,
-            }),
-          },
-        ],
+        setKeyRequests: [{
+          domain: "mockAnswerData",
+          key: this.data.uuid,
+          value: JSON.stringify({
+            currentIndex: this.data.currentIndex,
+            time: this.data.countdownTime,
+            answerData: saveData,
+          }),
+        }, ],
       })
       .then((res) => {
         this.setData({
@@ -2110,4 +2089,4 @@
     );
     return newContent;
   },
-});
+});
\ No newline at end of file
diff --git a/packageBookService/pages/bookServices/examination/examination.wxml b/packageBookService/pages/bookServices/examination/examination.wxml
index 588d13e..9c74b48 100644
--- a/packageBookService/pages/bookServices/examination/examination.wxml
+++ b/packageBookService/pages/bookServices/examination/examination.wxml
@@ -67,7 +67,11 @@
 
 <!-- 搴曢儴鍖哄煙-->
 
-<view class="page-bottom" style="background-color:{{isNight ? '#202020' : ''}}">
+<view
+  class="page-bottom"
+  style="background-color:{{isNight ? '#202020' : ''}}"
+  wx:if="{{answerType == 'mock' ||  answerType == 'option' || (answerType == 'errorQuestion' && !loading) || (answerType == 'collectQuestion' && !loading) }}"
+>
   <question-options
     id="question-options"
     isNight="{{isNight}}"
@@ -88,6 +92,7 @@
     bind:goQuestion="goQuestion"
     bind:changeBGColor="changeBGColor"
     bind:onChangeSlider="onChangeSlider"
+    bind:changeLoadingState="changeLoadingState"
   ></question-options>
 </view>
 
diff --git a/packageBookService/pages/bookServices/examination/questionList/index.wxml b/packageBookService/pages/bookServices/examination/questionList/index.wxml
index 73943a5..e574660 100644
--- a/packageBookService/pages/bookServices/examination/questionList/index.wxml
+++ b/packageBookService/pages/bookServices/examination/questionList/index.wxml
@@ -140,14 +140,14 @@
                     style="display: flex; align-items: center; width: 100%"
                   ></rich-text>
                 </view>
-                <text
+                <!-- <text
                   wx:if="{{submitStatus && (item.answer == contentItem.value && item.answer == item.userAnswer)}}"
                   >瀵�</text
                 >
                 <text
                   wx:if="{{ submitStatus && (item.userAnswer == contentItem.value && item.userAnswer != item.answer)}}"
                   >閿�</text
-                >
+                > -->
               </view>
             </t-radio>
           </view>
@@ -259,7 +259,7 @@
         class="analysis"
         wx:if="{{item.isComplete && (item.questionType == 'singleChoice' || item.questionType == 'judge' || item.questionType == 'multipleChoice')}}"
       >
-        <view class="analysis-answer">
+        <view class="analysis-answer {{sliderValue >35 ? 'fl-cl' : '' }}">
           <view
             class="answer-correct answer-center"
             style="font-size: {{sliderValue || 32}}rpx;"
@@ -271,7 +271,7 @@
             ></rich-text>
           </view>
           <view
-            class="answer-center marginL {{item.isRight ? 'answer-correct' : 'answer-error'}}"
+            class="answer-center  {{item.isRight ? 'answer-correct' : 'answer-error'}}  {{sliderValue <= 35 ? 'marginL' : ''}}"
             wx:if="{{item.questionType !== 'shortAnswer'}}"
           >
             <text
@@ -290,7 +290,11 @@
           wx:if="{{item.analysisCon}}"
           style="color: {{isNight ? '#fff' : '#000'}};"
         >
-          <text style="font-size: {{sliderValue || 32}}rpx;" class="answer-analysis">绛旀瑙f瀽锛�</text>
+          <text
+            style="font-size: {{sliderValue || 32}}rpx;"
+            class="answer-analysis"
+            >绛旀瑙f瀽锛�</text
+          >
           <rich-text
             style="font-size: {{sliderValue || 32}}rpx;"
             nodes="{{item.analysisCon}}"
@@ -315,7 +319,7 @@
           <text
             wx:if="{{item.questionType == 'shortAnswer'}}"
             class="short-answer-fz"
-            style="color:{{isNight ? '#fff' : '#000'}};font-size:{{sliderValue || 28}}rpx;"
+            style="color:{{isNight ? '#fff' : '#000'}};font-size:{{sliderValue || 32}}rpx;"
           >
             鍙傝�冪瓟妗堬細
           </text>
@@ -338,7 +342,7 @@
         >
           <text
             class="short-answer-fz {{item.isRight ? 'answer-correct' : 'answer-error'}}"
-            style="font-size:{{sliderValue || 28}}rpx;"
+            style="font-size:{{sliderValue || 32}}rpx;"
             >鎮ㄧ殑绛旀锛�</text
           >
           <view
@@ -350,7 +354,7 @@
         <view class="short-answer-mr" style="margin-bottom: 50rpx">
           <text
             class="short-answer-fz;"
-            style="color:{{isNight ? '#fff' : '#000'}};font-size:{{sliderValue || 28}}rpx;"
+            style="color:{{isNight ? '#fff' : '#000'}};font-size:{{sliderValue || 32}}rpx;"
             >绛旀瑙f瀽锛�</text
           >
           <rich-text
@@ -359,11 +363,6 @@
           ></rich-text>
         </view>
       </view>
-    </swiper-item>
-    <swiper-item
-      wx:if="{{answerType !== 'collectQuestion' && questionList.length}}"
-    >
-      <text>娌℃湁鏇村浜嗐�傘�傘��</text>
     </swiper-item>
     <swiper-item wx:if="{{!questionList.length}}">
       <view class="noData">
diff --git a/packageBookService/pages/bookServices/examination/questionList/index.wxss b/packageBookService/pages/bookServices/examination/questionList/index.wxss
index fab99bc..149efe8 100644
--- a/packageBookService/pages/bookServices/examination/questionList/index.wxss
+++ b/packageBookService/pages/bookServices/examination/questionList/index.wxss
@@ -270,4 +270,9 @@
 .answer-analysis {
   display: inline-block;
   width: 192rpx;
+}
+
+.fl-cl {
+  display: flex;
+  flex-direction: column;
 }
\ No newline at end of file
diff --git a/packageBookService/pages/bookServices/examination/questionOptions/index.js b/packageBookService/pages/bookServices/examination/questionOptions/index.js
index 40919c9..085c692 100644
--- a/packageBookService/pages/bookServices/examination/questionOptions/index.js
+++ b/packageBookService/pages/bookServices/examination/questionOptions/index.js
@@ -85,7 +85,7 @@
       if (
         newValue == 0 &&
         (this.properties.answerType == "option" ||
-          this.properties.answerType == "mock")
+          this.properties.answerType == "mock") && !this.properties.submitStatus
       ) {
         this.timeout();
       }
@@ -172,7 +172,9 @@
     onChangeSlider(e) {
       const value = e.detail.value;
       console.log(value);
-      this.triggerEvent("onChangeSlider", { value });
+      this.triggerEvent("onChangeSlider", {
+        value
+      });
     },
     // 璁剧疆閬僵灞傜偣鍑�
     onSetUpChange(e) {
@@ -191,7 +193,9 @@
         frontColor: "#222",
       });
 
-      this.triggerEvent("changeBGColor", { value });
+      this.triggerEvent("changeBGColor", {
+        value
+      });
     },
     // 閲嶅仛鎸夐挳
     resterBtn() {
@@ -244,7 +248,7 @@
         this.properties.answerType == "errorQuestion"
       ) {
         this.submitPaper();
-        return wx.navigateBack();
+        // wx.navigateBack();
       } else if (
         this.properties.answerType == "option" ||
         this.properties.answerType == "mock"
@@ -305,4 +309,4 @@
       this.submitPaper();
     },
   },
-});
+});
\ No newline at end of file
diff --git a/packageBookService/pages/bookServices/examination/questionOptions/index.wxml b/packageBookService/pages/bookServices/examination/questionOptions/index.wxml
index 3179207..270bd18 100644
--- a/packageBookService/pages/bookServices/examination/questionOptions/index.wxml
+++ b/packageBookService/pages/bookServices/examination/questionOptions/index.wxml
@@ -67,11 +67,17 @@
       <view class="popup-title">绛旈鍗�</view>
     </view>
     <view class="question-explain">
-      <view class="explain-answered">
+      <view
+        class="explain-answered"
+        wx:if="{{answerType == 'collectQuestion' || answerType == 'errorQuestion' || (answerType == 'option' && !submitStatus) || (answerType == 'mock' && !submitStatus)}}"
+      >
         <text class="answered explain-color-box"></text>
         <text>宸茬瓟</text>
       </view>
-      <view class="explain-un-answered">
+      <view
+        class="explain-un-answered"
+        wx:if="{{answerType == 'collectQuestion' || answerType == 'errorQuestion' || (answerType == 'option' && !submitStatus) || (answerType == 'mock' && !submitStatus)}}"
+      >
         <text class="un-answered explain-color-box"></text>
         <text>鏈瓟</text>
       </view>
diff --git a/packageBookService/pages/bookServices/examination/questionOptions/index.wxss b/packageBookService/pages/bookServices/examination/questionOptions/index.wxss
index 4df83a5..713cfc9 100644
--- a/packageBookService/pages/bookServices/examination/questionOptions/index.wxss
+++ b/packageBookService/pages/bookServices/examination/questionOptions/index.wxss
@@ -137,13 +137,13 @@
 }
 
 .error-box-color {
-  background-color: #EE1818;
-  color: #fff;
+  background-color: #EE1818 !important;
+  color: #fff !important;
 }
 
 .correct-box-color {
-  background-color: #1FBC1F;
-  color: #fff;
+  background-color: #1FBC1F !important;
+  color: #fff !important;
 }
 
 .un-answered {
diff --git a/packageBookService/pages/bookServices/examination/questionSchedule/index.wxml b/packageBookService/pages/bookServices/examination/questionSchedule/index.wxml
index 6b9891a..825d698 100644
--- a/packageBookService/pages/bookServices/examination/questionSchedule/index.wxml
+++ b/packageBookService/pages/bookServices/examination/questionSchedule/index.wxml
@@ -21,7 +21,9 @@
       class="remainder"
       wx:if="{{!submitStatus && (answerType == 'option' || answerType == 'mock')}}"
       style="color:  {{isNight ? '#fff' : '#000'}};"
-      >鍓╀綑鏃堕棿 <text class="parimary-color">{{showTime}}</text></view
+    >
+      <text>鍓╀綑鏃堕棿 </text>
+      <text class="parimary-color">{{showTime}}</text></view
     >
   </view>
   <!-- 杩涘害鏉� -->

--
Gitblit v1.9.1