Browse Source

提交代码

Jing 2 weeks ago
parent
commit
4c108b856c

+ 2 - 1
.env

@@ -1 +1,2 @@
-PORT=10001
+PORT=3001
+

+ 437 - 0
assets/css/foot.less

@@ -0,0 +1,437 @@
+.index_foot {
+    box-sizing: border-box;
+    width: 1200px;
+    margin: 0 auto;
+}
+
+.index_foot_name_box {
+    margin: 10px auto 0px;
+    text-align: center;
+    font-size: 0px;
+}
+
+.index_foot_name {
+    display: inline-block;
+    height: 67px;
+    line-height: 67px;
+    color: #f2f9f4;
+    font-size: 51px;
+    font-weight: bold;
+    overflow: hidden;
+}
+
+.index_foot_name:nth-of-type(even) {
+    color: #333;
+    font-size: 32px;
+}
+
+.foot_img_box {
+    overflow: hidden;
+    display: block;
+    margin: 20px auto 0;
+    width: 100%;
+    display: flex;
+    flex-wrap: wrap;
+    align-items: center;
+    justify-content: flex-start;
+}
+
+.foot_img_box a {
+    width: 170px;
+    height: 57px;
+    margin: 0 0 20px 0;
+    display: block;
+}
+
+.foot_img_box img {
+    float: left;
+    width: 170px;
+    height: 57px;
+    overflow: hidden;
+    box-sizing: border-box;
+    border: solid 1px #D7EDD4;
+    display: block;
+    margin: 0 auto;
+}
+
+.foot_img_box a:nth-child(2) {
+    margin-left: 35px;
+}
+
+.foot_img_box a:nth-child(3) {
+    margin-left: 35px;
+}
+
+.foot_img_box a:nth-child(4) {
+    margin-left: 35px;
+}
+
+.foot_img_box a:nth-child(5) {
+    margin-left: 35px;
+}
+
+.foot_img_box a:nth-child(6) {
+    margin-left: 40px;
+}
+
+.foot_img_box a:nth-child(7) {
+    margin-left: 0;
+}
+
+.foot_img_box a:nth-child(8) {
+    margin-left: 35px;
+}
+
+.foot_img_box a:nth-child(9) {
+    margin-left: 35px;
+}
+
+.foot_img_box a:nth-child(10) {
+    margin-left: 35px;
+}
+
+.foot_img_box a:nth-child(11) {
+    margin-left: 35px;
+}
+
+.foot_img_box a:nth-child(12) {
+    margin-left: 40px;
+}
+
+.foot_img_box>* * {
+    display: block;
+    width: 100%;
+    height: 100%;
+}
+
+.foot_img_box>*:nth-of-type(7n) {
+    margin-right: 0px;
+}
+
+.foot_frind_box {
+    display: block;
+    margin: 11px auto;
+    overflow: hidden;
+    display: flex;
+    width: 100%;
+    // border-bottom: solid 2px #49A769;
+    padding-bottom: 35px;
+}
+
+.foot_frind_box span {
+    word-break: keep-all;
+    white-space: nowrap;
+    line-height: 22px;
+    font-size: 16px;
+    color: #333;
+    font-weight: bold;
+}
+
+.foot_frind_box div {
+    width: 100%;
+    overflow: hidden;
+}
+
+.foot_frind_box div * {
+    float: left;
+    line-height: 22px;
+    height: 22px;
+    color: #333;
+    font-size: 16px;
+    margin: 0 30px;
+}
+
+.call_us_box {
+    display: block;
+    width: 100%;
+    margin: 30px auto 0;
+    overflow: hidden;
+    text-align: center;
+    font-size: 0px;
+    background: #a01c0e;
+
+    a {
+        color: #fff;
+    }
+}
+
+.call_us_box>* {
+    height: 12px;
+    line-height: 12px;
+    color: #fff;
+    font-size: 14px;
+    display: inline-block;
+    box-sizing: border-box;
+    padding: 0 19px;
+    font-weight: bold;
+    border-left: solid 1px #5B8D54;
+    margin: 18px 0;
+}
+
+.call_us_box>*:nth-of-type(1) {
+    border-left: 0px;
+}
+
+.foot_text_box {
+    margin: 20px auto 0px;
+    text-align: center;
+    color: #333;
+    font-size: 14px;
+    line-height: 25px;
+
+    p {
+        a {
+            color: #333;
+            font-size: 14px;
+        }
+
+        .webSitecolor {
+            color: #a01c0e;
+        }
+    }
+}
+
+.foot_text_box_green {
+    color: #a01c0e;
+}
+
+.foot_text_box img {
+    display: inline-block;
+    height: 20px;
+    vertical-align: middle;
+}
+
+.foot_logo_out {
+    position: relative;
+    margin: 0px auto;
+    width: 100%;
+    height: 0px;
+}
+
+.foot_logo_out * {
+    width: 120px;
+    display: block;
+}
+
+.foot_logo_out>* {
+    position: absolute;
+    top: -166px;
+}
+
+.foot_logo_out>*:nth-of-type(1) {
+    left: 0px;
+}
+
+.foot_logo_out>*:nth-of-type(2) {
+    right: 0px;
+}
+
+.foot_last_img_box {
+    margin: 40px auto 10px;
+    text-align: center;
+    overflow: hidden;
+    width: 100%;
+    font-size: 0px;
+    padding-bottom: 40px;
+}
+
+.foot_last_img_box>* {
+    height: 50px;
+    width: 150px;
+    display: inline-block;
+    overflow: hidden;
+}
+
+.foot_last_img_box img {
+    width: 120px;
+    height: 50px;
+}
+
+.foot_text_html_css :deep(a) {
+    color: #333;
+    text-decoration: underline;
+}
+
+.foot_text_html_css :deep(img) {
+    margin: 0 5px;
+}
+
+//添加在线客服
+.kefu {
+    bottom: 100px;
+    height: 430px;
+    position: fixed;
+    right: 10px;
+    width: 100px;
+
+    .kefu_itemKf {
+        background-color: #fff;
+        border-radius: 10px;
+        box-shadow: 0 4px 16px #0000001a;
+        height: 100px;
+        margin-bottom: 15px;
+        text-align: center;
+        width: 100px;
+        box-sizing: border-box;
+        position: relative;
+        cursor: pointer;
+        margin-bottom: 100px;
+
+        a {
+            >p {
+                color: #666;
+                font-size: 14px;
+                font-weight: 500;
+                line-height: 16px;
+            }
+
+            >img {
+                margin-top: 15px;
+                width: 50px;
+                height: 50px;
+                margin-bottom: 5px;
+            }
+        }
+    }
+
+    .kefu_itemQQ {
+        background-color: #fff;
+        border-radius: 10px;
+        box-shadow: 0 4px 16px #0000001a;
+        height: 100px;
+        margin-bottom: 15px;
+        text-align: center;
+        width: 100px;
+        box-sizing: border-box;
+        position: relative;
+        cursor: pointer;
+
+        >p {
+            color: #666;
+            font-size: 14px;
+            font-weight: 500;
+            line-height: 16px;
+        }
+
+        >img {
+            margin-top: 10px;
+            width: 60px;
+            height: 60px;
+        }
+
+        &:hover {
+            .kefu_item_content_QQ {
+                display: block;
+            }
+        }
+    }
+
+    .kefu_itemPhone {
+        background-color: #fff;
+        border-radius: 10px;
+        box-shadow: 0 4px 16px #0000001a;
+        height: 100px;
+        margin-bottom: 15px;
+        text-align: center;
+        width: 100px;
+        box-sizing: border-box;
+        position: relative;
+        cursor: pointer;
+
+        >p {
+            color: #666;
+            font-size: 14px;
+            font-weight: 500;
+            line-height: 16px;
+        }
+
+        >img {
+            margin-top: 10px;
+            width: 60px;
+            height: 60px;
+        }
+
+        &:hover {
+            .kefu_item_content_phone {
+                display: block;
+            }
+        }
+    }
+
+    .kefu_item_content_QQ {
+        position: absolute;
+        top: -100px;
+        right: 100px;
+        background: #fff;
+        border-radius: 10px;
+        display: none;
+        width: 190px;
+        height: 330px;
+        background: #fff;
+        box-shadow: 0 4px 16px #0000001a;
+        z-index: 99;
+        box-sizing: border-box;
+        padding: 20px;
+
+        img {
+            margin-bottom: 10px;
+        }
+
+        .qqfs {
+            margin-bottom: 20px;
+            font-size: 14px;
+            color: #333;
+        }
+
+        .arrow {
+            width: 0;
+            height: 0;
+            width: 0;
+            border-top: 20px solid transparent;
+            border-bottom: 20px solid transparent;
+            border-left: 20px solid #fff;
+            position: absolute;
+            top: 120px;
+            right: -20px;
+            transform: translateX(-50%);
+            z-index: 100;
+        }
+    }
+
+    .kefu_item_content_phone {
+        position: absolute;
+        top: 0;
+        right: 100px;
+        background: #fff;
+        border-radius: 10px;
+        display: none;
+        width: 190px;
+        height: 80px;
+        background: #fff;
+        box-shadow: 0 4px 16px #0000001a;
+        z-index: 99;
+        box-sizing: border-box;
+        padding: 20px;
+        text-align: left;
+        color: #333;
+
+        .kefu_item_content_phone_title {
+            margin-bottom: 5px;
+            font-weight: bold;
+        }
+
+        .arrow {
+            width: 0;
+            height: 0;
+            width: 0;
+            border-top: 20px solid transparent;
+            border-bottom: 20px solid transparent;
+            border-left: 20px solid #fff;
+            position: absolute;
+            top: 20px;
+            right: -20px;
+            transform: translateX(-50%);
+            z-index: 100;
+        }
+    }
+}

+ 63 - 65
assets/css/index.less

