From a465a83e33b1eea6cb311f7764b5714c01f06d7d Mon Sep 17 00:00:00 2001
From: zhongshujie <2862698242@qq.com>
Date: 星期四, 12 十二月 2024 17:01:39 +0800
Subject: [PATCH] 量表提交

---
 packageBookService/pages/bookServices/examination/examination.js |   27 ++++++++++++++++++++++-----
 1 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/packageBookService/pages/bookServices/examination/examination.js b/packageBookService/pages/bookServices/examination/examination.js
index 1fcfa73..29ac670 100644
--- a/packageBookService/pages/bookServices/examination/examination.js
+++ b/packageBookService/pages/bookServices/examination/examination.js
@@ -53,7 +53,8 @@
     startTime: "", //杩涘叆椤甸潰褰撳墠鏃堕棿
     pauseTime: 0, //鏆傚仠鏃堕棿
     showDialog: false, // 鏈彁浜ら��鍑烘嫤鎴脊绐�
-    showId: ''
+    showId: '',
+    isShowDialog: false, // 娴嬭瘯鎶ュ憡寮圭獥鏄惁鏄剧ず
   },
 
   /**
@@ -76,6 +77,7 @@
       storeInfo: options.storeInfo,
       jslx: options.jslx,
     });
+    console.log(options, 'options');
     wx.setNavigationBarTitle({
       title: options.answerTitle,
     })
@@ -85,7 +87,9 @@
         mockid: options.mockid,
       });
     }
+
     const token = wx.getStorageSync(app.config.tokenKey)
+
     if (!token) {
       loginInfo(app, (data) => {
         if (data) {
@@ -94,6 +98,8 @@
           this.init();
         }
       })
+    } else {
+      this.init()
     }
 
   },
@@ -198,6 +204,7 @@
    * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜�
    */
   onShareAppMessage() {},
+  onShareTimeline() {},
 
   // 鐩戝惉watch
   watch(context, variableName, callback) {
@@ -545,7 +552,8 @@
       submitStatus: true,
       loading: true,
     });
-    const child = this.selectComponent("#question-options");
+    const child = this.selectComponent('#question-options');
+
     if (
       this.data.answerType == "option" ||
       this.data.answerType == "errorQuestion" ||
@@ -561,7 +569,11 @@
     if (this.data.answerType == "option") {
       this.toggleCountdown();
       this.recordAnswerData();
-      child.openTestReportDialog();
+      // this.selectComponent 鎷夸笉鍒� 缁勪欢浜嗭紝 鏀逛负鐩戝惉缁勪欢浼犲�� 鎵撳紑寮圭獥
+      // child.openTestReportDialog();
+      this.setData({
+        isShowDialog: true
+      })
     } else if (
       this.data.answerType == "collectQuestion" ||
       this.data.answerType == "errorQuestion"
@@ -604,7 +616,10 @@
           }),
         }, ],
       });
-      child.openTestReportDialog();
+      // child.openTestReportDialog();
+      this.setData({
+        isShowDialog: true
+      })
     }
     this.setData({
       loading: false,
@@ -827,6 +842,7 @@
         catalogName: pathitem.name,
         infoList: [],
       });
+      console.log(pathList, "pathList");
       this.setData({
         cardList: pathList,
       });
@@ -1108,7 +1124,7 @@
       // 绠�绛� 缈昏瘧
       questionList[index].isRight = null;
     } else if (item.questionType == "completion") {
-      if (item.answer == "string") {
+      if (typeof item.answer == "string") {
         item.isRight = item.answer == item.userAnswer[0];
       } else {
         if (item.answer.length != item.userAnswer.length) {
@@ -1806,6 +1822,7 @@
         cardList: cardList,
         loading: false,
       });
+      console.log(this.data.questionDataList, "questionDataList");
     });
   },
   // 鑾峰彇缁勫嵎缁撴灉

--
Gitblit v1.9.1