From 0bbc91dbf3a58da857ef098b34f9d2f86361c766 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期四, 11 四月 2024 17:56:46 +0800
Subject: [PATCH] 答题器图标替换,图书分类页骨架屏样式修改

---
 packageBookService/pages/bookServices/examination/examination.js |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/packageBookService/pages/bookServices/examination/examination.js b/packageBookService/pages/bookServices/examination/examination.js
index f3924ad..2c5d010 100644
--- a/packageBookService/pages/bookServices/examination/examination.js
+++ b/packageBookService/pages/bookServices/examination/examination.js
@@ -30,6 +30,7 @@
     total: 0, // 棰樼洰鎬绘暟
     cardList: [], // 鎻愪氦椤�,
     questionDataList: [], // 鏄剧ず棰樼洰鍒楄〃
+    noData: false,
     mockid: 0,
     uuid: 0,
     mockData: {
@@ -46,6 +47,7 @@
     sliderValue: 0, // 瀛椾綋婊戝潡
     startTime: "", //杩涘叆椤甸潰褰撳墠鏃堕棿
     pauseTime: 0, //鏆傚仠鏃堕棿
+
   },
 
   /**
@@ -463,7 +465,6 @@
       loading: true,
     });
     const child = this.selectComponent("#question-options");
-    debugger
     if (
       this.data.answerType == "option" ||
       this.data.answerType == "errorQuestion" ||
@@ -697,7 +698,6 @@
               this.setData({
                 currentIndex: value.currentIndex,
               });
-              console.log(this.data.submitStatus);
               // 鎼哄甫绛旈璁板綍 鑾峰彇棰樼洰
               await this.getQuestionList(value.dataList);
             } else {
@@ -726,6 +726,7 @@
   async getQuestionList(oldData) {
     // 娓呯┖姝g‘棰樻暟璁板綍
     this.setData({
+      noData: false,
       cardList: [],
       correctNum: 0,
     });
@@ -765,6 +766,9 @@
         },
       };
       await app.MG.store.getProductDetail(query).then((res) => {
+        if (!res.datas.cmsDatas[0].datas.length) return this.setData({
+          noData: true
+        })
         this.setData({
           total: res.datas.cmsDatas[0].datas.length,
         });
@@ -868,6 +872,14 @@
               /\<img/gi,
               '<img style="max-width: 300rpx !important;object-fit: contain;" class="stem-rich-img" '
             );
+          }
+          // 鍚姏棰樹慨鏀�
+          if (questionObj.questionType == 'singleChoiceArr') {
+            questionObj.stem.stemTxt = questionObj.stem.stemTxt
+              .replace(
+                /\<audio/gi,
+                '<audio @play="play" '
+              )
           }
           // 鑾峰彇鍥剧墖
           if (
@@ -1196,6 +1208,7 @@
         } else {
           this.setData({
             loading: false,
+            noData: true
           });
           wx.showModal({
             title: "鎻愮ず",
@@ -1435,7 +1448,8 @@
           this.getErrorDataList();
         } else {
           this.setData({
-            loading: true,
+            loading: false,
+            noData: true
           });
           wx.showModal({
             title: "鎻愮ず",

--
Gitblit v1.9.1