@@ -123,11 +123,13 @@
                 }
 
                 .rightnav {
-                    display: flex;
-                    justify-content: space-between;
-                    align-items: center;
+                    width: 337px;
+                    // display: flex;
+                    // justify-content: space-between;
+                    // align-items: center;
 
                     li {
+                        float: left;
                         margin-right: 10px;
                         color: #999999;
                         font-family: 14px;
@@ -150,14 +152,13 @@
 
 
 
-            .leftContent1,
             .leftContent {
                 width: 456px;
                 margin-top: 30px;
                 background-color: #fafafa;
                 background-color: #fff;
 
-                .topTitle {
+                li:nth-child(1) {
                     width: 445px;
                     margin-bottom: 20px;
                     white-space: nowrap;
@@ -174,13 +175,13 @@
                     }
                 }
 
-                .topTitle:hover a {
+                li:nth-child(1):hover a {
                     color: #a01c0e;
                 }
 
                 .context {
                     width: 445px;
-                    margin-bottom: 20px;
+                    margin-bottom: 22px;
                     white-space: nowrap;
                     overflow: hidden;
                     text-overflow: ellipsis;
@@ -195,6 +196,11 @@
                     }
                 }
 
+                .context:nth-child(5n+1) {
+                    font-weight: bold;
+                }
+
+
                 .context:last-child {
                     margin-bottom: 10px;
                 }
@@ -261,7 +267,6 @@
 
                     .navContext {
                         width: 360px;
-                        // height: 231px;
                         padding: 20px 20px;
                         box-sizing: border-box;
                         font-family: Microsoft YaHei, Microsoft YaHei;
@@ -270,6 +275,10 @@
                         color: #333333;
 
                         .Contextlist {
+                            width: 330px;
+                            white-space: nowrap;
+                            overflow: hidden;
+                            text-overflow: ellipsis;
                             margin-bottom: 20px;
 
                             a {
@@ -439,7 +448,12 @@
                     .top {
                         width: 350px;
 
-                        img {
+                        .bottom_left_img {
+                            width: 165px;
+                            height: 96px;
+                        }
+
+                        a img {
                             width: 350px;
                             height: 230px;
                         }
@@ -460,13 +474,17 @@
                             color: #333333;
                         }
 
+                        // a {
+                        //     color: #333333;
+                        // }
+
                     }
 
                     .top:hover a .title1 {
                         color: #a01c0e;
                     }
 
-                    .bottom {
+                    .bottom_context {
                         width: 350px;
                         margin-top: 20px;
 
@@ -474,7 +492,12 @@
                             float: left;
                             width: 165px;
 
-                            img {
+                            .bottom_left_img {
+                                width: 165px;
+                                height: 96px;
+                            }
+
+                            a img {
                                 width: 165px;
                                 height: 96px;
                             }
@@ -494,6 +517,10 @@
                                 font-size: 18px;
                                 color: #333333;
                             }
+
+                            a {
+                                color: #333333;
+                            }
                         }
 
                         .bottom_left:hover a .title2 {
@@ -516,7 +543,7 @@
                     .rightContent {
                         width: 350px;
 
-                        .topTitle1 {
+                        li:nth-child(5n+1) {
                             margin-bottom: 24px;
                             width: 345px;
                             white-space: nowrap;
@@ -532,7 +559,7 @@
                             }
                         }
 
-                        .topTitle1:hover a {
+                        .li:nth-child(5n+1):hover a {
                             color: #a01c0e;
                         }
 
@@ -584,7 +611,7 @@
                     color: #333333;
                     position: relative;
 
-                    a {
+                    a.active {
                         color: #333333;
                     }
 
@@ -666,8 +693,6 @@
 
                 .part1_right_content_bottom {
                     width: 450px;
-                    // height: 300px;
-                    // margin-top: 20px;
                     overflow: hidden;
 
                     .content_bottom_list {
@@ -705,7 +730,7 @@
                         }
                     }
 
-                    .content_bottom_list:hover a .sec_content {
+                    a .sec_content:hover {
                         color: #a01c0e;
                     }
                 }
@@ -718,7 +743,7 @@
 .part2 {
     width: 100%;
     height: 540px;
-    // margin-bottom: 30px;
+    overflow: hidden;
 
     .inner {
         width: 1200px;
@@ -798,7 +823,7 @@
                     .content_a {
                         width: 350px;
 
-                        .topTitleaa {
+                        li:nth-child(5n+1) {
                             margin-bottom: 24px;
                             width: 345px;
                             white-space: nowrap;
@@ -814,7 +839,7 @@
                             }
                         }
 
-                        .topTitleaa:hover a {
+                        li:nth-child(5n+1):hover a {
                             color: #a01c0e;
                         }
 
@@ -903,6 +928,9 @@
                                 font-size: 18px;
                                 color: #333333;
                             }
+                            a{
+                                color: #333333;
+                            }
 
                         }
 
@@ -939,7 +967,7 @@
                     color: #333333;
                     position: relative;
 
-                    a {
+                    a.active {
                         color: #333333;
                     }
 
@@ -1049,7 +1077,7 @@
                         }
                     }
 
-                    .content_bottom_list:hover a .sec_content_part2 {
+                    a .sec_content_part2:hover {
                         color: #a01c0e;
                     }
                 }
@@ -1528,7 +1556,7 @@
                     height: 50px;
                     line-height: 50px;
 
-                    .part5_left_title:first-child {
+                    .part5_left_title_active {
                         float: left;
                         margin-right: 20px;
                         width: 100px;
@@ -1540,7 +1568,7 @@
                         font-size: 20px;
                         color: #333333;
 
-                        a {
+                        a.active {
                             color: #333333;
                         }
 
@@ -1594,10 +1622,8 @@
                             float: left;
                             width: 350px;
 
-                            // height: 542px;
                             .part5_photo_text {
                                 width: 350px;
-                                // height: 400px;
                                 position: relative;
 
                                 img {
@@ -1758,6 +1784,10 @@
                                     color: #333333;
                                     border-left: 1px solid #D9D9D9;
                                     padding-left: 22px;
+
+                                    a {
+                                        color: #333333;
+                                    }
                                 }
 
                                 .time_left_content:hover {
@@ -1778,7 +1808,7 @@
                     height: 50px;
                     line-height: 50px;
 
-                    .part5_left_title:first-child {
+                    .part5_left_title_active {
                         float: left;
                         margin-right: 20px;
                         width: 100px;
@@ -1790,7 +1820,7 @@
                         font-size: 20px;
                         color: #333333;
 
-                        a {
+                        a.active {
                             color: #333333;
                         }
 
@@ -1821,17 +1851,6 @@
                         a {
                             color: #999999;
                         }
-
-                        // em{
-                        //     display: inline-block;
-                        //     width: 8px;
-                        //     height: 8px;
-                        //     background-color: #a01c0e;
-                        //     border-radius: 4px;
-                        //     position: absolute;
-                        //     top: 9px;
-                        //     right: 6px;
-                        // }
                     }
                 }
 
@@ -1842,7 +1861,6 @@
                         float: left;
                         width: 350px;
 
-                        // height: 350px;
                         .content_top {
                             width: 350px;
 
@@ -1854,7 +1872,7 @@
                             .part5_text {
                                 display: inline-block;
                                 width: 350px;
-                                height: 50px;
+                                height: 47px;
                                 line-height: 22px;
                                 display: -webkit-box;
                                 -webkit-box-orient: vertical;
@@ -1930,7 +1948,7 @@
                         .bottom_content_1 {
                             width: 350px;
 
-                            .bottom_content_list:first-child {
+                            .bottom_content_list:nth-child(5n+1) {
                                 font-weight: bold;
                             }
 
@@ -1985,7 +2003,7 @@
                 height: 50px;
                 line-height: 50px;
 
-                .part5_right_title:first-child {
+                .part5_right_title_active {
                     float: left;
                     margin-right: 20px;
                     width: 100px;
@@ -1997,7 +2015,7 @@
                     font-size: 20px;
                     color: #333333;
 
-                    a {
+                    a.active {
                         color: #333333;
                     }
 
@@ -2028,17 +2046,6 @@
                     a {
                         color: #999999;
                     }
-
-                    // em{
-                    //     display: inline-block;
-                    //     width: 8px;
-                    //     height: 8px;
-                    //     background-color: #a01c0e;
-                    //     border-radius: 4px;
-                    //     position: absolute;
-                    //     top: 9px;
-                    //     right: 6px;
-                    // }
                 }
 
                 .rightMore {
@@ -2178,7 +2185,6 @@
                     font-size: 18px;
                     color: #333333;
                     line-height: 21px;
-                    // margin-bottom: 25px;
 
                     .erjibiaoti {
                         display: inline-block;
@@ -2197,12 +2203,8 @@
                     }
                 }
 
-                .part5_right_contentlist_11:hover {
+                a:hover {
                     color: #a01c0e;
-
-                    a {
-                        color: #a01c0e;
-                    }
                 }
 
                 .part5_right_contentlist_11:first-child {
@@ -2288,10 +2290,6 @@
                             font-size: 18px;
                             color: #333333;
                         }
-
-                        // .fenlei:first-child{
-                        //     margin-right: 20px;
-                        // }
                     }
 
                 }

+ 529 - 0
assets/css/list.less

@@ -0,0 +1,529 @@
+#newsList {
+    width: 100%;
+    overflow: hidden;
+}
+//二级栏目
+.sannongzhichuang {
+    margin: 30px 0 40px;
+
+    .inner {
+        width: 1200px;
+        height: 67px;
+        position: relative;
+    }
+
+    h2 {
+        display: inline-block;
+        //background-image: url("../../public/image/bg1.png");
+        background: #139602;
+        width: 156px;
+        height: 43px;
+        padding: 14px 31px 10px 25px;
+        font-family: STXingkai, STXingkai;
+        font-weight: 400;
+        font-size: 39px;
+        color: #FFFFFF;
+        line-height: 46px;
+        text-align: center;
+        font-style: normal;
+        text-transform: none;
+        -webkit-text-stroke: 0.3px #3C6C47;
+        position: absolute;
+        top: 0;
+        left: 0;
+        z-index: 99;
+
+        em {
+            position: absolute;
+            top: -16px;
+            right: -12px;
+            color: #185410;
+            display: inline-block;
+            width: 13px;
+            height: 13px;
+        }
+
+        a {
+            font-family: STXingkai, STXingkai;
+            font-weight: 400;
+            font-size: 39px;
+            color: #FFFFFF;
+            line-height: 46px;
+            text-align: center;
+            -webkit-text-stroke: 0.3px #3C6C47;
+        }
+    }
+
+    p.introduction {
+        display: inline-block;
+        width: 1003px;
+        height: 56px;
+        line-height: 56px;
+        background-color: #fafafa;
+        position: absolute;
+        bottom: 0;
+        right: 0;
+        display: flex;
+
+        >strong:first-child {
+            margin-left: 40px;
+            display: inline-block;
+            vertical-align: middle;
+            width: 32px;
+            height: 36px;
+            padding: 3px 7px;
+            border: 0.5px solid #129502;
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-weight: bold;
+            font-size: 14px;
+            color: #139602;
+            line-height: 18px;
+            text-align: center;
+            font-style: normal;
+            text-transform: none;
+
+        }
+
+        div {
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+
+            >span {
+                width: 64px;
+                height: 21px;
+                font-family: Microsoft YaHei, Microsoft YaHei;
+                font-weight: 400;
+                font-size: 16px;
+                color: #000000;
+                line-height: 21px;
+                text-align: left;
+                font-style: normal;
+                text-transform: none;
+                margin-top: 17px;
+                padding: 0 24px;
+                border-right: 1px solid #ccc;
+
+                a {
+                    color: #000;
+                }
+            }
+
+            >span:hover a {
+                color: #139602;
+            }
+
+            >span:last-child {
+                border: none;
+            }
+        }
+
+    }
+}
+
+//导航条
+.breadcrumb {
+    width: 100%;
+    height: 22px;
+    margin-top: 30px;
+    margin-bottom: 30px;
+    font-family: Microsoft YaHei, Microsoft YaHei;
+    font-weight: 400;
+    font-size: 20px;
+    color: #666666;
+    line-height: 23px;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+
+    :deep(.el-breadcrumb) {
+        display: inline-block;
+        vertical-align: -4px;
+    }
+
+    :deep(.el-breadcrumb__inner a),
+    :deep(.el-breadcrumb__inner.is-link) {
+        color: #666666;
+        font-weight: 400;
+        text-decoration: none;
+        transition: var(--el-transition-color);
+    }
+
+    span {
+        font-family: Microsoft YaHei, Microsoft YaHei;
+        font-weight: 400;
+        font-size: 20px;
+        color: #666666;
+        line-height: 23px;
+        text-align: left;
+        font-style: normal;
+        text-transform: none;
+    }
+
+    span:hover {
+        color: #666666;
+    }
+
+    .location {
+        margin-right: 20px;
+        width: 100px;
+        height: 22px;
+        font-family: Microsoft YaHei, Microsoft YaHei;
+        font-weight: 400;
+        font-size: 20px;
+        color: #666666;
+        line-height: 23px;
+        text-align: left;
+        font-style: normal;
+        text-transform: none;
+    }
+}
+
+// 资讯列表
+.newsList {
+    width: 100%;
+    // height: 675px;
+    overflow: hidden;
+    margin-bottom: 70px;
+
+    .inner {
+        width: 1200px;
+
+        .innerLeft,
+        .innerRight {
+            border-top: 1px solid #139602;
+        }
+
+        .innerLeft {
+            // height: 675px;
+
+            >.list {
+                // height: 570px;
+                margin-bottom: 70px;
+
+                >li {
+                    width: 790px;
+                    height: 56px;
+                    white-space: nowrap;
+                    overflow: hidden;
+                    text-overflow: ellipsis;
+                    line-height: 56px;
+
+                    >a {
+                        width: 360px;
+                        height: 26px;
+                        font-family: Microsoft YaHei, Microsoft YaHei;
+                        font-weight: 400;
+                        font-size: 20px;
+                        color: #333333;
+                        line-height: 26px;
+                        text-align: left;
+                        font-style: normal;
+                        text-transform: none;
+                    }
+
+                }
+
+                >li:hover>a {
+                    color: #139602;
+                }
+
+                >li:nth-child(1)::after,
+                >li:nth-child(2)::after {
+                    content: "热";
+                    margin-left: 13px;
+                    background: #FF8A37;
+                    color: #fff;
+                    font-size: 14px;
+                    padding: 0px 2px;
+                }
+
+                >li:nth-child(5n) {
+                    // padding-top: 10px;
+                    // padding-bottom: 10px;
+                    border-bottom: 1px solid #D9D9D9;
+                }
+            }
+
+            >.pagination {
+                width: 800px;
+                height: 34px;
+                margin-left: 141px;
+                display: flex;
+                justify-content: center;
+                margin: 0;
+
+                // 鼠标移入后字体颜色
+                .el-pagination::v-deep :hover {
+                    color: #139609;
+                }
+
+                .el-pagination.is-background::v-deep .btn-next,
+                .el-pagination.is-background::v-deep .btn-prev {
+                    width: 70px;
+                    height: 34px;
+                    margin: 0px 10px;
+                    border-radius: 4px;
+                }
+
+                .el-pagination.is-background::v-deep .el-pager li {
+                    margin: 0px 10px;
+                    width: 38px;
+                    height: 34px;
+                    border-radius: 4px;
+                }
+
+                .el-pagination.is-background::v-deep .btn-next.is-active,
+                .el-pagination.is-background::v-deep .btn-prev.is-active,
+                .el-pagination.is-background::v-deep .el-pager li.is-active {
+                    background-color: #028e21;
+                    color: #fff;
+                }
+
+
+            }
+        }
+
+        .innerRight {
+            width: 381px;
+            // height: 605px;
+        }
+    }
+}
+
+//资讯推荐
+.zixuntuijian {
+    width: 100%;
+    height: 290px;
+    margin-bottom: 70px;
+
+    .innerLeft {
+
+        // 左侧
+        .zixunLeft {
+            margin-right: 30px;
+        }
+
+        .zixunRight,
+        .zixunLeft {
+            float: left;
+            width: 380px;
+            height: 290px;
+
+            // 标题部分
+            >.title {
+                width: 380px;
+            }
+
+            >.title>h3 {
+                height: 36px;
+                font-family: Source Han Sans, Source Han Sans;
+                font-weight: bold;
+                font-size: 24px;
+                color: #000000;
+                line-height: 28px;
+                text-align: left;
+                font-style: normal;
+                text-transform: none;
+                border-bottom: 1px solid #139602;
+
+            }
+
+            >.title>h3>span {
+                float: right;
+                width: 56px;
+                height: 20px;
+                line-height: 24px;
+                font-weight: 400;
+                font-size: 14px;
+                color: #999999;
+                font-style: normal;
+                text-transform: none;
+            }
+
+            .photo_text {
+
+                >li:first-child {
+                    width: 380px;
+                    height: 120px;
+                    margin-top: 20px;
+                    margin-bottom: 15px;
+                    position: relative;
+
+                    >img {
+                        float: left;
+                        width: 160px;
+                        height: 120px;
+                    }
+
+                    >div {
+                        float: left;
+                        width: 220px;
+                        height: 120px;
+                        padding-left: 15px;
+                        padding-top: 6px;
+                        box-sizing: border-box;
+                        background-color: #f6f6f6;
+
+
+                        >h5 {
+                            width: 200px;
+                            height: 54px;
+                            display: -webkit-box;
+                            -webkit-box-orient: vertical;
+                            -webkit-line-clamp: 2;
+                            overflow: hidden;
+                            text-overflow: ellipsis;
+                            word-break: break-all;
+                            font-family: Source Han Sans, Source Han Sans;
+                            font-weight: 500;
+                            font-size: 18px;
+                            color: #333333;
+                            line-height: 26px;
+                            text-align: left;
+                            font-style: normal;
+                            text-transform: none;
+                        }
+
+                        >p {
+                            width: 200px;
+                            height: 22px;
+                            line-height: 20px;
+                            position: absolute;
+                            bottom: 5px;
+                            right: 0;
+
+                            >span {
+                                display: inline-block;
+                                // width: 100px;
+                                height: 18px;
+                                font-family: Source Han Sans, Source Han Sans;
+                                font-weight: 400;
+                                font-size: 12px;
+                                color: #999999;
+                                text-align: left;
+                                line-height: 14px;
+                                font-style: normal;
+                                text-transform: none;
+                            }
+
+                            >span:last-child {
+                                // width: 90px;
+                                text-align: right;
+                                margin-left: 20px;
+                            }
+
+                        }
+                    }
+                }
+
+                >li {
+                    width: 380px;
+                    height: 25px;
+                    white-space: nowrap;
+                    overflow: hidden;
+                    text-overflow: ellipsis;
+                    font-family: PingFang SC, PingFang SC;
+                    font-weight: 500;
+                    font-size: 18px;
+                    color: #333333;
+                    line-height: 21px;
+                    text-align: left;
+                    font-style: normal;
+                    text-transform: none;
+                    margin-bottom: 10px;
+
+                    em {
+                        display: inline-block;
+                        width: 8px;
+                        height: 8px;
+                        border-radius: 8px;
+                        margin-right: 10px;
+                        background-color: #d9d9d9;
+                    }
+                }
+
+                >li:hover {
+                    color: #139602;
+                }
+
+                >li:hover em {
+                    background-color: #139602;
+                }
+            }
+        }
+    }
+
+    .innerRight {
+        width: 381px;
+        height: 290px;
+        background-color: #fbfbfb;
+
+        >.title {
+            width: 380px;
+            height: 40px;
+            line-height: 40px;
+            border-top: 1px solid #139602;
+            border-bottom: 1px solid #e7e7e7;
+
+            >h4 {
+                font-family: Microsoft YaHei, Microsoft YaHei;
+                font-weight: 400;
+                margin-left: 20px;
+                font-size: 20px;
+                color: #000000;
+                text-align: left;
+                font-style: normal;
+                text-transform: none;
+
+                >span {
+                    float: right;
+                    font-family: Microsoft YaHei, Microsoft YaHei;
+                    font-weight: 400;
+                    font-size: 14px;
+                    margin-right: 10px;
+                    color: #999999;
+                    text-align: left;
+                    font-style: normal;
+                    text-transform: none;
+                }
+            }
+
+        }
+
+        .rightList {
+            height: 540px;
+            margin-top: 20px;
+
+            >li {
+                height: 100px;
+                margin-bottom: 10px;
+
+                >img {
+                    width: 150px;
+                    height: 100px;
+                }
+
+                >p {
+                    width: 219px;
+                    height: 100px;
+                    padding-left: 12px;
+                    font-family: PingFang SC, PingFang SC;
+                    font-weight: 400;
+                    font-size: 16px;
+                    color: #333333;
+                    line-height: 22px;
+                    text-align: left;
+                    font-style: normal;
+                    text-transform: none;
+
+                }
+
+                >p:hover {
+                    box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
+                }
+            }
+        }
+
+    }
+}

+ 61 - 23
components/detail/HotNews.vue

@@ -1,20 +1,26 @@
 <template>
     <div class="hotList">
         <div class="title">
-            今日热点
+            最新资讯
             <em></em>
         </div>
-        <div class="hotList_photo_text">
-            <NuxtLink :to="`/newsDetail/${1}`" target="_blank">
-                <img src="../../public/index/01.png" alt="">
+        <div class="hotList_photo_text" v-for="(item, index) in hotNewsListImg" :key="index">
+            <NuxtLink :to="item.linkurl" v-if="item.islink == 1" :title="item.title">
+                <img :src="item.imgurl" alt="">
                 <span class="jingxuan">精选</span>
-                <div class="hotlist_text">安徽黄山:雪景如画</div>
+                <div class="hotlist_text">{{ item.title }}</div>
+            </NuxtLink>
+            <NuxtLink :to="`/newsDetail/${item.id}`" v-if="item.islink == 0" :title="item.title">
+                <img :src="item.imgurl" alt="">
+                <span class="jingxuan">精选</span>
+                <div class="hotlist_text">{{ item.title }}</div>
             </NuxtLink>
         </div>
         <ul class="message">
-            <li class="messageList" v-for="(item, index) in 5">
-                <NuxtLink :to="`/newsDetail/${1}`" target="_blank">
-                    最高检:将研究出台低龄未成年人严重暴力犯罪核准追诉意见
+            <li class="messageList" v-for="(item, index) in hotNewsList" :key="index">
+                <NuxtLink :to="item.linkurl" v-if="item.islink == 1" :title="item.title">{{ item.title }}</NuxtLink>
+                <NuxtLink :to="`/newsDetail/${item.id}`" v-if="item.islink == 0" :title="item.title">
+                    {{ item.title }}
                 </NuxtLink>
             </li>
         </ul>
@@ -23,23 +29,55 @@
 
 <script setup>
 
-//获得axios
-const nuxtApp = useNuxtApp();
-const axios = nuxtApp.$axios;
-
-import { onMounted } from 'vue'
-
 const hotNewsList = ref([])
-
-//获取详情
-const getHotNews = async () => {
-    const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${14}&level=${4}`);
-    hotNewsList.value = response.data;
+async function getPageData() {
+    const mkdata = await requestDataPromise('/web/getWebsiteArticlett', {
+        method: 'GET',
+        query: {
+            'pageSize': 5,
+            'level': 4,
+            'id': 0,
+        },
+    });
+    if (mkdata.code == 200) {
+        hotNewsList.value = mkdata.data;
+        console.log("11111111111111111111111111", hotNewsList.value);
+        
+    } else {
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+        console.log("错误位置:获取最新资讯")
+        console.log("后端错误反馈:", mkdata.message)
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    }
 }
-
-onMounted(() => {
-    getHotNews()
-})
+getPageData();
+const hotNewsListImg = ref([])
+async function getPageData1() {
+    const mkdata = await requestDataPromise('/web/getWebsiteArticlett', {
+        method: 'GET',
+        query: {
+            'pageSize': 5,
+            'level': 4,
+            'id': 0,
+        },
+    });
+    if (mkdata.code == 200) {
+        for (let item of mkdata.data) {
+            if (item.imgurl) {
+                if (hotNewsListImg.value.length < 1) {
+                    hotNewsListImg.value.push(item)
+                }
+            }
+        }
+        // hotNewsListImg.value = mkdata.data;
+    } else {
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+        console.log("错误位置:获取最新资讯")
+        console.log("后端错误反馈:", mkdata.message)
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    }
+}
+getPageData1();
 </script>
 
 <style lang="less" scoped>

+ 53 - 24
components/detail/HotNews2.vue

@@ -5,43 +5,72 @@
             <em></em>
         </div>
         <div class="hotNews_photo_text">
-            <div class="photo_left" v-for="(item, index) in 2">
-                <NuxtLink :to="`/newsDetail/${1}`" target="_blank">
-                    <img src="../../public/index/01.png" alt="">
-                    <div class="hotNews_text">安徽漫山遍野的梅花竞相绽放,迎来了一年一度的梅花节。</div>
+            <div class="photo_left" v-for="(item, index) in hotNewsListImg">
+                <NuxtLink :to="`/newsDetail/${item.id}`">
+                    <img :src="item.imgurl" alt="">
+                    <div class="hotNews_text">{{ item.title }}</div>
                 </NuxtLink>
             </div>
         </div>
         <ul class="hotNews_message">
-            <li class="hotNews_messageList" v-for="(item, index) in 7">
-                <NuxtLink :to="`/newsDetail/${1}`" target="_blank">
-                    最高检:将研究出台低龄未成年人严重暴力犯罪核准追诉意见
+            <li class="hotNews_messageList" v-for="(item, index) in hotNewsList" :key="index">
+                <NuxtLink :to="item.linkurl" v-show="item.islink == 1" :title="item.title">{{ item.title }}</NuxtLink>
+                <NuxtLink :to="`/newsDetail/${item.id}`" v-if="item.islink == 0" :title="item.title">{{ item.title }}
                 </NuxtLink>
             </li>
         </ul>
-
     </div>
 </template>
 
 <script setup>
-
-//获得axios
-const nuxtApp = useNuxtApp();
-const axios = nuxtApp.$axios;
-
-import { onMounted } from 'vue'
-
+const hotNewsListImg = ref([])
 const hotNewsList = ref([])
-
-//获取详情
-const getHotNews = async () => {
-    const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${5}&level=${4}&placeid=${15}`);
-    hotNewsList.value = response.data;
+async function getPageData() {
+    const mkdata = await requestDataPromise('/web/getWebsiteArticlett', {
+        method: 'GET',
+        query: {
+            'pageSize': 7,
+            'level': 5,
+            'placeid': 0,
+            'id': 0
+        },
+    });
+    if (mkdata.code == 200) {
+        hotNewsList.value = mkdata.data;
+    } else {
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+        console.log("错误位置:获取热点精选")
+        console.log("后端错误反馈:", mkdata.message)
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    }
 }
-
-onMounted(() => {
-    getHotNews()
-})
+getPageData();
+async function getPageData1() {
+    const mkdata = await requestDataPromise('/web/getWebsiteArticlett', {
+        method: 'GET',
+        query: {
+            'pageSize': 30,
+            'level': 5,
+            'placeid': 1,
+            'id': 0
+        },
+    });
+    if (mkdata.code == 200) {
+        for (let item of mkdata.data) {
+            if (item.imgurl) {
+                if (hotNewsListImg.value.length < 2) {
+                    hotNewsListImg.value.push(item)
+                }
+            }
+        }
+    } else {
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+        console.log("错误位置:获取热点精选")
+        console.log("后端错误反馈:", mkdata.message)
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    }
+}
+getPageData1();
 </script>
 
 

+ 19 - 36
components/home/Advertising.vue

@@ -1,55 +1,38 @@
 <template>
-    <!-- 广告位 -->
-    <div class="adversing">
+    <div class="adversing" v-if="imgurl">
         <div class="inner">
-            <a href="http://www.baidu.com">
-                <!-- <img :src="imgurl.thumb" alt=""> -->
-                <img :src="imgurl.thumb" v-if="!imgurl.image_src">
-                <img :src="imgurl.image_src" v-if="imgurl.image_src">
+            <a href="http://nzgxw.org.cn/" v-if="imgurl.image_url==null" target="_blank" :title="imgurl.place_name">
+                <img :src="imgurl.thumb" :title="imgurl.place_name">
+            </a>
+            <a :href="imgurl.image_url" v-else>
+                <img :src="imgurl.image_src" :title="imgurl.ad_name">
             </a>
         </div>
-        <p>{{ message }}</p>
     </div>
 </template>
 
 <script setup>
-import { onMounted } from 'vue'
-
-const nuxtApp = useNuxtApp();
-const axios = nuxtApp.$axios;
-
+//import {onMounted } from 'vue';
 const props = defineProps({
-    imgurl: String
+    imgurl: Array
 });
-
-
-let image = useState("image", () => "")
-let getWebsiteAdvertisement = async () => {
-    try {
-        const response = await axios.get(`/web/getWebsiteAdvertisement?adPlace=${9}`);
-        console.log(response);
-        image.value = response.data;
-    } catch (error) {
-        console.error(error);
-    }
-}
-
-onMounted(() => {
-    getWebsiteAdvertisement()
-})
-
+//广告移动至客户端获取,并且按照标识单独获取
 </script>
 
 <style lang="less">
 // 广告位logo
 .adversing {
-    width: 100%;
+    width: 1200px;
     height: 90px;
-    margin: 60px 0 60px;
-
-    img {
-        width: 1200px;
-        height: 90px;
+    margin:0 auto;
+    margin-top: 20px;
+    margin-bottom: 20px;
+    overflow: hidden;
+    a {
+        display: block;
     }
+    img {
+        width: 100%;
+    }  
 }
 </style>

+ 20 - 15
components/home/BigSwiper.vue

@@ -1,7 +1,7 @@
 <template>
     <!-- 首页大的轮播图 -->
     <div class="swiper">
-        <el-carousel height="400px">
+        <el-carousel height="400px" v-if="imagelist">
             <el-carousel-item v-for="(item, index) in imagelist" :key="index">
                 <NuxtLink :to="`/newsDetail/${item.id}`" target="_blank">
                     <img :src="item.imgurl" alt="">
@@ -18,23 +18,28 @@
 import { ElCarousel, ElCarouselItem } from 'element-plus'
 import { onMounted } from 'vue'
 
-const nuxtApp = useNuxtApp();
-const axios = nuxtApp.$axios;
-
+//轮播图数据
 let imagelist = useState("imageList", () => "")
-let lunbo = async () => {
-    try {
-        const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${5}&level=${2}&placeid=${0}`);
-        // console.log(response.data);
-        imagelist.value = response.data;
-    } catch (error) {
-        console.error(error);
+async function getModelData1() {
+    const mkdata =  await requestDataPromise('/web/getWebsiteArticlett', {
+        method: 'GET',
+        query: {
+            'pageSize': 5,
+            'level': 2,
+            'placeid': 0,
+            'id':0,
+        },
+    });
+    if(mkdata.code == 200){
+        imagelist.value = mkdata.data;
+    }else{
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+        console.log("错误位置:设置大标题")
+        console.log("后端错误反馈:",mkdata.message)
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     }
 }
-
-onMounted(() => {
-    lunbo()
-})
+getModelData1()
 
 
 </script>

+ 110 - 321
components/home/foot.vue

@@ -1,359 +1,148 @@
 <template>
     <footer class="index_foot">
-        <!-- <div class="index_foot_name_box">
-            <div class="index_foot_name">YOUQING</div>
-            <div class="index_foot_name">友情链接</div>
-            <div class="index_foot_name">LIANJIE</div>		
-        </div> -->
         <div class="foot_img_box">
-            <a :href="item.url" v-for="(item, index) in bottomLink" target="_blank">
-                <img :src="item.logo_url" alt="">
+            <a :href="item.url" v-for="(item, index) in bottomLink" :title="item.title" target="_blank">
+                <img :src="item.logo_url" :alt="item.title">
             </a>
         </div>
         <div class="foot_frind_box">
             <span>友情链接</span>
             <div>
-                <a :href="item.url" v-for="(item, index) in bottomText" :key="index" target="_blank">{{ item.title
-                }}</a>
+                <a :href="item.url" v-for="(item, index) in bottomText" :key="index" :title="item.title"
+                    target="_blank">{{ item.title }}</a>
             </div>
         </div>
     </footer>
 
     <div class="call_us_box">
-        <div class="inner">
-            <span v-for="(item, index) in bottomMenu" :key="index">
-                <NuxtLink :to="{ path: `/specialList/${item.id}` }" target="_blank" v-if="item.type == 1">
-                    {{ item.name }}
-                </NuxtLink>
-                <NuxtLink :to="{ path: `/speciaArticle/${item.id}` }" target="_blank" v-if="item.type == 0">
-                    {{ item.name }}
-                </NuxtLink>
-            </span>
-        </div>
-
+        <span v-for="(item, index) in bottomMenu" :key="index">
+            <NuxtLink :to="{ path: `/specialList/${item.id}` }" v-if="item.type == 1" :title="item.name">
+                {{ item.name }}
+            </NuxtLink>
+            <NuxtLink :to="{ path: `/speciaArticle/${item.id}` }" v-if="item.type == 0" :title="item.name">
+                {{ item.name }}
+            </NuxtLink>
+        </span>
     </div>
     <footer class="index_foot">
-        <div class="foot_text_box">
-            <p class="top_content">
-                {{ bottomBase.statement }}
-                <a :href="bottomBase.record_number_url" target="_blank">乡村网</a>
-                {{ bottomBase.statement_two }}
-            </p>
-            <!-- <p>{{ bottomBase.statistics_onetext }} <a :href="'http://' + bottomBase.statistics_twourl">中农兴业</a> {{ bottomBase.statistics_twotext }}</p> -->
-            <p class="webSitecolor">
-                {{ bottomBase.statistics_onetext }}
-                <a :href="bottomBase.record_number_url" target="_blank" class="webSitecolor">中农兴业</a>
-                {{ bottomBase.statistics_twotext }}
-            </p>
-            <p>
-                {{ bottomBase.organizer }}
-                <a :href="bottomBase.record_number_url" target="_blank">{{ bottomBase.record_number }}</a> &nbsp;&nbsp;
-                <img :src="bottomBase.icp_number_img">
-                <a :href="bottomBase.icp_number_url" target="_blank">
-                    {{ bottomBase.icp_number }}
-                </a>
-            </p>
-            <p>{{ bottomBase.company_address }}</p>
-            <p class="top_content">
-                {{ bottomBase.email }}
-                {{ bottomBase.contact_number }}
-            </p>
+        <div class="foot_text_box" v-if="bottomBase">
+            <p v-html="bottomBase.statement" class="foot_text_html_css"></p>
+            <p v-html="bottomBase.organizer" class="foot_text_html_css"></p>
+            <p v-html="bottomBase.copyright_information" class="foot_text_html_css"></p>
+            <p><span v-html="bottomBase.icp_number" class="foot_text_html_css"></span><span
+                    v-html="bottomBase.record_number" class="foot_text_html_css"></span></p>
+            <p v-html="bottomBase.email" class="foot_text_html_css"></p>
+            <p v-html="bottomBase.company_address" class="foot_text_html_css"></p>
+            <p v-html="bottomBase.contact_number" class="foot_text_html_css"></p>
         </div>
-        <div class="foot_logo_out">
-            <a :href="'http://' + bottomBase.company_url" :title="bottomBase.company_name" target="_blank">
-                <img :src="bottomBase.project_logo" class="floatLogoLeft" :alt="bottomBase.company_name">
+        <div class="foot_logo_out" v-if="bottomBase">
+            <a :href="'http://' + bottomBase.project_url" :title="bottomBase.project_name"
+                v-if="bottomBase.project_logo != '' && bottomBase.project_url != ''">
+                <img :src="bottomBase.project_logo" class="floatLogoRight" :alt="bottomBase.project_name">
             </a>
+            <span v-else-if="bottomBase.project_logo != '' && bottomBase.project_url == ''">
+                <img :src="bottomBase.project_logo" class="floatLogoRight" :alt="bottomBase.project_name">
+            </span>
+            <a :href="'http://' + bottomBase.company_url" :title="bottomBase.company_name"
+                v-if="bottomBase.company_logo != '' && bottomBase.company_url != ''">
+                <img :src="bottomBase.company_logo" class="floatLogoLeft" :alt="bottomBase.company_name">
+            </a>
+            <span v-else-if="bottomBase.company_logo != '' && bottomBase.company_url == ''">
+                <img :src="bottomBase.company_logo" class="floatLogoLeft" :alt="bottomBase.company_name">
+            </span>
         </div>
         <div class="foot_last_img_box">
-            <a :href="item.url" v-for="(item, index) in bottomphoto" target="_blank">
-                <img :src="item.logo_url" alt="">
+            <a :href="item.url" v-for="(item, index) in bottomphoto" :title="item.title">
+                <img :src="item.logo_url" :alt="item.title">
             </a>
         </div>
+
+        <!--在线客服-->
+        <!-- <div class="kefu">
+            <div class="kefu_itemKf">
+                <a :href="bottomBase.online_service" target="_blank">
+                    <img src="https://img.bjzxtw.org.cn/pre/public/image/online1.png">
+                    <p>在线客服</p>
+                </a>
+            </div>
+            <div class="kefu_itemQQ">
+                <img src="https://img.bjzxtw.org.cn/pre/public/image/qq1.png">
+                <p>QQ客服</p>
+                <div class="kefu_item_content_QQ">
+                    <div @click="addQQFriend(qq1)" class="qqadd">
+                        <img src="https://img.bjzxtw.org.cn/pre/public/index/tubiao1.png" width="100">
+                        <div class="qqfs">{{ bottomBase.customer_service_qq }}</div>
+                    </div>
+                    <div @click="addQQFriend(qq2)" class="qqadd">
+                        <img src="https://img.bjzxtw.org.cn/pre/public/index/tubiao2.png" width="100">
+                        <div class="qqfs">{{ bottomBase.communications }}</div>
+                    </div>
+                    <div class="arrow"></div>
+                </div>
+            </div>
+            <div class="kefu_itemPhone">
+                <img src="https://img.bjzxtw.org.cn/pre/public/image/dianhua1.png">
+                <p>电话客服</p>
+                <div class="kefu_item_content_phone">
+                    <div class="kefu_item_content_phone_title">联系电话:</div>
+                    <div>{{ bottomBase.customer_service }}</div>
+                    <div class="arrow"></div>
+                </div>
+            </div>
+        </div> -->
     </footer>
 </template>
 
 <script setup>
-import { onMounted } from 'vue';
-const nuxtApp = useNuxtApp();
-const axios = nuxtApp.$axios;
-
-// const props = defineProps({
-//     bottomLink: Array,
-//     bottomMenu: Array,
-//     bottomBase: Object
-// });
+//0.添加网站客服 start---------------------------------------->
+//添加网站客服
+function addQQFriend(qqNumber) {
+    // 使用tencent协议唤起QQ客户端并添加好友
+    window.location.href = `tencent://message/?uin=${qqNumber}&Site=&Menu=yes`;
+}
+//0.添加网站客服 end---------------------------------------->
 
-//获得友情链接 图片
+//获得底部基本信息 start---------------------------------------->
+//1.获得全部友情链接与底部图片
 const bottomLink = ref([])
-const getBottomLink = async () => {
-    const response = await axios.get(`/web/selectWebsiteLinks?&type=${1}&num=${7}`);
-    bottomLink.value = response.data;
-    console.log(bottomLink.value)
-}
-//文字
 const bottomText = ref([])
-const getBottomLink2 = async () => {
-    const response = await axios.get(`/web/selectWebsiteLinks?&type=${2}&num=${8}`);
-    bottomText.value = response.data;
-    console.log(bottomLink.value)
-}
-//底部
 const bottomphoto = ref([])
-const getBottomLink1 = async () => {
-    const response = await axios.get(`/web/selectWebsiteLinks?&type=${3}&num=${4}`);
-    bottomphoto.value = response.data;
-    console.log(bottomphoto.value)
-}
-
-//获得底部导航
 const bottomMenu = ref([])
-const getBottomMenu = async () => {
-    const response = await axios.get(`/web/getWebsiteFooterCategory`);
-    bottomMenu.value = response.data;
-    console.log(bottomMenu.value)
-}
-
-//获得底部基本信息
 const bottomBase = ref({})
-const getBottomBase = async () => {
-    const response = await axios.get(`/web/getWebsiteFootInfo`);
-    bottomBase.value = response.data.website_foot;
-    console.log(7777777)
-    console.log('bottomBase', bottomBase.value)
-}
-
-
-onMounted(() => {
-    getBottomLink();
-    getBottomLink1();
-    getBottomLink2();
-    getBottomMenu();
-    getBottomBase();
-    //获取域名
-    getDomain()
-})
 
-//获取当前域名
-const currentDomain = ref('')
-const currentDomainUrl = ref('')
-
-const getDomain = () => {
-    if (process.client) {
-        const url = new URL(window.location.href)
-        currentDomainUrl.value = url.hostname // 获取域名
-        currentDomain.value = url.origin //协议和域名
+const qq1 = ref("")
+const qq2 = ref("")
+
+async function getModelDataAll() {
+    const mkdata = await requestDataPromise('/web/getWebsiteFootAll', {
+        method: 'GET',
+        query: {
+            'link_textnum': 8,
+            'link_imgnum': 12,
+            'link_footnum': 4
+        },
+    });
+    if (mkdata.code == 200) {
+        bottomLink.value = mkdata.data.link_img;
+        bottomText.value = mkdata.data.link_text;
+        bottomphoto.value = mkdata.data.link_foot;
+        bottomMenu.value = mkdata.data.foot_cate;
+        bottomBase.value = mkdata.data.foot_info;
+        //获取qq号数字部分
+        qq1.value = bottomBase.value.customer_service_qq.match(/\d+/g);
+        qq2.value = bottomBase.value.communications.match(/\d+/g);
+
+    } else {
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+        console.log("错误位置:获取友情链接图片")
+        console.log("后端错误反馈:", mkdata.message)
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     }
 }
+getModelDataAll();
+//获得底部基本信息 end---------------------------------------->
 </script>
 
 <style lang="less" scoped>
-.index_foot {
-    box-sizing: border-box;
-    width: 1200px;
-    margin: 0 auto;
-}
-
-.index_foot_name_box {
-    margin: 40px auto 0px;
-    text-align: center;
-    font-size: 0px;
-}
-
-.index_foot_name {
-    display: inline-block;
-    height: 67px;
-    line-height: 67px;
-    color: #f2f9f4;
-    font-size: 51px;
-    font-weight: bold;
-    overflow: hidden;
-}
-
-.index_foot_name:nth-of-type(even) {
-    color: #333;
-    font-size: 32px;
-}
-
-.foot_img_box {
-    overflow: hidden;
-    display: block;
-    // margin: 40px auto 0;
-    width: 100%;
-    display: flex;
-    justify-content: space-between;
-    flex-wrap: wrap;
-}
-
-.foot_img_box>* {
-    margin-top: 20px;
-    float: left;
-    width: 170px;
-    height: 57px;
-    overflow: hidden;
-    /* box-sizing: border-box; */
-    border: solid 1px #D7EDD4;
-}
-
-.foot_img_box>* * {
-    display: block;
-    width: 100%;
-    height: 100%;
-}
-
-.foot_img_box>*:nth-of-type(7n) {
-    margin-right: 0px;
-}
-
-.foot_frind_box {
-    display: block;
-    margin: 30px auto;
-    overflow: hidden;
-    display: flex;
-    width: 100%;
-}
-
-.foot_frind_box span {
-    word-break: keep-all;
-    white-space: nowrap;
-    line-height: 22px;
-    font-size: 16px;
-    color: #333;
-    font-weight: bold;
-}
-
-.foot_frind_box div {
-    width: 100%;
-    overflow: hidden;
-}
-
-.foot_frind_box div * {
-    float: left;
-    line-height: 22px;
-    height: 22px;
-    color: #333;
-    font-size: 16px;
-    margin: 0 30px;
-}
-
-.call_us_box {
-    display: block;
-    width: 100%;
-    margin: 30px auto 0;
-    overflow: hidden;
-    text-align: center;
-    font-size: 0px;
-    background: #a01c0e;
-
-    a {
-        color: #fff;
-    }
-}
-
-.inner {
-    width: 1200px;
-    margin: 0 auto;
-}
-
-.inner>* {
-    height: 12px;
-    line-height: 12px;
-    color: #fff;
-    font-size: 14px;
-    display: inline-block;
-    box-sizing: border-box;
-    padding: 0 19px;
-    font-weight: bold;
-    border-left: solid 1px #7e1c11;
-    margin: 18px 0;
-}
-
-.inner>*:nth-of-type(1) {
-    border-left: 0px;
-}
-
-.foot_text_box {
-    margin: 20px auto 0px;
-    text-align: center;
-    color: #333;
-    font-size: 14px;
-    line-height: 25px;
-
-    p {
-        a {
-            color: #333;
-            font-size: 14px;
-        }
-
-        .webSitecolor {
-            color: #a01c0e;
-        }
-    }
-}
-
-.top_content {
-    padding: 0 170px;
-}
-
-.webSitecolor {
-    color: #a01c0e;
-}
-
-.foot_text_box_green {
-    color: #a01c0e;
-}
-
-.foot_text_box img {
-    display: inline-block;
-    height: 20px;
-    vertical-align: middle;
-}
-
-.foot_logo_out {
-    position: relative;
-    margin: 0px auto;
-    width: 100%;
-    height: 0px;
-}
-
-.foot_logo_out * {
-    width: 120px;
-    display: block;
-}
-
-.foot_logo_out>* {
-    position: absolute;
-    top: -100px;
-}
-
-.foot_logo_out>*:nth-of-type(1) {
-    left: 0px;
-}
-
-.foot_logo_out>*:nth-of-type(2) {
-    right: 0px;
-}
-
-.foot_last_img_box {
-    margin: 20px auto 10px;
-    text-align: center;
-    overflow: hidden;
-    width: 100%;
-    font-size: 0px;
-    padding-bottom: 40px;
-}
-
-.foot_last_img_box>* {
-    height: 50px;
-    width: 150px;
-    margin: 0px 12px;
-    display: inline-block;
-    overflow: hidden;
-}
-
-.foot_last_img_box>* * {
-    display: block;
-    height: 100%;
-    width: 100%;
-    overflow: hidden;
-}
+@import '@/assets/css/foot.less';
 </style>

+ 170 - 142
components/home/pageHead.vue

@@ -4,11 +4,7 @@
             <div class="inner">
                 <div class="left">
                     <span>中农兴业网团</span>
-                    <span>
-                        旗下网站
-                        <em></em>
-                        政府类农业百强网站!
-                    </span>
+                    <span>旗下网站: 政府类农业百强网站!</span>
                 </div>
                 <div class="right">
                     <div class="menu">
@@ -26,40 +22,37 @@
                         <button class="reg" @click="goRegister" v-show="!showToken">
                             <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/topicon4.png" alt="注册">注册
                         </button>
-                        <el-popover placement="top-start" :width="100" trigger="click" algin="center">
-                            <template #reference>
-                                <span v-show="showToken">
-                                    <em class="iconfont icon-gerenzhongxin"></em>{{username}}
-                                </span>
-                            </template>
-                            <p class="exit" @click="gotosystem">个人中心</p>
-                            <p class="exit" @click="exit">退出</p>
-                        </el-popover>
+                        <button class="reg" @click="userCenter" v-show="showToken">
+                            <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/topicon3.png" alt="用户信息">{{ username }}
+                        </button>
                         <button class="reg" @click="goSearch">
                             <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/head/searchicon.png" alt="搜索">搜索
                         </button>
                     </div>
+                    <ul class="userInfo11" v-if="isShow">
+                        <li @click="gotosystem">个人中心</li>
+                        <li @click="exit">退出</li>
+                    </ul>
                 </div>
             </div>
         </nav>
         <div class="headerLogo">
-            <div class="inner">
+            <div class="inner" v-if="logo">
                 <img :src="logo" :alt="webSiteName" class="left" @click="backHome">
                 <div class="titlead" v-if="adImg">
                     <a href="http://sannongdy.org.cn/" v-if="adImg.image_url==null" target="_blank">
-                        <img :src="adImg.thumb" >
+                        <img :src="adImg.thumb" :title="adImg.place_name">
                     </a>     
                     <a :href="adImg.image_url" v-else>
-                        <img :src="adImg.image_src">
+                        <img :src="adImg.image_src" :title="adImg.ad_name">
                     </a>
                 </div>
             </div>
         </div>
-        <el-dialog v-model="dialogTableVisible" title="" width="800">
+        <el-dialog v-model="dialogTableVisible" width="800">
             <div class="tips">
                 <p>
-                    <img src="../../public/topic/tips.png" alt="请联系管理员">
-                    提示:注册请联系管理员操作!
+                    <img src="http://img.bjzxtw.org.cn/master/bjzxtw/public/topic/tips.png"> 提示:注册请联系管理员操作!
                 </p>
                 <p>联系电话:010-56019387</p>
                 <p>QQ : 2909421493 、213552413</p>
@@ -78,18 +71,24 @@ import { setTicket, removeTicket } from '@/store/useticketStore'
 const { $webUrl, $CwebUrl, $BwebUrl} = useNuxtApp()
 //1.加载基本依赖 end ---------------------------------------->
 
-//1.登录 start ---------------------------------------->
+//1.登录逻辑 start ---------------------------------------->
 let ticket = ref('')
 let token = ref('')
 let route = useRoute()
 ticket.value = route.query.ticket
 token.value = route.query.admintoken
-//判断token状态
-if (ticket.value){setTicket(ticket.value)}
-if (token.value){setToken(token.value)}
-definePageMeta({middleware: 'auth'});
-
+if (ticket.value) {
+    setTicket(ticket.value)
+}
+if (token.value) {
+    setToken(token.value)
+}
+definePageMeta({
+    middleware: 'auth'
+});
 
+//搜索框
+let keyword = useState('keyword', () => '')
 //用户名
 let username = useState('username', () => '用户中心')
 //是否删除
@@ -97,8 +96,6 @@ let isDel = useState('isDel', () => 1)
 //是否显示用户中心
 let isShow = useState('isShow', () => false)
 
-
-//获取登录token
 let token1 = useState("token1", () => '')
 let showToken = useState("showToken", () => '')
 token1.value = getToken()
@@ -106,21 +103,29 @@ token1.value = getToken()
 //检测登录状态
 let tokenStatus = ref('');
 tokenStatus.value = getToken()
+if(tokenStatus.value == undefined){
+    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    console.log('错误:未获取到用户token,如果在本地测试请忽略!');
+    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+}else{
+    console.log(tokenStatus.value);
+}
 
 //点击登录按钮
 let goLogin = () => {
+    //开启线上登录模式 start---------------------------------------->
     isDel.value = 0
     token1.value = getToken()
     window.open($BwebUrl + "/auth/login.php?backurl=" + $CwebUrl, '_blank');
-    
+    //开启线上登录模式 end---------------------------------------->
+
+    //开启本地登录模式 start---------------------------------------->
     // window.location.href = $BwebUrl + "/auth/login.php?backurl=" + $CwebUrl;
-    // "http://adminpre.bjzxtw.org.cn/auth/login.php?backurl=http://nwpre.bjzxtw.org.cn";
-    // token1.value = getToken()
-    // navigateTo.back()
+    //"http://adminpre.bjzxtw.org.cn/auth/login.php?backurl=http://nwpre.bjzxtw.org.cn";
+    //开启本地登录模式 end---------------------------------------->
 }
 let dialogTableVisible = ref(false)
 
-
 //点击注册按钮
 let goRegister = () => {
     dialogTableVisible.value = true
@@ -137,58 +142,54 @@ let userCenter = () => {
     }
 }
 
-//获取用户登录信息
-let getUserInfo = async () => {
-    const responseStatus =  await requestDataPromise('/user/getUserInfo', {
-        method: 'GET',
-        query: {},
-    });
-    console.log('用户信息:', responseStatus);
-    //如果能拿到信息,就赋值给username
-    if(responseStatus.code==200){
-        username.value = responseStatus.data.nickname
-    }else{
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-        console.log("错误位置:查询用户登录信息")
-        console.log("后端错误反馈:",responseStatus.message)
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    }
-}
-getUserInfo();
-
-//获取登录状态
-let getLoginStatus = async () => {
-    //let url = $BwebUrl + '/auth/loginstatus.php' //王鹏
-    let url = $webUrl + '/api/loginStatus' //刘佳伟
-    const responseStatus =  await requestDataWebUrl( url, {
-        method: 'GET',
-        query: {
-            'token': tokenStatus
-        },
-    });
-    console.log('登录状态', responseStatus);
-    if(responseStatus.data.code == 200){
-        if(responseStatus.data.data.islogin == true){
-            showToken.value = true 
-        }else{
-            showToken.value = false
-            exit()
-        }
-    }else if(responseStatus.data.code == 0){
-        //退出登录
-        exit();
-    }
-}
-getLoginStatus();
+// //获取用户登录信息
+// let getUserInfo = async () => {
+//     const responseStatus =  await requestDataPromise('/user/getUserInfo', {
+//         method: 'GET',
+//         query: {},
+//     });
+//     //console.log('用户信息:', responseStatus);
+//     //如果能拿到信息,就赋值给username
+//     if(responseStatus.code==200){
+//         username.value = responseStatus.data.nickname
+//     }
+// }
+// getUserInfo();
+
+// //获取登录状态
+// let getLoginStatus = async () => {
+//     //let url = $BwebUrl + '/auth/loginstatus.php' //王鹏
+//     let url = $webUrl + '/api/loginStatus' //刘佳伟
+//     const responseStatus =  await requestDataWebUrl( url, {
+//         method: 'GET',
+//         query: {
+//             'token': tokenStatus
+//         },
+//     });
+//     console.log('登录状态', responseStatus);
+//     if(responseStatus.data.code == 200){
+//         if(responseStatus.data.data.islogin == true){
+//             showToken.value = true 
+//         }else{
+//             showToken.value = false
+//             exit()
+//         }
+//     }else if(responseStatus.data.code == 0){
+//         //退出登录
+//         exit();
+//     }
+// }
+// getLoginStatus();
+//2.登录逻辑 end ---------------------------------------->
 
-//跳转到个人中心
+//3.跳转菜单逻辑 start ---------------------------------------->
 let gotosystem = () => {
     let url = $BwebUrl + '/#/login?userurl=' + $CwebUrl;
     //window.location.href = url; 
     window.open(url, '_blank');
 }
 
-//退出登录
+//点击退出按钮
 let exit = () => {
     window.location.href = $CwebUrl;
 
@@ -201,39 +202,6 @@ let exit = () => {
     removeTicket()
 }
 
-//监听token状态
-watch(token1, (newval, oldval) => {
-    showToken.value = newval
-}, {
-    deep: true,
-    immediate: true,
-})
-
-//2.登录逻辑 end ---------------------------------------->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-//3.跳转菜单逻辑 start ---------------------------------------->
-
-//搜索框
-let keyword = useState('keyword', () => '')
-
-
 //点击返回首页
 let backHome = () => {
     window.location.href = $CwebUrl;
@@ -267,6 +235,14 @@ let goTopic = () => {
     }
 }
 
+//监听token状态
+watch(token1, (newval, oldval) => {
+    //console.log(newval, oldval);
+    showToken.value = newval
+}, {
+    deep: true,
+    immediate: true,
+})
 
 //获得网站logo
 const logo = ref("")
@@ -276,29 +252,21 @@ let getLogo = async () => {
         method: 'GET',
         query: {},
     });
-    if(responseStatus.code == 200){
-        logo.value = responseStatus.data.website_head.logo;
-        webSiteName.value = responseStatus.data.website_head.website_name;
-    }else{
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-        console.log("错误位置:设置logo旁广告")
-        console.log("后端错误反馈:",responseStatus.message)
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    }
-    
+    console.log('网站logo:', responseStatus);
+    logo.value = responseStatus.data.website_head.logo;
+    webSiteName.value = responseStatus.data.website_head.website_name;
 }
 getLogo();
 //3.跳转菜单逻辑 end ---------------------------------------->
 
-
 //4.获取广告 start ---------------------------------------->
 //let adList = ref([]);
 let adImg = ref({})
 async function getAdData(){
-    const adData = await requestDataPromise('/web/getWebsiteAdvertisement',{method:'GET',query:{'ad_tag':'INDEDX'}});
+    const adData = await requestDataPromise('/web/getWebsiteAdvertisement',{method:'GET',query:{'ad_tag':'xcw_top'}});
     if(adData.code == 200){
         for(let item of adData.data){
-            if(item.ad_tag == 'SNZXWT_INDEDX_0001'){
+            if(item.ad_tag == 'xcw_top'){
                 adImg.value = item;
             }
         }
@@ -314,28 +282,58 @@ getAdData();
 </script>
 
 <style lang="less" scoped>
+.userInfo11 {
+    width: 100px;
+    height: 80px;
+    background-color: #fff;
+    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
+    border-radius: 3px;
+    position: absolute;
+    top: 40px;
+    right: 35px;
+    font-size: 14px;
+    z-index: 999;
+
+    li {
+        height: 40px;
+        line-height: 40px;
+        color: #333333;
+        padding-left: 10px;
+    }
+
+    >li:hover {
+        color: #028E21;
+    }
+}
+
 .tips {
     padding: 20px 0;
     text-align: center;
     font-size: 20px;
-    color: #333333;
+    color: #40663B;
     font-weight: bold;
+
     img {
         width: 78px;
         height: 78px;
         vertical-align: middle;
         margin-right: 20px;
+
         p {
             line-height: 30px;
         }
     }
+
     p {
         line-height: 40px;
     }
+
     >p:first-child {
         margin-bottom: 30px;
     }
+
 }
+
 /* 页面头部 */
 header {
     width: 100%;
@@ -343,27 +341,24 @@ header {
     font-size: 12px;
     font-family: PingFang SC-Regular;
     color: #666666;
-    background: url("../../public/head/headtopbg.png") repeat-x;
+    background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/head/headtopbg.png") repeat-x;
 }
+
 .headerNav {
     width: 100%;
     height: 33px;
     line-height: 33px;
 }
+
 .headerNav .left>span {
     margin-right: 47px;
 }
-.headerNav .left span em {
-    display: inline-block;
-    width: 2px;
-    height: 2px;
-    background: #666666;
-    border-radius: 1px;
-    vertical-align: middle;
-}
+
 .headerNav .right {
     display: flex;
     margin-right: 10px;
+    position: relative;
+
     button {
         font-size: 12px;
         color: #666666;
@@ -371,6 +366,7 @@ header {
         background: none;
         cursor: pointer;
     }
+
     .login {
         width: 36px;
         height: 19px;
@@ -380,10 +376,12 @@ header {
         margin-right: 15px;
         cursor: pointer;
     }
+
     .menu,
     .right-top-menu {
         display: flex;
     }
+
     .reg {
         margin-right: 20px;
         display: flex;
@@ -396,12 +394,15 @@ header {
         }
     }
 }
+
 .headerNav .right {
     float: right;
     font-size: 12px;
+
     span {
         margin-right: 20px;
     }
+
     .home,
     .collection {
         display: inline-block;
@@ -409,35 +410,58 @@ header {
         height: 16px;
         vertical-align: -3px;
     }
+
     .home {
-        background-image: url("../../public/image/Iconly/Light/Home.png");
+        background-image: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/image/search.png");
     }
+
     .collection {
-        background-image: url("../../public/image/Iconly/Light/Star.png");
+        background-image: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/image/search.png");
     }
+
     .exit {
         line-height: 30px;
     }
+
+    // .exit:hover{
+    //     color: #028E21;
+    // }
 }
+
 /* // 头部logo */
 .headerLogo {
-    height: 174px;
+    height: 185px;
     position: relative;
+    //background: url("../../public/head/topBg.png") no-repeat center;
     .titlead {
         position: absolute;
-        bottom: 30px;
-        right: 0px;
+        bottom: 33px;
+        right: 26px;
+        width: 830px;
+        height: 110px;
+        overflow: hidden;
+        a {
+            display: block;
+            width: 830px;
+            height: 110px;
+            overflow: hidden;
+        }
+        img {
+            width: 100%;
+            height:120px;
+        }
     }
     .inner {
         position: relative;
-        height: 174px;
+        height: 185px;
     }
     .inner>img {
         width: 297px;
         height: 114px;
-        margin-top: 30px;
+        margin-top: 33px;
         cursor: pointer;
     }
+
     /* // 搜索框部分 */
     .search {
         float: left;
@@ -448,15 +472,17 @@ header {
         margin-left: 39px;
         margin: 71px 39px 48px;
         position: relative;
+
         em {
             display: inline-block;
             width: 30px;
             height: 30px;
-            background: url("../../public/image/Iconly/Broken/Search.png") no-repeat;
+            background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/image/search.png") no-repeat;
             position: absolute;
             top: 5px;
             left: 15px;
         }
+
         input {
             float: left;
             width: 351px;
@@ -469,6 +495,7 @@ header {
             border-right: none;
             border-radius: 4px 0px 0px 4px;
         }
+
         button {
             float: right;
             width: 89px;
@@ -483,6 +510,7 @@ header {
         }
 
     }
+
     /* // 右侧小图标 */
     .serve {
         float: right;

+ 37 - 34
components/home/pageNavigation.vue

@@ -6,7 +6,7 @@
                 <!-- 导航一 -->
                 <div class="navLeft">
                     <div class="navIndex">
-                        <NuxtLink to="/" target="_blank" title="首页">
+                        <NuxtLink to="/" title="首页">
                             首页
                         </NuxtLink>
                     </div>
@@ -15,14 +15,14 @@
                         <div>社会资讯</div>
                     </div>
                 </div>
-                <ul class="navigationOne">
+                <ul class="navigationOne" v-if="navigation1.length > 0">
                     <li v-for="(item, index) in navigation1" :key="index">
                         <NuxtLink :to="getLinkPath(item)">
                             <span>{{ item.alias }}</span>
                         </NuxtLink>
                     </li>
                 </ul>
-                <div class="navRight">
+                <div class="navRight" v-if="navigation2.length > 0">
                     <div class="nav111" v-for="(item, index) in navigation2">
                         <NuxtLink :to="getLinkPath(item)">
                             <span>{{ item.alias }}</span>
@@ -36,7 +36,7 @@
                 <h3>
                     深度服务
                 </h3>
-                <ul class="partTwoTitle">
+                <ul class="partTwoTitle" v-if="navigation3.length > 0">
                     <li class="titleList" v-for="(item, index) in navigation3">
                         <NuxtLink :to="getLinkPath(item)">
                             <span>{{ item.alias }}</span>
@@ -45,23 +45,23 @@
                 </ul>
                 <div class="searchBox">
                     <input v-model="keywords" type="text" placeholder="请输入关键词" @keydown.enter="goToSearch">
-                    <img src="../../public/image/search.png" @keydown.enter="goToSearch">
+                    <img src="../../public/image/search.png" @keydown.enter="goToSearch" @click="goSearch">
                 </div>
             </div>
         </div>
         <div class="littleNav">
             <div class="inner">
                 <img src="../../public/index/hdpt.png" alt="">
-                <ul class="leftPart">
+                <ul class="leftPart" v-if="navigation4.length > 0">
                     <li class="navList" v-for="item in navigation4">
                         <NuxtLink :to="getLinkPath(item)">
                             <span>{{ item.alias }}</span>
                         </NuxtLink>
                     </li>
                 </ul>
-                <ul class="rightPart">
+                <ul class="rightPart" v-if="navigation4data2.length > 0">
                     <li class="navList" v-for="item in navigation4data2">
-                        <NuxtLink :to="getLinkPath(item)" >
+                        <NuxtLink :to="getLinkPath(item)">
                             <span>{{ item.alias }}</span>
                         </NuxtLink>
                     </li>
@@ -83,20 +83,26 @@ const getLinkPath = (item) => {
             url: item.web_url,
             target: '_blank'
         }
-    }else{
+    } else {
         if (item.children_count != 0) {
             return { path: `/primaryNavigation/${item.category_id}` }
-        }else{
+        } else {
             return { path: `/newsList/${item.category_id}` }
         }
     }
 }
+//搜索跳转
+//点击搜索按钮
+let goSearch = () => {
+    const route = `/search/search?keyword=${keywords.value}`;
+    window.location.href = route;
+}
 //2.页面公用方法 end ---------------------------------------->
 
 //3.获取导航菜单 start ---------------------------------------->
 const navigation1 = ref([]);
 //2是那个独立的2个
-const navigation2 = ref([]); 
+const navigation2 = ref([]);
 const navigation3 = ref([]);
 //下面一行是2边分开的 一边5个
 const navigation4 = ref([]);
@@ -130,19 +136,7 @@ async function getNavigation2() {
 }
 getNavigation2();
 
-//获取导航菜单3
-async function getNavigation3() {
-    const mkdata = await requestDataPromise('/web/getWebsiteModelCategory', {
-        method: 'GET',
-        query: {
-            'pid': 0,
-            'num': 6,
-            'placeid': 22
-        },
-    });
-    navigation3.value = mkdata.data;
-}
-getNavigation3();
+
 
 
 //获取导航菜单4
@@ -152,13 +146,13 @@ async function getNavigation4() {
         query: {
             'pid': 0,
             'num': 10,
-            'placeid': 28
+            'placeid': 22
         },
     });
-    for(let i in mkdata.data){
-        if(i < 5){
+    for (let i in mkdata.data) {
+        if (i < 5) {
             navigation4.value.push(mkdata.data[i]);
-        }else{
+        } else {
             navigation4data2.value.push(mkdata.data[i]);
         }
     }
@@ -166,6 +160,20 @@ async function getNavigation4() {
     //navigation4data2.value = mkdata.data;
 }
 getNavigation4();
+
+//获取导航菜单3
+async function getNavigation3() {
+    const mkdata = await requestDataPromise('/web/getWebsiteModelCategory', {
+        method: 'GET',
+        query: {
+            'pid': 0,
+            'num': 5,
+            'placeid': 28
+        },
+    });
+    navigation3.value = mkdata.data;
+}
+getNavigation3();
 //3.获取导航菜单 end ---------------------------------------->
 
 //4.跳转到搜索页面 start ---------------------------------------->
@@ -233,8 +241,6 @@ let goToSearch = () => {
         flex-wrap: wrap;
         padding-top: 24px;
 
-        //justify-content: space-around;
-
         li {
             width: 74px;
             font-family: PingFang SC;
@@ -248,10 +254,6 @@ let goToSearch = () => {
             margin: 0 10px;
             text-align: center;
 
-            // &:nth-last-child(1) {
-            //     margin-right: 0px;
-            // }
-
             a {
                 font-weight: 400;
                 font-size: 16px;
@@ -336,6 +338,7 @@ let goToSearch = () => {
                 font-family: PingFang SC, PingFang SC;
                 font-weight: 400;
                 margin-right: 40px;
+
                 a {
                     color: #333333;
                 }

+ 1 - 1
nuxt.config.js

@@ -29,7 +29,7 @@ export default defineNuxtConfig({
   },
   nitro: {
     devServer: {
-      port:10000, // 指定生产服务器的端口
+      port:3000, // 指定生产服务器的端口
     }
   },
   plugins: [

File diff suppressed because it is too large
+ 541 - 242
pages/index.vue


+ 164 - 107
pages/newsDetail/[id].vue

@@ -2,17 +2,24 @@
     <!-- 页面头部 -->
     <HomePageHead></HomePageHead>
     <!-- 页面导航 -->
-     <HomePageNavigation></HomePageNavigation>
+    <HomePageNavigation></HomePageNavigation>
+    <!-- 广告1 -->
+    <HomeAdvertising :imgurl="adImg1"></HomeAdvertising>
 
     <!-- 面包屑导航 -->
     <div class="breadcrumb">
         <div class="inner">
             <span class="location">当前位置:</span>
             <el-breadcrumb :separator-icon="ArrowRight">
-                <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
-                <el-breadcrumb-item :to="{ path: `/newsList/${routLevelId}` }">{{ routLevelTitle }}</el-breadcrumb-item>
-                <el-breadcrumb-item>文章详情</el-breadcrumb-item>
-                <!-- <el-breadcrumb-item>{{ routeNewsTtitle }}</el-breadcrumb-item> -->
+                <el-breadcrumb-item>
+                    <NuxtLink to="/">首页</NuxtLink>
+                </el-breadcrumb-item>
+                <el-breadcrumb-item>
+                    <NuxtLink :to="{ path: `/newsList/${routLevelId}` }">
+                        {{ routLevelTitle }}
+                    </NuxtLink>
+                </el-breadcrumb-item>
+                <el-breadcrumb-item>{{ routeNewsTtitle }}</el-breadcrumb-item>
             </el-breadcrumb>
         </div>
     </div>
@@ -27,11 +34,13 @@
                         来源: <span>{{ newsDetail.copyfrom }}</span>
                         作者: <span>{{ newsDetail.author }}</span>
                         发布时间: <span>{{ time }}</span>
-                        <!-- 浏览量: <span>{{ newsDetail.hits }}</span> -->
                     </p>
-                    <!-- <img :src="newsDetail.imgurl" alt="" v-if="newsDetail.imgurl"> -->
                 </div>
-                <div class="leftBottom" v-html="newsDetail.content"></div>
+                <div class="leftBottom" v-html="newsDetail.content" v-if="newsDetail.content" @click="openPreview">
+                </div>
+                <div v-if="previewVisible" class="preview-modal" @click="closePreview">
+                    <img :src="selectedImage" alt="Preview">
+                </div>
 
                 <!-- 免责声明: -->
                 <div class="disclaimer" v-if="newsDetail.fromurl">
@@ -57,119 +66,145 @@
 </template>
 
 <script setup>
+//1.页面依赖 start ---------------------------------------->
 import { onMounted } from 'vue'
-import { ElBreadcrumb, ElBreadcrumbItem } from 'element-plus'
+import { ElBreadcrumb, ElBreadcrumbItem} from 'element-plus'
 import { ArrowRight } from '@element-plus/icons-vue'
 
-const nuxtApp = useNuxtApp();
-const axios = nuxtApp.$axios;
 
 //获得跳转过来的id
 const route = useRoute();
 const articleId = route.params.id; //获得该页面的id
-const listid = route.query.listId; //获得该页面的id
-const name = route.query.listName; //获得该页面的id
-
-// 定义响应式数据
-const seoData = ref({
-    title: '三农资讯网',
-    description: '默认描述',
-    keywords: '默认关键词',
-    image: 'https://example.com/default-image.jpg'
-});
-
-// 在 onMounted 钩子中获取数据
-onMounted(async () => {
-    try {
-        const response = await axios.get(`/web/selectWebsiteArticleInfo?articleid=${articleId}`);
-        const data = response.data; // 假设接口返回的数据在 data 字段中
-        // 更新 seoData
-        seoData.value = {
-            title: data.title,
-            description: data.seo_description,
-            keywords: data.keyword,
-            image: data.introduce
-        };
-
-    } catch (error) {
-        console.error('获取 SEO 数据失败:', error);
-        // 设置默认值
-        seoData.value = {
-            title: '三农资讯网',
-            description: '默认描述',
-            keywords: '默认关键词',
-            image: 'https://example.com/default-image.jpg'
-        };
-    }
-});
-
-// 监听 seoData 的变化,动态设置 SEO 字段
-watch(seoData, (newVal) => {
-    if (newVal.title) { // 确保 title 有值
-        useSeoMeta({
-            title: newVal.title, // 使用动态值
-            description: newVal.description,
-            ogTitle: newVal.title,
-            ogDescription: newVal.description,
-            ogImage: newVal.image,
-            twitterTitle: newVal.title,
-            twitterDescription: newVal.description,
-            twitterImage: newVal.image,
-            keywords: newVal.keywords
-        });
-    }
-}, { immediate: true });
-
-
+//1.页面依赖 end ---------------------------------------->
 
+//2.页面数据 start ---------------------------------------->
+//2.1 资讯详情
 const newsDetail = ref({})
 const routeNewsTtitle = ref("");
-//发布日期
+//2.2 发布日期
 const time = ref("");
-//路径
+//2.3 路径
 const routLevelTitle = ref("");
 const routLevelId = ref("");
-
-//获取详情
-const getNewsInfo = async () => {
-    const response = await axios.get(`/web/selectWebsiteArticleInfo?articleid=${articleId}`);
-    newsDetail.value = response.data;
-    routLevelTitle.value = newsDetail.value.cat_name
-    console.log(123145)
-    routLevelId.value = newsDetail.value.category_id
-    time.value = newsDetail.value.updated_at.split(' ')[0]
-    if (newsDetail.value.title.length >= 30) {
-        routeNewsTtitle.value = newsDetail.value.title.substr(0, 30) + "...";
+//是否展示投票
+const articleChoice = ref(false);
+//2.4获取详情
+async function getPageData() {
+    const mkdata = await requestDataPromise('/web/selectWebsiteArticleInfo', {
+        method: 'GET',
+        query: {
+            'articleid': articleId
+        },
+    });
+    if (mkdata.code == 200) {
+        //判断是否显示投票
+        if (mkdata.data.is_survey == 1) {
+            console.log("本篇文章含有投票!")
+            articleChoice.value = true;
+            getVoteList();
+        }
+        //获取内容
+        newsDetail.value = mkdata.data;
+        //获取路径
+        routLevelTitle.value = newsDetail.value.cat_name;
+        routLevelId.value = newsDetail.value.category_id;
+        //获取发布时间
+        time.value = newsDetail.value.updated_at.split(' ')[0];
+        //修正标题长度
+        if (newsDetail.value.title.length >= 30) {
+            routeNewsTtitle.value = newsDetail.value.title.substr(0, 30) + "...";
+        } else {
+            routeNewsTtitle.value = newsDetail.value.title
+        }
     } else {
-        routeNewsTtitle.value = newsDetail.value.title
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+        console.log("错误位置:获取详情内容")
+        console.log("后端错误反馈:", mkdata.message)
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     }
 }
+getPageData();
+
+//2.5 获得广告
+//广告列表
+let adImg1 = ref([]);
+// async function getAdData(){
+//     const adData = await requestDataPromise('/web/getWebsiteAdvertisement',{method:'GET',query:{'ad_tag':'DETAIL'}});
+//     if(adData.code==200){
+//         for(let item of adData.data){
+//             if(item.ad_tag == 'DETAIL_0001'){
+//                 adImg1.value = item;
+//             }
+//         }
+//     }else{
+//         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+//         console.log("错误位置:获取详情页广告列表")
+//         console.log("后端错误反馈:",adData.message)
+//         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+//     }
+// }
+// getAdData();
 
-function getDays(time) {
-    const date = new Date(time);
-    const year = date.getFullYear();
-    const month = date.getMonth() + 1;
-    const day = date.getDate();
-    return `${month}-${day}`;
-}
+onMounted(async () => {
+    const { $webUrl, $CwebUrl } = useNuxtApp();
+    //广告1
+    let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=xcw_detail_0001`
+    const responseAd1 = await fetch(url, {
+        headers: {
+            'Content-Type': 'application/json',
+            'Userurl': $CwebUrl,
+            'Origin': $CwebUrl
+        }
+    });
+    const resultAd1 = await responseAd1.json();
+    adImg1.value = resultAd1.data[0];
+})
+
+//2.页面数据 end ---------------------------------------->
 
-//获得广告
-const adList = ref("");
-const aa='DETAIL'
-const getadList = async () => {
-    try {
-        const response = await axios.get(`/web/getWebsiteAdvertisement?ad_tag=${aa}`);
-        adList.value = response.data;
-    } catch (error) {
-        console.error(error);
+//3.设置seo信息 start---------------------------------------->
+//3.1 设置seo信息
+const setData = await requestDataPromise('/web/selectWebsiteArticleInfo', {
+    method: 'GET',
+    query: {
+        'articleid': articleId
+    },
+});
+if (setData.code == 200) {
+    let seoTitle = setData.data.title;
+    let seoDescription = setData.data.introduce;
+    let seoKeywords = setData.data.keyword;
+    let seoSuffix = setData.data.suffix;
+    let seoName = setData.data.website_name;
+
+    useSeoMeta({
+        title: seoTitle + "_" + seoName + "_" + seoSuffix,
+        meta: [
+            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
+            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
+        ]
+    });
+} else {
+    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    console.log("错误位置:设置详情页面SEO数据")
+    console.log("后端错误反馈:", setData.message)
+    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+}
+//3.设置seo信息 end---------------------------------------->
+//5.页面图片放大 start---------------------------------------->
+const previewVisible = ref(false)
+const selectedImage = ref(' ')
+
+const openPreview = (event) => {
+    if (event.target.tagName === 'IMG') {
+        selectedImage.value = event.target.src;
+        previewVisible.value = true;
     }
 }
-
-onMounted(() => {
-    getNewsInfo()
-    getadList()
-})
-
+const closePreview = () => {
+    previewVisible.value = false;
+}
+//5.页面图片放大 end---------------------------------------->
 </script>
 
 <style lang="less" scoped>
@@ -289,16 +324,16 @@ onMounted(() => {
                 line-height: 38px;
                 margin-bottom: 30px;
 
-                ul>li img{
-                    width: 790px;   
+                ul>li img {
+                    width: 790px;
                     height: 382px;
                 }
 
-                img{
-                    width: 790px;   
+                img {
+                    width: 790px;
                     height: 382px;
                 }
-                
+
                 p.tinymce-material {
                     img {
                         width: 790px;
@@ -357,9 +392,10 @@ onMounted(() => {
 
 .leftBottom::v-deep p img,
 .leftBottom::v-deep img,
-.leftBottom::v-deep video  {
+.leftBottom::v-deep video {
     max-width: 700px;
 }
+
 .leftBottom::v-deep h1,
 .leftBottom::v-deep h2,
 .leftBottom::v-deep h3,
@@ -369,4 +405,25 @@ onMounted(() => {
     font-size: 20px;
     font-weight: 500;
 }
+
+//放大图片
+.preview-modal {
+    position: fixed;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    background: rgba(0, 0, 0, 0.8);
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    z-index: 1000;
+}
+
+.preview-modal img {
+    max-width: 100%;
+    max-height: 100%;
+    cursor: pointer;
+    /* 关闭按钮样式 */
+}
 </style>

+ 342 - 220
pages/newsList/[id].vue

@@ -4,13 +4,45 @@
         <HomePageHead></HomePageHead>
         <!-- 页面导航 -->
         <HomePageNavigation></HomePageNavigation>
+        <!-- 广告1 -->
+        <HomeAdvertising :imgurl="adImg1"></HomeAdvertising>
+
+        <!-- 当前页面中的一级标题 -->
+        <div class="nav1" v-if="parent_name != ''">
+            <div class="inner">
+                <h2 class="nav1_title">
+                    <NuxtLink :to="`/primaryNavigation/${parent_id}`"> {{ parent_name }}</NuxtLink>
+                </h2>
+            </div>
+        </div>
+
+        <!-- 二级导航列表 -->
+        <div class="nav2top" v-if="parent_name != ''"></div>
+        <div class="nav2" v-if="parent_name != ''">
+            <ul class="inner">
+                <li class="home">
+                    <a href="/">网站首页</a>
+                </li>
+                <li class="titleList" v-for="(item, index) in secondNav" :key="index">
+                    <NuxtLink :to="{ path: `/newsList/${item.category_id}` }">
+                        <span class="nav2_title">{{ item.alias }}</span>
+                    </NuxtLink>
+                </li>
+            </ul>
+        </div>
+        <div class="nav2btm" v-if="parent_name != ''"></div>
 
         <!-- 面包屑导航 -->
         <div class="breadcrumb">
             <div class="inner">
                 <span class="location">当前位置:</span>
                 <el-breadcrumb :separator-icon="ArrowRight">
-                    <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
+                    <el-breadcrumb-item>
+                        <NuxtLink to="/">首页</NuxtLink>
+                    </el-breadcrumb-item>
+                    <el-breadcrumb-item v-if="parent_name != ''">
+                        <NuxtLink :to="`/primaryNavigation/${parent_id}`"> {{ parent_name }}</NuxtLink>
+                    </el-breadcrumb-item>
                     <el-breadcrumb-item>{{ name }}</el-breadcrumb-item>
                 </el-breadcrumb>
             </div>
@@ -21,14 +53,14 @@
                 <div class="innerLeft">
                     <ul class="list">
                         <li v-for="(item, index) in newsList" :key="index">
-                            <!-- <NuxtLink :to="item.linkurl" target="_blank" v-show="item.islink == 1">
-                                <span class="list1">{{ item.title }} </span>
-                            </NuxtLink> -->
-                            <NuxtLink :to="`/newsDetail/${item.id}`" target="_blank">
+                            <NuxtLink :to="item.linkurl" v-show="item.islink == 1" :title="item.title">
                                 <span class="listTitle">{{ item.title }}</span>
-                                <span class="time">02-16</span>
+                                <span class="time">{{ getTime(item.updated_at, 'month', 1) }}</span>
+                            </NuxtLink>
+                            <NuxtLink :to="`/newsDetail/${item.id}`" v-if="item.islink == 0" :title="item.title">
+                                <span class="listTitle">{{ item.title }}</span>
+                                <span class="time">{{ getTime(item.updated_at, 'month', 1) }}</span>
                             </NuxtLink>
-
                         </li>
                     </ul>
                     <!-- 分页器 -->
@@ -45,7 +77,7 @@
         </div>
 
         <!-- 列表页广告二 -->
-        <HomeTopTenTitle :imgurl="adList[1]" v-if="adList[1]"></HomeTopTenTitle>
+        <HomeAdvertising :imgurl="adImg2"></HomeAdvertising>
 
         <!-- 页面底部 -->
         <HomeFoot></HomeFoot>
@@ -54,256 +86,346 @@
 
 <script setup>
 import { onMounted } from 'vue';
-import { ElBreadcrumb, ElBreadcrumbItem, ElPagination } from 'element-plus'
+import { ElBreadcrumb, ElBreadcrumbItem, ElPagination, ElMessage } from 'element-plus'
 import { ArrowRight } from '@element-plus/icons-vue'
 
-const nuxtApp = useNuxtApp();
-const axios = nuxtApp.$axios;
+// const nuxtApp = useNuxtApp();
+// const axios = nuxtApp.$axios;
 
 
-//获得跳转过来的id
+//1.获得路由id start ---------------------------------------->
 const route = useRoute();
-const articleId = route.params.id; //获得该页面的id
-// const category_id = route.query.category_id; //获得该页面的id
-const category_id = route.query.catid; //获得该页面的id
-// const name = route.query.name; //获得该页面的id
-// console.log(name);
-console.log('category_id', category_id);
-
-
-
-// 定义响应式数据
-const seoData = ref({
-    title: '三农资讯网',
-    description: '默认描述',
-    keywords: '默认关键词',
-    image: 'https://example.com/default-image.jpg'
-});
-
-// 在 onMounted 钩子中获取数据
-onMounted(async () => {
-    try {
-        const response = await axios.get(`/web/getWebsiteCategoryHead?catid=${articleId}`);
-        const data = response.data; // 假设接口返回的数据在 data 字段中
-        console.log(seoData.value.title)
-        // 更新 seoData
-        seoData.value = {
-            title: data.seo_title,
-            description: data.seo_description,
-            keywords: data.seo_keywords,
-            image: data.seo_image
-        };
-        console.log(seoData.value.title)
-    } catch (error) {
-        console.error('获取 SEO 数据失败:', error);
-        // 设置默认值
-        seoData.value = {
-            title: '三农资讯网',
-            description: '默认描述',
-            keywords: '默认关键词',
-            image: 'https://example.com/default-image.jpg'
-        };
-    }
-});
-
-// 监听 seoData 的变化,动态设置 SEO 字段
-watch(seoData, (newVal) => {
-    if (newVal.title) { // 确保 title 有值
-        useSeoMeta({
-            title: newVal.title, // 使用动态值
-            description: newVal.description,
-            ogTitle: newVal.title,
-            ogDescription: newVal.description,
-            ogImage: newVal.image,
-            twitterTitle: newVal.title,
-            twitterDescription: newVal.description,
-            twitterImage: newVal.image,
-            keywords: newVal.keywords
-        });
-    }
-}, { immediate: true });
-
-
-
-
-//关键词
-let keyWord = useState("keyWord", () => "")
-let id = useState("id", () => "")
-let total = useState("total", () => 0)
+let articleId = 0;//路由id
 let page = useState("page", () => 1)
+let total = useState("total", () => 0)
 let pageSize = useState("pageSize", () => 20)
 
-//获得广告
-const adList = ref("");
-const aa = 'LIST'
-const getadList = async () => {
-    try {
-        const response = await axios.get(`/web/getWebsiteAdvertisement?ad_tag=${aa}`);
-        adList.value = response.data;
-    } catch (error) {
-        console.error(error);
+//判断用户是由于别名跳转还是直接访问二级分类,正常来说只会从别名访问
+const getRoute = () => {
+    if (route.meta.isAlias) {
+        //如果有别名,跳转是这样的:http://localhost:3000/zhaogongzhaopin20/1.html
+        //如果用户从别名访问,数据需要从meta中获取
+        articleId = route.meta.routeId;
+        // 获取route.params.id中的数字部分
+        const idString = route.params.id;
+        const idNumber = parseInt(idString.replace(/\D/g, ''), 10);
+        page.value = idNumber;
+
+    } else {
+        //如果没有别名 跳转是这样的:http://localhost:3000/newsList/20?page=1
+        articleId = route.params.id;
+        // page.value = route.query.page;
     }
 }
 
-onMounted(() => {
-    id.value = route.query.id;
-    console.log('id', id.value);
-    getadList()
-})
-
-// 页码
-// //页面组件传递数据的时间驱动函数
-// const handleData = (data) => {
-//     console.log(data.value)
-//     page.value = data.value
-
-//     //在页码发生变化时去请求响应页面的新闻数据
-//     axios.get(`/web/getWebsiteArticleList?page=${page.value}&pageSize=${10}&catid=${14}&keyword=${keyWord.value}`).then(response => {
-//         // console.log(response.data.rows);
-//         newsList.value = response.data.rows;
-//     }).catch(error => {
-//         console.error(error);
-//     })
-// }
+// 监听路由变化
+watch(() => route.path, (newPath) => {
+    //每当路径变化的时候重新获取routeId
+    getRoute()
+}, { immediate: true })
+//1.获得路由id end ---------------------------------------->
+
+//2.页面数据 start ---------------------------------------->
+//2.2新闻列表
+const newsList = ref([]);
+let newslists = async () => {
+    const listData = await requestDataPromise('/web/getWebsiteArticleList', {
+        method: 'GET',
+        query: {
+            'page': page.value,
+            'pageSize': pageSize.value,
+            'catid': articleId
+        },
+    });
+    if (listData.code == 200) {
+        newsList.value = listData.data.rows;
+        total.value = listData.data.count;
+        console.log('news111111', newsList.value);
+
+    } else {
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+        console.log("错误位置:获取新闻列表")
+        console.log("后端错误反馈1111:", listData.message)
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    }
+}
+//获得列表
+newslists();
 
+//分页事件
 let changePage = (value) => {
     console.log("当前页码", value);
     page.value = value
-    console.log(page.value);
-    newslists()
-}
 
-// 一级导航
-const navigation1 = ref("");
-const navigateList = async () => {
-    try {
-        const response = await axios.get(`/web/getWebsiteModelCategory?placeid=${1}&pid=${0}&num=${24}`);
-        console.log('一级导航', response.data);
-        navigation1.value = response.data;
-        console.log('111111111111111111111111111', navigation1[0]?.value.category_id);
-
-    } catch (error) {
-        console.error(error);
-    }
-}
-
-// 新闻列表
-const newsList = useState("newsList", () => '');
-const newslists = async () => {
-    try {
-        const response = await axios.get(`/web/getWebsiteArticleList?page=${page.value}&pageSize=${pageSize.value}&catid=${articleId}`);
-        // console.log(response.data.rows);
-        newsList.value = response.data.rows;
-        total.value = response.data.count;
-    } catch (error) {
-        console.error(error);
-    }
+    //判断是否为真路径
+    // if (route.meta.isAlias) {
+    //     navigateTo(`${route.meta.path}${page.value}.html`)
+    // } else {
+    //     navigateTo(`/newsList/${articleId}?page=${page.value}`)
+    // }
+    newslists();
 }
 
-//热点资讯
-const hotlistall = useState("hotlistall", () => "");
-const hotlist = async () => {
-    try {
-        const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${2}&level=${4}&placeid=${1}`);
-        console.log('热点资讯', response.data);
-        for (let item of response.data) {
-            console.log(item);
-            item.count = 1;
-        }
-        hotlistall.value = response.data;
-    } catch (error) {
-        console.error(error);
+//2.3获得页面名称
+const name = ref('')
+let getPageName = async () => {
+    const pageName = await requestDataPromise('/web/getOneWebsiteCategory', {
+        method: 'GET',
+        query: {
+            'catid': articleId
+        },
+    });
+    if (pageName.code == 200) {
+        name.value = pageName.data.alias
+    } else {
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+        console.log("错误位置:设置页面标题")
+        console.log("后端错误反馈:", pageName.message)
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     }
 }
-
-//资讯推荐1
-const news1 = useState("news1", () => "");
-const newslist1 = async () => {
-    try {
-        const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${1}&level=${5}&placeid=${1}`);
-        console.log('热点资讯', response.data);
-        news1.value = response.data;
-    } catch (error) {
-        console.error(error);
+//获得列表
+getPageName();
+//2.页面数据 end ---------------------------------------->
+//3.二级栏目 start ---------------------------------------->
+//3.1通过id获取父栏目
+const parent_name = ref([]);
+const parent_id = ref([]);
+let getParentNav = async () => {
+    const listData = await requestDataPromise('/web/getOneWebsiteCategory', {
+        method: 'GET',
+        query: {
+            'catid': articleId
+        },
+    });
+    if (listData.code == 200) {
+        console.log(listData.data);
+        parent_name.value = listData.data.parent_name;
+        parent_id.value = listData.data.parent_id;
+    } else {
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+        console.log("错误位置:获取新闻列表")
+        console.log("后端错误反馈:", listData.message)
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     }
+    getSecondNav();
 }
-const news11 = useState("news11", () => "");
-const newslist11 = async () => {
-    try {
-        const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${3}&level=${5}&placeid=${1}`);
-        console.log('热点资讯', response.data);
-        news11.value = response.data;
-    } catch (error) {
-        console.error(error);
+//获得列表
+getParentNav();
+
+// 3.2获取二级栏目
+const secondNav = ref([]);
+let getSecondNav = async () => {
+    const listData = await requestDataPromise('/web/getWebsiteModelCategory', {
+        method: 'GET',
+        query: {
+            'placeid': 1,
+            'pid': parent_id.value,
+            'num': 8,
+        },
+    });
+    console.log('listData', listData);
+    // secondNav.value = listData.data;
+
+    if (listData.code == 200) {
+        secondNav.value = listData.data;
+        console.log('secondNav', secondNav.value);
+    } else {
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+        console.log("错误位置:获取新闻列表")
+        console.log("后端错误反馈:", listData.message)
+        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
     }
 }
-//资讯推荐2
-const news2 = useState("news2", () => "");
-const newslist2 = async () => {
-    try {
-        const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${1}&level=${5}&placeid=${1}`);
-        console.log('热点资讯', response.data);
-        news2.value = response.data;
-    } catch (error) {
-        console.error(error);
-    }
+//3.二级栏目 end ---------------------------------------->
+
+//4.设置seo信息 start---------------------------------------->
+//4.1 设置seo信息
+const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
+    method: 'GET',
+    query: {
+        'catid': articleId
+    },
+});
+
+if (setData.code == 200) {
+    let seoTitle = setData.data.seo_title;
+    let seoDescription = setData.data.seo_description;
+    let seoKeywords = setData.data.seo_keywords;
+    let seoSuffix = setData.data.suffix;
+    let seoName = setData.data.website_name;
+
+    useSeoMeta({
+        title: seoTitle + "_" + seoName + "_" + seoSuffix,
+        meta: [
+            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
+            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
+        ]
+    });
+} else {
+    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    console.log("错误位置:设置列表页面SEO数据")
+    console.log("后端错误反馈:", setData.message)
+    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
 }
-const news22 = useState("news22", () => "");
-const newslist22 = async () => {
-    try {
-        const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${3}&level=${5}&placeid=${1}`);
-        console.log('热点资讯', response.data);
-        news22.value = response.data;
-    } catch (error) {
-        console.error(error);
-    }
+//4.设置seo信息 end---------------------------------------->
+
+//5.广告 start---------------------------------------->
+let adImg1 = ref({});
+let adImg2 = ref({});
+
+onMounted(async () => {
+    //从客户端获取行政职能部门 加快打开速度
+    const { $webUrl, $CwebUrl } = useNuxtApp();
+    //广告1
+    let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=xcw_list_0001`
+    const responseAd1 = await fetch(url, {
+        headers: {
+            'Content-Type': 'application/json',
+            'Userurl': $CwebUrl,
+            'Origin': $CwebUrl
+        }
+    });
+    const resultAd1 = await responseAd1.json();
+    adImg1.value = resultAd1.data[0];
+
+    //广告2
+    let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=xcw_list_0002`
+    const responseAd2 = await fetch(url2, {
+        headers: {
+            'Content-Type': 'application/json',
+            'Userurl': $CwebUrl,
+            'Origin': $CwebUrl
+        }
+    });
+    const resultAd2 = await responseAd2.json();
+    adImg2.value = resultAd2.data[0];
+
+})
+//5.广告 end---------------------------------------->
+
+
+</script>
+
+<style lang="less" scoped>
+#newsList {
+    width: 100%;
+    overflow: hidden;
 }
 
-const name = useState("name", () => "");
-const name1 = async () => {
-    try {
-        const response = await axios.get(`/web/getOneWebsiteCategory?catid=${articleId}`);
-        console.log('name11111111', response.data);
-        name.value = response.data.name;
-        navigateList()
+.nav1 {
+    width: 100%;
+    height: 214px;
+    background: #fff;
+
+    .inner {
+        width: 1200px;
+        height: 214px;
+        margin: 0 auto;
+
+        .nav1_title {
+            width: 1120px;
+            height: 214px;
+            margin-left: 40px;
+            line-height: 217px;
+            text-align: center;
+            font-family: DingTalk JinBuTi, DingTalk JinBuTi;
+            font-weight: 400;
+            font-size: 50px;
+            color: #6D2512;
+            background: url(/_nuxt/public/index/title_bg.png) no-repeat 0;
+
+            a {
+                color: #6D2512;
+            }
+        }
 
-    } catch (error) {
-        console.error(error);
     }
 }
 
+.nav2top {
+    width: 1250px;
+    height: 3px;
+    margin: 0 auto;
+    background-color: #a01c0e;
+}
 
-//挂载成功钩子函数
-onMounted(() => {
+.nav2btm {
+    width: 1200px;
+    height: 3px;
+    margin: 0 auto;
+    background-color: #a01c0e;
+}
+
+.nav2 {
+    width: 100%;
+    height: 48px;
+    background-color: #a01c0e;
 
-    name1()
-    // 资讯推荐
-    newslists()
-    // 热点资讯
-    hotlist()
-    // 资讯推荐
-    newslist1()
-    newslist2()
-    // 热点资讯
-    newslist11()
-    newslist22()
+    .inner {
+        width: 1250px;
+        height: 48px;
+        line-height: 48px;
+        padding: 0 45px;
+        margin: 0 auto;
+        box-sizing: border-box;
+        display: flex;
+        justify-content: space-between;
+
+        .titleList {
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-weight: bold;
+            font-size: 14px;
+            color: #FFFFFF;
+
+            .nav2_title {
+                display: inline-block;
+                font-family: Microsoft YaHei, Microsoft YaHei;
+                font-weight: bold;
+                font-size: 14px;
+                color: #FFFFFF;
+            }
 
-    // navigateList()
+            a {
+                padding: 0 38px;
+                color: #FFFFFF;
+                border-left: 1px solid #7E1C11;
+            }
 
+            //鼠标点击后的样式
+            .nav2_title_active {
+                display: inline-block;
+                font-family: Microsoft YaHei, Microsoft YaHei;
+                font-weight: bold;
+                font-size: 14px;
+                color: #FFFFFF;
+                border-bottom: 1px solid #FFFFFF;
+            }
+        }
 
-})
+        .titleList:hover {
+            a {
+                color: #a01c0e;
 
-//路由中间件
-definePageMeta({
-    middleware: 'auth'
-})
+                .nav2_title {
+                    border-bottom: 1px solid #FFFFFF;
+                }
+            }
+        }
 
-</script>
+        .home {
+            width: 100px;
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-weight: bold;
+            font-size: 14px;
+            color: #F8ECD2;
 
-<style lang="less" scoped>
-#newsList {
-    width: 100%;
-    overflow: hidden;
+            a {
+                color: #F8ECD2;
+                margin-right: 39px;
+            }
+        }
+    }
 }
 
 //导航条
@@ -390,7 +512,7 @@ definePageMeta({
                     width: 820px;
                     padding: 15px 0;
 
-                    a{
+                    a {
                         display: flex;
                         justify-content: space-between;
                     }

File diff suppressed because it is too large
+ 526 - 513
pages/primaryNavigation/[id].vue


+ 11 - 7
pages/search/search.vue

@@ -12,7 +12,7 @@
                 <button @click="goSearch">搜索</button>
             </div>
         </div>
-        
+
         <!-- 面包屑导航 -->
         <div class="breadcrumb">
             <div class="inner">
@@ -29,12 +29,12 @@
                 <div class="innerLeft">
                     <ul class="list" v-if="newsList.length >= 0">
                         <li v-for="(item, index) in newsList" :key="index">
-                            <NuxtLink :to="item.linkurl" target="_blank" v-show="item.islink == 1">{{ item.title }}
+                            <NuxtLink :to="item.linkurl" v-show="item.islink == 1">{{ item.title }}
                             </NuxtLink>
                             <NuxtLink
                                 :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
-                                target="_blank" v-if="item.islink == 0">{{ item.title }}</NuxtLink>
-                            <span class="time right">02-21</span>
+                                v-if="item.islink == 0">{{ item.title }}</NuxtLink>
+                            <span class="time right">{{ getTime(item.updated_at, 'month', 1) }}</span>
                         </li>
                     </ul>
                     <div v-if="newsList.length == 0" class="empty">
@@ -444,7 +444,7 @@ definePageMeta({
                 margin-bottom: 70px;
 
                 >li {
-                    width: 100%;
+                    width: 1200px;
                     height: 56px;
                     white-space: nowrap;
                     overflow: hidden;
@@ -452,8 +452,9 @@ definePageMeta({
                     line-height: 56px;
 
 
-                    >a {
-                        width: 360px;
+                    a {
+                        display: inline-block;
+                        width: 800px;
                         height: 26px;
                         font-family: Microsoft YaHei, Microsoft YaHei;
                         font-weight: 400;
@@ -463,6 +464,9 @@ definePageMeta({
                         text-align: left;
                         font-style: normal;
                         text-transform: none;
+                        white-space: nowrap;
+                        overflow: hidden;
+                        text-overflow: ellipsis;
                     }
 
                     .time {

+ 106 - 105
pages/speciaArticle/[id].vue

@@ -3,17 +3,23 @@
     <HomePageHead></HomePageHead>
 
     <HomePageNavigation></HomePageNavigation>
-    
+    <!-- 广告位 1 -->
+    <HomeAdvertising :imgurl="adImg1"></HomeAdvertising>
 
     <!-- 面包屑导航 -->
     <div class="breadcrumb">
         <div class="inner">
             <span class="location">当前位置:</span>
             <el-breadcrumb :separator-icon="ArrowRight">
-                <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
-                <el-breadcrumb-item :to="{ path: `/primaryNavigation/${listid}` }" v-show="name">{{ name
-                }}</el-breadcrumb-item>
-                <el-breadcrumb-item>{{ newsDetail.con_title }}</el-breadcrumb-item>
+                <el-breadcrumb-item>
+                    <NuxtLink to="/">首页</NuxtLink>
+                </el-breadcrumb-item>
+                <el-breadcrumb-item v-show="name">
+                    <NuxtLink :to="{ path: `/primaryNavigation/${listid}`}">{{name}}</NuxtLink>
+                </el-breadcrumb-item>
+                <el-breadcrumb-item>
+                    {{ newsDetail.con_title }}
+                </el-breadcrumb-item>
             </el-breadcrumb>
         </div>
     </div>
@@ -48,20 +54,18 @@
         </div>
     </div>
 
-    <!-- 列表页广告一 -->
-    <HomeTopTenTitle :imgurl="adList[0]" v-if="adList[0]"></HomeTopTenTitle>
+    <!-- 广告位 2 -->
+    <HomeAdvertising :imgurl="adImg2"></HomeAdvertising>
 
     <!-- 页面底部 -->
     <HomeFoot1></HomeFoot1>
 </template>
 
 <script setup>
-import { onMounted } from 'vue'
+//1.页面依赖 start ---------------------------------------->
 import { ElBreadcrumb, ElBreadcrumbItem } from 'element-plus'
 import { ArrowRight } from '@element-plus/icons-vue'
-
-const nuxtApp = useNuxtApp();
-const axios = nuxtApp.$axios;
+import { ref, onMounted } from 'vue';
 
 //获得跳转过来的id
 const route = useRoute();
@@ -70,108 +74,105 @@ const listid = route.query.listId; //获得该页面的id
 const name = route.query.listName; //获得该页面的id
 const pageId = route.params.id; //获得该页面的id
 const routeHref = route.href;
-console.log(333333)
-console.log(route.href)
-
-
-const newsDetail = ref({})
-console.log(articleId)
-
-const routeNewsTtitle = ref("");
-
-//获得广告
-const adList = ref("");
-const aa = 'page'
-const getadList = async () => {
-    try {
-        const response = await axios.get(`/web/getWebsiteAdvertisement?ad_tag=${aa}`);
-        adList.value = response.data;
-    } catch (error) {
-        console.error(error);
-    }
-}
-onMounted(() => {
-    //获得广告
-    getadList()
-})
-
-// 定义响应式数据
-const seoData = ref({
-    title: '三农资讯网',
-    description: '默认描述',
-    keywords: '默认关键词',
-    image: 'https://example.com/default-image.jpg'
-});
-
-// 在 onMounted 钩子中获取数据
-onMounted(async () => {
-    try {
-        const response = await axios.get(`/web/getWebsiteCategoryHead?catid=${articleId}`);
-        const data = response.data.website_head; // 假设接口返回的数据在 data 字段中
-        console.log(seoData.value.title)
-        // 更新 seoData
-        seoData.value = {
-            title: data.seo_title,
-            description: data.seo_description,
-            keywords: data.seo_keywords,
-            image: data.seo_image
-        };
-        console.log(seoData.value.title)
-
-    } catch (error) {
-        console.error('获取 SEO 数据失败:', error);
-        // 设置默认值
-        seoData.value = {
-            title: '三农资讯网',
-            description: '默认描述',
-            keywords: '默认关键词',
-            image: 'https://example.com/default-image.jpg'
-        };
-    }
-});
-
-// 监听 seoData 的变化,动态设置 SEO 字段
-watch(seoData, (newVal) => {
-    if (newVal.title) { // 确保 title 有值
-        useSeoMeta({
-            title: newVal.title, // 使用动态值
-            description: newVal.description,
-            ogTitle: newVal.title,
-            ogDescription: newVal.description,
-            ogImage: newVal.image,
-            twitterTitle: newVal.title,
-            twitterDescription: newVal.description,
-            twitterImage: newVal.image,
-            keywords: newVal.keywords
-        });
-    }
-}, { immediate: true });
+//1.页面依赖 end ---------------------------------------->
+
+//2.页面数据 start ---------------------------------------->
+//广告列表
+let adImg1 = ref([]);
+let adImg2 = ref([]);
+// async function getAdData(){
+//     const adData = await requestDataPromise('/web/getWebsiteAdvertisement',{method:'GET',query:{'ad_tag':'PAGE'}});
+//     adList.value = adData.data;
+//     if(adData.code==200){
+//         for(let item of adData.data){
+//             if(item.ad_tag == 'PAGE_0001'){
+//                 adImg1.value = item;
+//             }
+//             if(item.ad_tag == 'PAGE_0002'){
+//                 adImg2.value = item;
+//             }
+//         }
+//     }else{
+//         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+//         console.log("错误位置:获取详情页广告列表")
+//         console.log("后端错误反馈:",adData.message)
+//         console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+//     }
+// }
+// getAdData();
 
 //获取详情
-const getNewsInfo = async () => {
-    const response = await axios.get(`/web/getWebsiteFooterCategoryInfo?fcat_id=${articleId}`);
-    newsDetail.value = response.data;
-
-    console.log(newsDetail.value.title)
-    if (newsDetail.value.title.length > 30) {
-        routeNewsTtitle.value = newsDetail.value.title.substr(0, 30) + "...";
-    }
+const newsDetail = ref({})
+async function getPageData() {
+    const mkdata =  await requestDataPromise('/web/getWebsiteFooterCategoryInfo', {
+        method: 'GET',
+        query: {
+            'fcat_id': articleId
+        },
+    });
+    newsDetail.value = mkdata.data;
 }
+getPageData();
 
 //获得底部导航
 const bottomMenu = ref([]);
-const getBottomMenu = async () => {
-    const response = await axios.get(`/web/getWebsiteFooterCategory`);
-    bottomMenu.value = response.data;
+async function getPageMenu() {
+    const mkdata =  await requestDataPromise('/web/getWebsiteFooterCategory', {
+        method: 'GET',
+        query: {},
+    });
+    bottomMenu.value = mkdata.data;
 }
+getPageMenu();
+//2.页面数据 end ---------------------------------------->
+//4.设置seo信息 start---------------------------------------->
+//4.1 设置seo信息
+const setData =  await requestDataPromise('/web/getWebsiteFootInfo', {
+    method: 'GET',
+    query: {},
+});
 
-
-
-onMounted(() => {
-    //获得详情
-    getNewsInfo()
-    // 获得左侧导航
-    getBottomMenu()
+let seoTitle = setData.data.website_head.title;
+let seoDescription = setData.data.website_head.description;
+let seoKeywords = setData.data.website_head.keywords;
+let seoSuffix = setData.data.website_head.suffix;
+let seoName = setData.data.website_head.website_name;
+
+useSeoMeta({
+    title: seoTitle + "_" + seoSuffix,
+    meta: [
+        { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10  },
+        { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix , tagPriority: 10 }
+    ]
+});
+//4.设置seo信息 end---------------------------------------->
+
+onMounted(async ()  => {
+    //从客户端获取行政职能部门 加快打开速度
+    const { $webUrl, $CwebUrl } = useNuxtApp();
+    //广告1
+    let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=xcw_page_0001`
+    const responseAd1 = await fetch(url, {
+        headers: {
+            'Content-Type': 'application/json',
+            'Userurl': $CwebUrl,
+            'Origin': $CwebUrl
+        }
+    });
+    const resultAd1 = await responseAd1.json();
+    adImg1.value = resultAd1.data[0];
+    
+    //广告2
+    let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=xcw_page_0002`
+    const responseAd2 = await fetch(url2, {
+        headers: {
+            'Content-Type': 'application/json',
+            'Userurl': $CwebUrl,
+            'Origin': $CwebUrl
+        }
+    });
+    const resultAd2 = await responseAd2.json();
+    adImg2.value = resultAd2.data[0];
 })
 
 </script>

+ 12 - 6
plugins/globals.js

@@ -1,17 +1,23 @@
 export default defineNuxtPlugin((nuxtApp) => {
   //Pre环境
-  nuxtApp.provide('webUrl', 'http://apipre1.bjzxtw.org.cn:29501')
-  nuxtApp.provide('CwebUrl', 'http://nwpre.bjzxtw.org.cn')
-  nuxtApp.provide('BwebUrl', 'http://adminpre.bjzxtw.org.cn')
-  nuxtApp.provide('userUrl', 'http://localhost:3000')
-  //乡村网
   // nuxtApp.provide('webUrl', 'http://apipre1.bjzxtw.org.cn:29501')
-  // nuxtApp.provide('CwebUrl', 'http://pre.china-village.com.cn')
+  // nuxtApp.provide('CwebUrl', 'http://nwpre.bjzxtw.org.cn')
   // nuxtApp.provide('BwebUrl', 'http://adminpre.bjzxtw.org.cn')
   // nuxtApp.provide('userUrl', 'http://localhost:3000')
+  //乡村网
+  nuxtApp.provide('webUrl', 'http://apipre1.bjzxtw.org.cn:29501')
+  nuxtApp.provide('CwebUrl', 'http://pre.china-village.com.cn')
+  nuxtApp.provide('BwebUrl', 'http://adminpre.bjzxtw.org.cn')
+  nuxtApp.provide('userUrl', 'http://localhost:3000')
   //Dev环境
   // nuxtApp.provide('webUrl', 'http://apidev.bjzxtw.org.cn')
   // nuxtApp.provide('CwebUrl', 'http://nwdev.bjzxtw.org.cn')
   // nuxtApp.provide('BwebUrl', 'http://admindev.bjzxtw.org.cn')
   // nuxtApp.provide('userUrl', 'http://localhost:3000')
+  // 正式环境
+  //正式环境
+  // nuxtApp.provide('webUrl', 'https://flzxw.bjzxtw.org.cn')
+  // nuxtApp.provide('CwebUrl', 'http://nw.china-village.com.cn')
+  // nuxtApp.provide('BwebUrl', 'https://admin.bjzxtw.org.cn')
+  // nuxtApp.provide('userUrl', 'http://localhost:3000')
 })

+ 2 - 2
plugins/request.js

@@ -15,8 +15,8 @@ export default defineNuxtPlugin(nuxtApp => {
     service.interceptors.request.use(config => {
         // console.log("请求拦截器",config);
         // 从cookie中获取数据
-        // const token = getToken()
-        const token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJwaHBlcjY2Ni9qd3QiLCJ1aWQiOjc5LCJ1c2VyX25hbWUiOiIxMzkzMDg5NjY0MyIsIm1vYmlsZSI6IjEzOTMwODk2NjQzIiwiZW1haWwiOiIiLCJsZXZlbF9pZCI6MCwidHlwZV9pZCI6MTAwMDAsImp3dF9zY2VuZSI6ImRlZmF1bHQiLCJqdGkiOiJkZWZhdWx0XzY3YjdkOWQzMzMwYjQ3LjUzNTM5NDUxIiwiaWF0IjoxNzQwMTAyMDk5LCJuYmYiOjE3NDAxMDIwOTksImV4cCI6MTc0MDE4ODQ5OX0.lTYD-x1hEOfcprnZmF4xm_VKuQIBo-W4Dq3uB6rQ6vM"
+        const token = getToken()
+        // const token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJwaHBlcjY2Ni9qd3QiLCJ1aWQiOjc5LCJ1c2VyX25hbWUiOiIxMzkzMDg5NjY0MyIsIm1vYmlsZSI6IjEzOTMwODk2NjQzIiwiZW1haWwiOiIiLCJsZXZlbF9pZCI6MCwidHlwZV9pZCI6MTAwMDAsImp3dF9zY2VuZSI6ImRlZmF1bHQiLCJqdGkiOiJkZWZhdWx0XzY3YjdkOWQzMzMwYjQ3LjUzNTM5NDUxIiwiaWF0IjoxNzQwMTAyMDk5LCJuYmYiOjE3NDAxMDIwOTksImV4cCI6MTc0MDE4ODQ5OX0.lTYD-x1hEOfcprnZmF4xm_VKuQIBo-W4Dq3uB6rQ6vM"
         if (token) {
             config.headers.token = token;
         }

Some files were not shown because too many files changed in this diff