From 8a27f5724e10e82cc5a30bf7051397da2e697e63 Mon Sep 17 00:00:00 2001
From: zhongshujie <2862698242@qq.com>
Date: 星期四, 19 十二月 2024 10:49:11 +0800
Subject: [PATCH] bug优化,答题卡初始化

---
 packageBookService/pages/psychologyAnswer/questionList/index.js |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/packageBookService/pages/psychologyAnswer/questionList/index.js b/packageBookService/pages/psychologyAnswer/questionList/index.js
index e6934a4..a9e9ee6 100644
--- a/packageBookService/pages/psychologyAnswer/questionList/index.js
+++ b/packageBookService/pages/psychologyAnswer/questionList/index.js
@@ -69,9 +69,11 @@
   ready() {
     const query = wx.createSelectorQuery().in(this);
     query.select('#question-title').boundingClientRect((rect) => {
-      this.setData({
-        height: 'calc(100% - 30px - ' + rect.height + 'px)'
-      })
+      if (rect) {
+        this.setData({
+          height: 'calc(100% - 30px - ' + rect.height + 'px)'
+        })
+      }
     }).exec();
   },
 

--
Gitblit v1.9.1