bd 2 år sedan
förälder
incheckning
5b5f1530d5
3 ändrade filer med 67 tillägg och 53 borttagningar
  1. 39 17
      src/views/htgj/index.scss
  2. 16 18
      src/views/htgj/index.vue
  3. 12 18
      src/views/htgj/search.vue

+ 39 - 17
src/views/htgj/index.scss

@@ -52,15 +52,16 @@
         }
       }
       .item-content {
-        height: 277px;
-        font-size: 24px;
-        line-height: 40px;
+        min-height: 90px;
         width: 99%;
-        color: #7f7f7f;
+        font-size: 26px;
+        font-weight: 400;
+        color: #666666;
+        line-height: 30px;
         overflow: hidden;
         text-overflow: ellipsis;
         display: -webkit-box;
-        -webkit-line-clamp: 7;
+        -webkit-line-clamp: 8;
         -webkit-box-orient: vertical;
         img {
           width: 100% !important;
@@ -80,21 +81,33 @@
         transform-origin: center bottom;
       }
       .item-title {
-        font-size: 28px;
-        color: #4a4a4a;
+        position: relative;
         margin-bottom: 10px;
+        text-indent: 0.5em;
+        font-size: 32px;
+        font-weight: 500;
+        color: #333333;
+        line-height: 38px;
+        -webkit-line-clamp: 3;
+        line-clamp: 3;
+        &::before {
+          content: "";
+          position: absolute;
+          top: 5px;
+          left: 0;
+          width: 6px;
+          height: 31px;
+          background-color: #3385ff;
+        }
       }
       .item-abstract {
-        font-size: 26px;
-        color: #6a6a6a;
-        margin-bottom: 10px;
-        word-break:break-all;
-        .report_ico {
-          width: 32px;
-          height: 26px;
-          margin-right: 20px;
-          display: inline-block;
-        }
+        font-size: 28px;
+        font-weight: 400;
+        color: #333333;
+        line-height: 33px;
+        -webkit-line-clamp: 3;
+        line-clamp: 3;
+        margin: 10px 0;
       }
       .item-createtime {
         display: flex;
@@ -114,6 +127,15 @@
       }
     }
   }
