Browse Source

详情页推荐资讯

Jing 2 days ago
parent
commit
c5c4d70534

+ 1 - 1
.nuxt/manifest/latest.json

@@ -1 +1 @@
-{"id":"fdc02d55-c846-49fb-873e-16f9cd8d6723","timestamp":1754037393042}
+{"id":"e43ee3bf-257f-49e5-9fc1-013e1ab68507","timestamp":1754559306697}

+ 1 - 0
.nuxt/manifest/meta/e43ee3bf-257f-49e5-9fc1-013e1ab68507.json

@@ -0,0 +1 @@
+{"id":"e43ee3bf-257f-49e5-9fc1-013e1ab68507","timestamp":1754559306697,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

+ 0 - 1
.nuxt/manifest/meta/fdc02d55-c846-49fb-873e-16f9cd8d6723.json

@@ -1 +0,0 @@
-{"id":"fdc02d55-c846-49fb-873e-16f9cd8d6723","timestamp":1754037393042,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}

+ 1 - 1
.nuxt/tsconfig.json

@@ -102,7 +102,7 @@
         "./imports"
       ],
       "#app-manifest": [
-        "./manifest/meta/fdc02d55-c846-49fb-873e-16f9cd8d6723.json"
+        "./manifest/meta/e43ee3bf-257f-49e5-9fc1-013e1ab68507.json"
       ],
       "#components": [
         "./components"

+ 68 - 0
assets/css/detail.less

@@ -166,6 +166,74 @@
                     line-height: 30px;
                 }
             }
+
+            .recommendRead {
+                width: 900px;
+                margin: 30px 0px;
+                border-top: 2px solid #dd7d18 ;
+
+                .recommendReadTitle {
+                    width: 100px;
+                    height: 40px;
+                    line-height: 40px;
+                    font-family: Microsoft YaHei, Microsoft YaHei;
+                    font-weight: bold;
+                    margin: 20px 0;
+                    font-size: 20px;
+                    color: #333333;
+                    position: relative;
+
+                    em {
+                        display: inline-block;
+                        width: 8px;
+                        height: 8px;
+                        border-radius: 4px;
+                        background-color: #a01c0e;
+                        position: absolute;
+                        top: 6px;
+                        right: 8px;
+                    }
+                }
+
+                .recommendReadList {
+                    min-height: 155px;
+                    margin-top: 30px;
+                    padding-bottom: 10px;
+                    font-size: 20px;
+                    border-bottom: 1px solid #D9D9D9;
+
+                    .recommendReadListTitle {
+                        margin-top: 25px;
+                        width: 900px;
+                        color: #333333;
+
+                        a {
+                            width: 700px;
+                            color: #333333;
+                            white-space: nowrap;
+                            overflow: hidden;
+                            text-overflow: ellipsis;
+                        }
+
+                        span {
+                            float: right;
+                        }
+                    }
+
+                    .recommendReadListTitle:hover a {
+                        color: #dd7d18;
+                    }
+
+                    .recommendReadListTitle:nth-child(1)::after {
+                        content: "热";
+                        margin-left: 13px;
+                        background: #a01c0e;
+                        color: #fff;
+                        font-size: 14px;
+                        padding: 0px 2px;
+                    }
+                }
+            }
         }
 
         .innerRight {

+ 15 - 0
pages/[dir]/[dir]/[id].vue

@@ -109,6 +109,21 @@
                     </div>
                     <!-- 投票 end ---------------------------------------->
                 </div>
+                <!-- 推荐阅读 -->
+                <div class="recommendRead" v-if="newsDetail.commendArticle != false">
+                    <div class="recommendReadTitle">
+                        推荐阅读
+                    </div>
+                    <div class="recommendReadList">
+                        <div class="recommendReadListTitle" v-for="(item, index) in newsDetail.commendArticle"
+                            :key="item.id">
+                            <a :href="`/${item.alias_pinyin}/${item.id}.html`" v-if="index < 3">
+                                {{ item.title }}
+                            </a>
+                            <span v-if="index < 3">{{ getTime(item.created_at, "month", 1) }}</span>
+                        </div>
+                    </div>
+                </div>
             </div>
             <div class="innerRight">
                 <!-- 热点资讯1 -->

+ 15 - 0
pages/[dir]/[id].vue

@@ -107,6 +107,21 @@
                     </div>
                     <!-- 投票 end ---------------------------------------->
                 </div>
+                <!-- 推荐阅读 -->
+                <div class="recommendRead" v-if="newsDetail.commendArticle != false">
+                    <div class="recommendReadTitle">
+                        推荐阅读
+                    </div>
+                    <div class="recommendReadList">
+                        <div class="recommendReadListTitle" v-for="(item, index) in newsDetail.commendArticle"
+                            :key="item.id">
+                            <a :href="`/${item.alias_pinyin}/${item.id}.html`" v-if="index < 3">
+                                {{ item.title }}
+                            </a>
+                            <span v-if="index < 3">{{ getTime(item.created_at, "month", 1) }}</span>
+                        </div>
+                    </div>
+                </div>
             </div>
             <div class="innerRight">
                 <!-- 热点资讯1 -->