natasha 3 anos atrás
pai
commit
5d1ae39b05
1 arquivos alterados com 34 adições e 18 exclusões
  1. 34 18
      src/components/Adult/Preview.vue

+ 34 - 18
src/components/Adult/Preview.vue

@@ -10,8 +10,8 @@
     </div>
     <div v-if="cur" class="NNPE-Book-content-inner">
       <div v-for="(item, index) in cur.cur_fn_data" :key="index">
-        <h2 v-if="item.title_z">{{ item.z_title }}</h2>
-        <h3 v-if="item.title_f">{{ item.f_title }}</h3>
+        <h2 v-if="item.z_title">{{ item.z_title }}</h2>
+        <h3 v-if="item.f_title">{{ item.f_title }}</h3>
         <div
           :class="['NNPE-tableList', item.is_bg ? 'NNPE-tableList-hasBg' : '']"
         >
@@ -248,27 +248,43 @@ export default {
       _this.NNPENewPhraseList = [];
       _this.watchIndex = _this.queIndex + new Date().getTime();
       if (_this.contextData) {
-        const list = _this.contextData;
-        if (list && list.length > 0) {
-          _this.queList = list;
-          _this.cur = list[_this.queIndex];
-          _this.queTotal = list.length;
-          _this.cur.cur_fn_data.forEach((item) => {
+        // const list = _this.contextData;
+        // if (list && list.length > 0) {
+        //   _this.queList = list;
+        //   _this.cur = list[_this.queIndex];
+        //   _this.queTotal = list.length;
+        //   _this.cur.cur_fn_data.forEach((item) => {
+        //     item.table_list.forEach((items) => {
+        //       items.forEach((itemss) => {
+        //         if (itemss.data && itemss.data.type == "NewWord_chs") {
+        //           _this.NNPENewWordList = _this.NNPENewWordList.concat(
+        //             itemss.data.option
+        //           );
+        //         } else if (itemss.data && itemss.data.type == "notes_chs") {
+        //           _this.NNPEAnnotationList = _this.NNPEAnnotationList.concat(
+        //             itemss.data.option
+        //           );
+        //         }
+        //       });
+        //     });
+        //   });
+        // }
+        _this.cur = _this.contextData;
+        _this.cur.cur_fn_data.forEach((item) => {
             item.table_list.forEach((items) => {
-              items.forEach((itemss) => {
+                items.forEach((itemss) => {
                 if (itemss.data && itemss.data.type == "NewWord_chs") {
-                  _this.NNPENewWordList = _this.NNPENewWordList.concat(
-                    itemss.data.option
-                  );
+                        _this.NNPENewWordList = _this.NNPENewWordList.concat(
+                        itemss.data.option
+                    );
                 } else if (itemss.data && itemss.data.type == "notes_chs") {
-                  _this.NNPEAnnotationList = _this.NNPEAnnotationList.concat(
-                    itemss.data.option
-                  );
+                        _this.NNPEAnnotationList = _this.NNPEAnnotationList.concat(
+                        itemss.data.option
+                    );
                 }
-              });
+                });
             });
-          });
-        }
+        });
       }
     },
     // 上一页