natasha 1 سال پیش
والد
کامیت
26439c502f
3فایلهای تغییر یافته به همراه122 افزوده شده و 12 حذف شده
  1. 5 1
      src/views/bookShelf/articleDetail.vue
  2. 95 2
      src/views/bookShelf/components/NormalModel.vue
  3. 22 9
      src/views/search/searchDetail.vue

+ 5 - 1
src/views/bookShelf/articleDetail.vue

@@ -69,6 +69,9 @@
             :likeSentencelist="likeSentencelist"
             :likeWord="likeWordList"
             :articleImg="articleImg"
+            :activeArticleIndexLen="issueChnTanList.length"
+            :activeArticleIndex="activeArticleIndex"
+            @handlePage="handlePage"
           ></normal-model>
           <phrase-model
             :titleFontsize="48"
@@ -286,13 +289,14 @@
               color: bgColorList[activeIndex].glossaryTitle,
               marginTop: '40px',
             }"
+            v-if="articleInfo.en_flag"
           >
             <h2>详细统计</h2>
             <a @click="showWordInfo = !showWordInfo">{{
               showWordInfo ? "收起" : "展开"
             }}</a>
           </div>
-          <el-collapse-transition>
+          <el-collapse-transition v-if="articleInfo.en_flag">
             <div v-if="showWordInfo">
               <h4 :style="{ color: bgColorList[activeIndex].glossarySubtitle }">
                 词汇信息

+ 95 - 2
src/views/bookShelf/components/NormalModel.vue

@@ -93,7 +93,7 @@
         </span>
       </h2>
     </template>
-    <h2 v-else>
+    <h2 v-else :style="{ justifyContent: articleInfo.en_flag ? '' : 'center' }">
       <span
         :style="{
           color: colorObj.titleColor,
@@ -114,6 +114,7 @@
         lineHeight: '22px',
         fontWeight: '400',
       }"
+      v-if="articleInfo.en_flag"
     >
       {{
         articleInfo.art_author +
@@ -128,6 +129,65 @@
         (articleInfo.page_no_in_pub ? " · P" + articleInfo.page_no_in_pub : "")
       }}
     </h6>
+    <template v-else>
+      <div class="info-box">
+        <el-button
+          type="text"
+          class="btn-left"
+          :class="[activeArticleIndex === 0 ? 'not-allow' : '']"
+          @click="handlePage('-')"
+          :style="{ color: colorObj.btnColor }"
+          ><svg-icon icon-class="arrow-left-line"></svg-icon>上一篇</el-button
+        >
+        <h6
+          class="nnpe-article-author"
+          :style="{
+            color: colorObj.sourceColor,
+            fontSize: '14px',
+            lineHeight: '22px',
+            fontWeight: '400',
+            margin: 0,
+          }"
+        >
+          {{
+            articleInfo.study_phase_name +
+            "版 · 第 " +
+            articleInfo.iss_no +
+            " 期 · " +
+            articleInfo.release_date +
+            " · " +
+            articleInfo.chn_item +
+            (articleInfo.page_no_in_pub
+              ? " · P" + articleInfo.page_no_in_pub
+              : "")
+          }}
+        </h6>
+        <el-button
+          type="text"
+          class="btn-right"
+          :class="[
+            activeArticleIndex === activeArticleIndexLen - 1 ? 'not-allow' : '',
+          ]"
+          @click="handlePage('+')"
+          :style="{ color: colorObj.btnColor }"
+          >下一篇<svg-icon icon-class="arrow-right-line"></svg-icon
+        ></el-button>
+      </div>
+      <el-divider></el-divider>
+      <h6
+        class="nnpe-article-author"
+        :style="{
+          color: colorObj.sourceColor,
+          fontSize: '16px',
+          lineHeight: '24px',
+          fontWeight: '400',
+          margin: 0,
+          textAlign: 'center',
+        }"
+      >
+        {{ articleInfo.art_author }}
+      </h6>
+    </template>
     <div class="audio-box">
       <div
         class="aduioLine-content aduioLine-box"
@@ -286,7 +346,11 @@
       </div>
     </template>
     <template v-else>
-      <div class="cn-content" v-html="articleInfo.art_content"></div>
+      <div
+        class="cn-content"
+        v-html="articleInfo.art_content"
+        :style="{ color: colorObj.contentColor }"
+      ></div>
     </template>
     <!-- <img src="../../../assets/article-img.png" style="max-width:100%;margin:24px 0;" /> -->
     <div class="voice-full-screen" :id="'screen-' + mathNum">
@@ -318,6 +382,8 @@ export default {
     "likeSentencelist",
     "likeWord",
     "articleImg",
+    "activeArticleIndex",
+    "activeArticleIndexLen",
   ],
   components: {
     AudioLine,
@@ -489,6 +555,9 @@ export default {
     changeIsFull() {
       this.isFull = false;
     },
+    handlePage(type) {
+      this.$emit("handlePage", type);
+    },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},
@@ -717,4 +786,28 @@ export default {
     color: #2f3742;
   }
 }
+.info-box {
+  display: flex;
+  justify-content: space-between;
+}
+.btn-left,
+.btn-right {
+  color: #3459d2;
+  font-size: 16px;
+  line-height: 24px;
+  padding: 0;
+  .svg-icon {
+    margin-right: 12px;
+  }
+  &.not-allow {
+    color: #5e89ef;
+    cursor: not-allowed;
+  }
+}
+.btn-right {
+  .svg-icon {
+    margin-right: 0;
+    margin-left: 12px;
+  }
+}
 </style>

+ 22 - 9
src/views/search/searchDetail.vue

@@ -243,15 +243,28 @@ export default {
     },
     // 跳转文章
     handleLink(item) {
-      let url = this.config + "&&&搜索";
-      this.$router.push({
-        path: "/articleDetail",
-        query: {
-          headerConfig: encodeURIComponent(url),
-          iss_id: item.iss_id,
-          id: item.art_id,
-        },
-      });
+      getLogin("/ShopServer/Client/BookshelfQuery/GetGoodsBuyStatus", {
+        goods_type: 2,
+        goods_id: item.iss_id,
+      })
+        .then((res) => {
+          if (res.status === 1) {
+            if (res.buy_info.is_buy === "true") {
+              let url = this.config + "&&&搜索";
+              this.$router.push({
+                path: "/articleDetail",
+                query: {
+                  headerConfig: encodeURIComponent(url),
+                  iss_id: item.iss_id,
+                  id: item.art_id,
+                },
+              });
+            } else {
+              this.$message.warning("当前内容未购买");
+            }
+          }
+        })
+        .catch(() => {});
     },
     // 切换每页条数
     handleSizeChange(val) {