+  .text-Line {
+    text-overflow: -o-ellipsis-lastline;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-box-orient: vertical;
+    word-wrap: break-word;
+    word-break: break-all;
+  }
 }
 .van-tabs__line {
     background: linear-gradient(268deg, #2ddbff 0%, #1599ff 49%, #005eff 100%);

+ 16 - 18
src/views/htgj/index.vue

@@ -15,27 +15,26 @@
       </div>
     </div>
     <div>
-      <PullRefresh v-model="refreshing" @refresh="onRefresh" v-if="tabActive!==0">
+      <PullRefresh v-model="refreshing" @refresh="onRefresh" v-if="tabActive !== 0">
         <List v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
           <div class="data-cont">
             <div class="report-ul">
               <template v-for="(report, index) in dataList" :key="index">
                 <div class="report-item" v-if="index % 2 === 0" @click="goDetail(report)">
+                  <div class="item-title text-Line">{{ report.Title }}</div>
                   <div class="item-content-img" v-if="report.BodyHtml">
                     <img :src="report.BodyHtml" mode="" />
                   </div>
-                  <div class="item-content" v-else>{{ report.Body }}</div>
-                  <div class="line"></div>
-                  <text class="item-title">{{ report.Title }}</text>
-                  <div class="item-abstract text_twoLine" v-if="report.ExpertBackground">
-                    <img src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/fenxi_ico.png" class="report_ico" />
-                    {{ report.ExpertBackground }}
+                  <div class="item-content" v-if="report.Annotation">
+                    <p>{{ report.ArticleResponse == 4 ? "核心观点" : "核心结论" }}:</p>
+                    <p v-html="report.Annotation"></p>
                   </div>
+                  <div class="item-abstract text-Line" v-if="report.Abstract && report.ArticleResponse != 1">摘要:{{ report.Abstract }}</div>
                   <div class="item-createtime">
-                    <text>{{ report.PublishDate }}</text>
+                    <span>{{ report.PublishDate }}</span>
                     <div class="item-examine" v-if="report.IsResearch">
                       <img src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/examine_icon.png" />
-                      <text>{{ report.Pv }}</text>
+                      <span>{{ report.Pv }}</span>
                     </div>
                   </div>
                 </div>
@@ -44,21 +43,20 @@
             <div class="report-ul">
               <template v-for="(report, index) in dataList" :key="index">
                 <div class="report-item" v-if="index % 2 != 0" @click="goDetail(report)">
+                  <div class="item-title text-Line">{{ report.Title }}</div>
                   <div class="item-content-img" v-if="report.BodyHtml">
-                    <img :src="report.BodyHtml" />
+                    <img :src="report.BodyHtml" mode="" />
                   </div>
-                  <div class="item-content" v-else>{{ report.Body }}</div>
-                  <div class="line"></div>
-                  <text class="item-title">{{ report.Title }}</text>
-                  <div class="item-abstract text_twoLine" v-if="report.ExpertBackground">
-                    <img src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/fenxi_ico.png" class="report_ico" />
-                    {{ report.ExpertBackground }}
+                  <div class="item-content" v-if="report.Annotation">
+                    <p>{{ report.ArticleResponse == 4 ? "核心观点" : "核心结论" }}:</p>
+                    <p v-html="report.Annotation"></p>
                   </div>
+                  <div class="item-abstract text-Line" v-if="report.Abstract && report.ArticleResponse != 1">摘要:{{ report.Abstract }}</div>
                   <div class="item-createtime">
-                    <text>{{ report.PublishDate }}</text>
+                    <span>{{ report.PublishDate }}</span>
                     <div class="item-examine" v-if="report.IsResearch">
                       <img src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/examine_icon.png" />
-                      <text>{{ report.Pv }}</text>
+                      <span>{{ report.Pv }}</span>
                     </div>
                   </div>
                 </div>

+ 12 - 18
src/views/htgj/search.vue

@@ -39,21 +39,18 @@
             <div class="report-ul">
               <template v-for="(report, index) in resultList" :key="index">
                 <div class="report-item" v-if="index % 2 === 0" @click="goDetail(report)">
+                  <div class="item-title text-Line" v-html="report.Title"></div>
                   <div class="item-content-img" v-if="report.BodyHtml">
                     <img :src="report.BodyHtml" mode="" />
                   </div>
-                  <div class="item-content" v-else v-html="report.Body"></div>
-                  <div class="line"></div>
-                  <text class="item-title" v-html="report.Title"></text>
-                  <div class="item-abstract text_twoLine" v-if="report.ExpertBackground">
-                    <img src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/fenxi_ico.png" class="report_ico" />
-                    {{ report.ExpertBackground }}
+                  <div class="item-content" v-else>
+                    <p v-html="report.Body[0]"></p>
                   </div>
                   <div class="item-createtime">
-                    <text>{{ report.PublishDate }}</text>
+                    <span>{{ report.PublishDate }}</span>
                     <div class="item-examine" v-if="report.IsResearch">
                       <img src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/examine_icon.png" />
-                      <text>{{ report.Pv }}</text>
+                      <span>{{ report.Pv }}</span>
                     </div>
                   </div>
                 </div>
@@ -62,21 +59,18 @@
             <div class="report-ul">
               <template v-for="(report, index) in resultList" :key="index">
                 <div class="report-item" v-if="index % 2 != 0" @click="goDetail(report)">
+                  <div class="item-title text-Line" v-html="report.Title"></div>
                   <div class="item-content-img" v-if="report.BodyHtml">
-                    <img :src="report.BodyHtml" />
+                    <img :src="report.BodyHtml" mode="" />
                   </div>
-                  <div class="item-content" v-else v-html="report.Body"></div>
-                  <div class="line"></div>
-                  <text class="item-title" v-html="report.Title"></text>
-                  <div class="item-abstract text_twoLine" v-if="report.ExpertBackground">
-                    <img src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/fenxi_ico.png" class="report_ico" />
-                    {{ report.ExpertBackground }}
+                  <div class="item-content" v-else>
+                    <p v-html="report.Body[0]"></p>
                   </div>
                   <div class="item-createtime">
-                    <text>{{ report.PublishDate }}</text>
+                    <span>{{ report.PublishDate }}</span>
                     <div class="item-examine" v-if="report.IsResearch">
                       <img src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/examine_icon.png" />
-                      <text>{{ report.Pv }}</text>
+                      <span>{{ report.Pv }}</span>
                     </div>
                   </div>
                 </div>
@@ -139,7 +133,7 @@ const searchHandle = () => {
 };
 /* 表单清空 */
 const clearIpt = () => {
-  searchState.searchTxt = ''
+  searchState.searchTxt = "";
   dataState.resultList = [];
   dataState.orderColumn = "Matching";
   console.log(searchState.searchTxt);