natasha 1 éve
szülő
commit
694843e7cb

+ 17 - 15
src/components/Adult/Preview.vue

@@ -1169,7 +1169,7 @@ export default {
   },
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
   // 生命周期 - 创建完成(可以访问当前this实例)
   created() {
   created() {
-    console.log("2023-12-15 17:22");
+    console.log("2024-01-15 17:22");
   },
   },
   // 生命周期 - 挂载完成(可以访问DOM元素)
   // 生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
   mounted() {
@@ -1214,20 +1214,22 @@ export default {
     handleTitleData() {
     handleTitleData() {
       let _this = this;
       let _this = this;
       let curQue = JSON.parse(JSON.stringify(this.cur));
       let curQue = JSON.parse(JSON.stringify(this.cur));
-      curQue.detailList.forEach((dItem, dIndex) => {
-        let paraArr = [];
-        if (dItem.detail) {
-          dItem.detail.wordsList.forEach((sItem, sIndex) => {
-            let obj = {
-              pinyin: sItem.pinyin,
-              chs: sItem.chs,
-              isShow: true
-            };
-            paraArr.push(obj);
-          });
-          this.$set(_this.cur.detailList[dIndex].detail, "resArr", paraArr);
-        }
-      });
+      if (curQue.detailList) {
+        curQue.detailList.forEach((dItem, dIndex) => {
+          let paraArr = [];
+          if (dItem.detail) {
+            dItem.detail.wordsList.forEach((sItem, sIndex) => {
+              let obj = {
+                pinyin: sItem.pinyin,
+                chs: sItem.chs,
+                isShow: true
+              };
+              paraArr.push(obj);
+            });
+            this.$set(_this.cur.detailList[dIndex].detail, "resArr", paraArr);
+          }
+        });
+      }
     },
     },
     initContextData() {
     initContextData() {
       const _this = this;
       const _this = this;

+ 2 - 2
src/components/Adult/preview/ArticleViewChs/index.vue

@@ -568,8 +568,8 @@ export default {
       let userAnswer = JSON.parse(JSON.stringify(_this.userAnswer));
       let userAnswer = JSON.parse(JSON.stringify(_this.userAnswer));
       _this.$set(this.curQue, "Bookanswer", userAnswer);
       _this.$set(this.curQue, "Bookanswer", userAnswer);
     }
     }
-    this.$nextTick(() => {
-      this.bodyLeft = this.$refs.ArticleViewbody.getBoundingClientRect().left;
+    _this.$nextTick(() => {
+      _this.bodyLeft = _this.$refs.ArticleViewbody.getBoundingClientRect().left;
     });
     });
     for (let i = 0; i < this.curQue.detail.length; i++) {
     for (let i = 0; i < this.curQue.detail.length; i++) {
       let enStr = this.curQue.detail[i].sentencesEn
       let enStr = this.curQue.detail[i].sentencesEn