Explorar o código

兼容打印报错

natasha hai 1 mes
pai
achega
eed415ce4c

+ 14 - 6
src/views/bookShelf/components/PrintModel.vue

@@ -1196,11 +1196,16 @@ export default {
         item.type = "explain";
       });
       this.allWordList = this.wordLit.concat(this.phraseList);
-      let leg = articleInfo.art_corpus_data
-        ? articleInfo.art_corpus_data.sentList[
-            articleInfo.art_corpus_data.sentList.length - 1
-          ].pno
-        : 0;
+      let leg =
+        articleInfo.art_corpus_data &&
+        articleInfo.art_corpus_data.sentList &&
+        articleInfo.art_corpus_data.sentList[
+          articleInfo.art_corpus_data.sentList.length - 1
+        ]
+          ? articleInfo.art_corpus_data.sentList[
+              articleInfo.art_corpus_data.sentList.length - 1
+            ].pno
+          : 0;
       this.sentenceList.forEach((item, index) => {
         let flag = "";
         item.StyleTokens = [];
@@ -1516,7 +1521,10 @@ export default {
               let allWordList = wordLit.concat(phraseList);
               let leg =
                 articleInfo.art_corpus_data &&
-                articleInfo.art_corpus_data.sentList
+                articleInfo.art_corpus_data.sentList &&
+                articleInfo.art_corpus_data.sentList[
+                  articleInfo.art_corpus_data.sentList.length - 1
+                ]
                   ? articleInfo.art_corpus_data.sentList[
                       articleInfo.art_corpus_data.sentList.length - 1
                     ].pno

+ 8 - 8
src/views/bookStore/Subscribe.vue

@@ -503,18 +503,18 @@ export default {
           label: "40 期",
           value: 40,
         },
+        // {
+        //   label: "自定义期数",
+        //   value: -2,
+        // },
         {
-          label: "自定义期数",
-          value: -2,
+          label: "自选期数【已发行/未发行】",
+          value: 10000,
         },
         {
           label: "年订阅(当月起订)",
           value: -1,
         },
-        {
-          label: "已发行/未发行期号自选预定",
-          value: 10000,
-        },
       ],
       orderTable: [
         {
@@ -1216,10 +1216,10 @@ export default {
       getLogin(MethodName, data)
         .then((res) => {
           if (res.status === 1 && res.issue_no_start) {
-            this.orderList[5].label =
+            this.orderList[4].label =
               "年订阅(当月起订," + res.issue_no_start + "期起)";
           } else {
-            this.orderList[5].label = "年订阅(当月起订)";
+            this.orderList[4].label = "年订阅(当月起订)";
           }
         })
         .catch(() => {});