Jelajahi Sumber

详情页开发完成50%

详情页开发完成50%
dangyunlong 21 jam lalu
induk
melakukan
0d4e61db2b

+ 81 - 0
components/template/component/article/900x1384/1.vue

@@ -0,0 +1,81 @@
+<template>
+    <div class="articleMainBox">
+        <div class="articleTitle">{{templateData.data.title}}</div>
+        <div class="articleInfo">
+            <div>来源:{{templateData.data.copyfrom}}</div>
+            <div>作者:{{templateData.data.author}}</div>
+            <div>时间:{{templateData.data.updated_at}}</div>
+        </div>
+        <div class="articleContent" v-html="templateData.data.content" @click="openPreview"></div>
+        <div class="statementBox" v-if="templateData.data.copyfrom != '本网'">
+            <div class="statementBoxLeft">
+                <div>原文链接:http://nmyj.xlgl.gov.cn/xzxk/zsyz/202112/t20211201_2771045.html</div>
+                <div>[免责声明] 本文来源于网络转载,仅供学习交流使用,不构成商业目的。版权归原作者所有,如涉及作品内容、版权和其它问题,请在30日内与本网联系,我们将在第一时间处理。</div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script setup>
+const props = defineProps({
+    templateData:Object,//新闻正文
+});
+</script>
+
+<style lang="less" scoped>
+.articleMainBox {
+    width: 900px;
+    margin: 0 auto;
+    display: block;
+    .articleTitle {
+        width: 900px;
+        font-size:30px;
+        color:#333333;
+        font-weight:bold;
+    }
+    .articleInfo {
+        width: 900px;
+        color:#999999;
+        font-size:14px;
+        display: flex;
+        justify-content: flex-start;
+        align-items: center;
+        margin-top: 30px;
+        div{
+            margin-right: 40px;
+        }
+    }
+    .articleContent {
+        width: 900px;
+        padding-top:60px;
+        font-size:20px;
+        margin-bottom: 60px;
+        img{
+            display: block;
+            margin: 0 auto;
+            margin-bottom: 60px;
+        }
+        .fontBold {
+            font-weight:bold;
+        }
+        div {
+            text-indent: 2em;
+            margin-bottom: 28px;
+        }
+    }
+    .statementBox {
+        width: 900px;
+        height: 143px;
+        border-top: 1px solid #D9D9D9;
+        .statementBoxLeft {
+            width: 900px;
+            height: 143px;
+            padding-top: 40px;
+            text-align: left;
+            box-sizing: border-box;
+            font-size:20px;
+            color:#999999;
+        }
+    }
+}  
+</style>

+ 114 - 0
components/template/component/list/270x450/1.vue

@@ -0,0 +1,114 @@
+<template>
+    <div class="newsBox">
+        <div class="listNewsTitle" v-if="skinId==1">
+            最新资讯
+        </div>
+        <div class="listNewsTitle_skin2" v-if="skinId==2">
+            <span>最新资讯</span>
+        </div>
+        <div class="newsContent">
+            <div v-for="item in component_style1_News1Array" class="newsContentImg">
+                <NuxtLink 
+                    :href="getLinkPathDetail(item)" 
+                    :title="item.title"
+                    :target="item.islink == 1 ? '_blank' : '_self'"
+                >
+                    <img :src="item.imgurl" />
+                    <div>{{ item.title }}</div>
+                </NuxtLink>
+            </div>
+            <div v-for="item in component_style1_News2Array" class="newsContentText">
+                <NuxtLink 
+                    :href="getLinkPathDetail(item)" 
+                    :title="item.title"
+                    :target="item.islink == 1 ? '_blank' : '_self'"
+                >
+                    {{ item.title }}
+                </NuxtLink>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script setup>
+//引入vue
+import {ref} from 'vue';
+//获得新闻数据
+const props = defineProps({
+    templateData:Array,//新闻数据
+    skinId:String,//皮肤id
+});
+const component_style1_News1Array = ref([]);
+const component_style1_News2Array = ref([]);
+component_style1_News1Array.value = props.templateData.img.slice(0,2);
+component_style1_News2Array.value = props.templateData.text.slice(0,4);
+</script>
+
+<style lang="less" scoped>
+.newsBox {
+    .listNewsTitle {
+        font-size:22px;
+        font-weight:bold;
+        height: 40px;
+        line-height: 40px;
+        border-bottom: 2px solid #004564;
+        color:#004564;
+        margin-bottom: 20px;
+        box-sizing: border-box;
+    }
+    .listNewsTitle_skin2 {
+        font-size:22px;
+        font-weight:bold;
+        height: 40px;
+        line-height: 40px;
+        border-bottom: 2px solid #A91B33;
+        color:#A91B33;
+        margin-bottom: 20px;
+        box-sizing: border-box;
+        span {
+            color:#A91B33;
+            height: 30px;
+            line-height: 30px;
+            border-left: 3px solid #A91B33;
+            padding-left: 12px;
+        }
+    }
+    .newsContent {
+        .newsContentImg {
+            a {
+                display: block;
+                display: flex;
+                align-items: center;
+                justify-content: center;
+                margin-bottom: 20px;
+                font-size:18px;
+                div {
+                    overflow: hidden;
+                    display: -webkit-box;
+                    -webkit-line-clamp: 3;
+                    -webkit-box-orient: vertical;
+                    text-overflow: ellipsis;
+                    color:#333333;
+                }
+            }
+            img {
+                display: block;
+                margin-right: 10px;
+                width: 120px;
+                height: 80px;
+            }
+        }
+        .newsContentText {
+            font-size:18px;
+            color:#333333;
+            margin-bottom: 20px;
+            overflow: hidden;
+            white-space: nowrap;
+            text-overflow: ellipsis;
+            a {
+                color:#333333;
+            }
+        }
+    }
+}
+</style>

+ 115 - 0
components/template/component/list/270x450/2.vue

@@ -0,0 +1,115 @@
+<template>
+    <div class="newsBox">
+        <div class="listNewsTitle" v-if="skinId==1">
+            最新资讯
+        </div>
+        <div class="listNewsTitle_skin2" v-if="skinId==2">
+            <span>最新资讯</span>
+        </div>
+        <div class="newsContent">
+            <div v-for="item in component_style1_News1Array" class="newsContentImg">
+                <NuxtLink 
+                    :href="getLinkPathDetail(item)" 
+                    :title="item.title"
+                    :target="item.islink == 1 ? '_blank' : '_self'"
+                >
+                <div>{{ item.title }}</div>
+
+                    <img :src="item.imgurl" />
+                </NuxtLink>
+            </div>
+            <div v-for="item in component_style1_News2Array" class="newsContentText">
+                <NuxtLink 
+                    :href="getLinkPathDetail(item)" 
+                    :title="item.title"
+                    :target="item.islink == 1 ? '_blank' : '_self'"
+                >
+                    {{ item.title }}
+                </NuxtLink>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script setup>
+//引入vue
+import {ref} from 'vue';
+//获得新闻数据
+const props = defineProps({
+    templateData:Array,//新闻数据
+    skinId:String,//皮肤id
+});
+const component_style1_News1Array = ref([]);
+const component_style1_News2Array = ref([]);
+component_style1_News1Array.value = props.templateData.img.slice(0,2);
+component_style1_News2Array.value = props.templateData.text.slice(0,4);
+</script>
+
+<style lang="less" scoped>
+.newsBox {
+    .listNewsTitle {
+        font-size:22px;
+        font-weight:bold;
+        height: 40px;
+        line-height: 40px;
+        border-bottom: 2px solid #004564;
+        color:#004564;
+        margin-bottom: 20px;
+        box-sizing: border-box;
+    }
+    .listNewsTitle_skin2 {
+        font-size:22px;
+        font-weight:bold;
+        height: 40px;
+        line-height: 40px;
+        border-bottom: 2px solid #A91B33;
+        color:#A91B33;
+        margin-bottom: 20px;
+        box-sizing: border-box;
+        span {
+            color:#A91B33;
+            height: 30px;
+            line-height: 30px;
+            border-left: 3px solid #A91B33;
+            padding-left: 12px;
+        }
+    }
+    .newsContent {
+        .newsContentImg {
+            a {
+                display: block;
+                display: flex;
+                align-items: center;
+                justify-content: center;
+                margin-bottom: 20px;
+                font-size:18px;
+                div {
+                    overflow: hidden;
+                    display: -webkit-box;
+                    -webkit-line-clamp: 3;
+                    -webkit-box-orient: vertical;
+                    text-overflow: ellipsis;
+                    color:#333333;
+                }
+            }
+            img {
+                display: block;
+                margin-left: 10px;
+                width: 120px;
+                height: 80px;
+            }
+        }
+        .newsContentText {
+            font-size:18px;
+            color:#333333;
+            margin-bottom: 20px;
+            overflow: hidden;
+            white-space: nowrap;
+            text-overflow: ellipsis;
+            a {
+                color:#333333;
+            }
+        }
+    }
+}
+</style>

+ 152 - 0
components/template/component/list/270x580/1.vue

@@ -0,0 +1,152 @@
+<template>
+    <div class="hotNewsBox">
+        <div class="listNewsTitle" v-if="skinId==1">
+            <b>最新资讯</b>
+        </div>
+        <div class="listNewsTitle_skin2" v-if="skinId==2">
+            <span><b>最新资讯</b></span>
+        </div>
+        <div class="hotNewsContent" v-if="skinId==1">
+            <div v-for="(item,index) in component_style1_News1Array">
+                <NuxtLink 
+                    :href="getLinkPathDetail(item)" 
+                    :title="item.title"
+                    :target="item.islink == 1 ? '_blank' : '_self'"
+                >
+                    <span>{{ index+1 }}</span>
+                    {{ item.title }}
+                </NuxtLink>
+            </div>
+        </div>
+        <div class="hotNewsContent_skin2" v-if="skinId==2">
+            <div v-for="(item,index) in component_style1_News1Array">
+                <NuxtLink 
+                    :href="getLinkPathDetail(item)" 
+                    :title="item.title"
+                    :target="item.islink == 1 ? '_blank' : '_self'"
+                >
+                    <span>{{ index+1 }}</span>
+                    {{ item.title }}
+                </NuxtLink>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script setup>
+//引入vue
+import {ref} from 'vue';
+//获得新闻数据
+const props = defineProps({
+    templateData:Array,//新闻数据
+    skinId:String,//皮肤id
+});
+const component_style1_News1Array = ref([]);
+component_style1_News1Array.value = props.templateData.text.slice(0,8);
+</script>
+
+<style lang="less" scoped>
+.hotNewsBox {
+    .listNewsTitle {
+        font-size:22px;
+        font-weight:bold;
+        height: 40px;
+        line-height: 40px;
+        border-bottom: 2px solid #004564;
+        color:#004564;
+        margin-bottom: 20px;
+        box-sizing: border-box;
+        b {
+            color:#004564;
+            display: block;
+            height: 25px;
+            line-height: 25px;
+        }
+    }
+    .listNewsTitle_skin2 {
+        font-size:22px;
+        font-weight:bold;
+        height: 40px;
+        line-height: 40px;
+        border-bottom: 2px solid #A91B33;
+        color:#A91B33;
+        margin-bottom: 20px;
+        box-sizing: border-box;
+        b {
+            color:#A91B33;
+            display: block;
+            height: 25px;
+            line-height: 25px;
+        }
+        span {
+            color:#A91B33;
+            height: 25px;
+            line-height: 25px;
+            border-left: 3px solid #A91B33;
+            padding-left: 12px;
+            display: block;
+        }
+    }
+    .hotNewsContent {
+        font-size:18px;
+        color:#333333;
+        div {
+            a {
+                display: block;
+                color:#333333;
+                overflow: hidden;
+                white-space: nowrap;
+                text-overflow: ellipsis;
+            }
+            padding-bottom:20px;
+            border-bottom:1px solid #E4E4E4;
+            margin-bottom: 22px;
+            
+            span {
+                margin-right: 15px;
+                font-size:20px;
+                font-weight:bold;
+                font-style: italic;
+            }
+            &:nth-child(1) span,
+            &:nth-child(2) span,
+            &:nth-child(3) span {
+                color: #004564;
+            }
+            &:nth-child(n+4) span {
+                color: #D9D9D9;
+            }
+        }
+    }
+    .hotNewsContent_skin2 {
+        font-size:18px;
+        color:#333333;
+        div {
+            padding-bottom:20px;
+            border-bottom:1px solid #E4E4E4;
+            margin-bottom: 22px;
+            a {
+                display: block;
+                color:#333333;
+                overflow: hidden;
+                white-space: nowrap;
+                text-overflow: ellipsis;
+            }
+            span {
+                margin-right: 15px;
+                font-size:20px;
+                font-weight:bold;
+                font-style: italic;
+            }
+            &:nth-child(1) span,
+            &:nth-child(2) span,
+            &:nth-child(3) span {
+                color: #A91B33;
+            }
+            &:nth-child(n+4) span {
+                color: #D9D9D9;
+            }
+        }
+    }
+}
+</style>

+ 137 - 0
components/template/component/list/270x580/2.vue

@@ -0,0 +1,137 @@
+<template>
+    <div class="hotNewsBox">
+        <div class="listNewsTitle" v-if="skinId==1">
+            <b>最新资讯</b>
+        </div>
+        <div class="listNewsTitle_skin2" v-if="skinId==2">
+            <span><b>最新资讯</b></span>
+        </div>
+        <div class="hotNewsContent" v-if="skinId==1">
+            <div v-for="(item,index) in component_style1_News1Array">
+                <NuxtLink 
+                    :href="getLinkPathDetail(item)" 
+                    :title="item.title"
+                    :target="item.islink == 1 ? '_blank' : '_self'"
+                >
+                    <span>{{ index+1 }}</span>
+                    {{ item.title }}
+                </NuxtLink>
+            </div>
+        </div>
+        <div class="hotNewsContent_skin2" v-if="skinId==2">
+            <div v-for="(item,index) in component_style1_News1Array">
+                <NuxtLink 
+                    :href="getLinkPathDetail(item)" 
+                    :title="item.title"
+                    :target="item.islink == 1 ? '_blank' : '_self'"
+                >
+                    <span>{{ index+1 }}</span>
+                    {{ item.title }}
+                </NuxtLink>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script setup>
+//引入vue
+import {ref} from 'vue';
+//获得新闻数据
+const props = defineProps({
+    templateData:Array,//新闻数据
+    skinId:String,//皮肤id
+});
+const component_style1_News1Array = ref([]);
+component_style1_News1Array.value = props.templateData.text.slice(0,8);
+</script>
+
+<style lang="less" scoped>
+.hotNewsBox {
+    .listNewsTitle {
+        font-size:22px;
+        font-weight:bold;
+        height: 40px;
+        line-height: 40px;
+        border-bottom: 2px solid #004564;
+        color:#004564;
+        margin-bottom: 20px;
+        box-sizing: border-box;
+        b {
+            color:#004564;
+            display: block;
+            height: 25px;
+            line-height: 25px;
+        }
+    }
+    .listNewsTitle_skin2 {
+        font-size:22px;
+        font-weight:bold;
+        height: 40px;
+        line-height: 40px;
+        border-bottom: 2px solid #A91B33;
+        color:#A91B33;
+        margin-bottom: 20px;
+        box-sizing: border-box;
+        b {
+            color:#A91B33;
+            display: block;
+            height: 25px;
+            line-height: 25px;
+        }
+        span {
+            color:#A91B33;
+            height: 25px;
+            line-height: 25px;
+            border-left: 3px solid #A91B33;
+            padding-left: 12px;
+            display: block;
+        }
+    }
+    .hotNewsContent {
+        font-size:18px;
+        color:#333333;
+        div {
+            a {
+                display: block;
+                color:#333333;
+                overflow: hidden;
+                white-space: nowrap;
+                text-overflow: ellipsis;
+            }
+            padding-bottom:20px;
+            border-bottom:1px solid #E4E4E4;
+            margin-bottom: 22px;
+            span {
+                margin-right: 15px;
+                font-size:20px;
+                font-weight:bold;
+                font-style: italic;
+                color: #004564;
+            }
+        }
+    }
+    .hotNewsContent_skin2 {
+        font-size:18px;
+        color:#333333;
+        div {
+            padding-bottom:20px;
+            border-bottom:1px solid #E4E4E4;
+            margin-bottom: 22px;
+            a {
+                display: block;
+                color:#333333;
+                overflow: hidden;
+                white-space: nowrap;
+                text-overflow: ellipsis;
+            }
+            span {
+                margin-right: 15px;
+                font-size:20px;
+                font-weight:bold;
+                font-style: italic;
+                color: #A91B33;
+            }
+        }
+    }
+}
+</style>

+ 56 - 0
components/template/component/list/900x1050/1.vue

@@ -0,0 +1,56 @@
+<template>
+    <div class="listNewsBox">
+        <div v-for="item in listData.data.rows">
+            <NuxtLink 
+                :href="getLinkPathDetail(item)" 
+                :title="item.title"
+                :target="item.islink == 1 ? '_blank' : '_self'"
+            >
+                {{item.title}}
+                <span>{{getTime(item.updated_at, 'month', 1)}}</span>
+            </NuxtLink>
+        </div>
+    </div>
+</template>
+
+<script setup>
+//引入vue
+import {ref} from 'vue';
+//获得新闻数据
+const props = defineProps({
+    listData:Array//新闻数据
+});
+</script>
+
+<style lang="less" scoped>
+.listNewsBox {
+    div{
+        height: 24px;
+        line-height: 24px;
+        color:#333333;
+        font-size:18px;
+        margin-bottom: 20px;
+        a {
+            color:#333333;
+        }
+        &:first-child {
+            font-weight: bold;
+        }
+        &:nth-child(5n) {
+            height: 54px;
+            //padding-bottom:30px;
+            border-bottom: 1px solid #D9D9D9;
+        }
+        &:nth-child(5n+1) {
+            font-weight: bold;
+            margin-top: 30px;
+        }
+        span {
+            float: right;
+        }
+        &:last-child {
+            margin-bottom: 0;
+        }
+    }
+}
+</style>

+ 56 - 0
components/template/component/list/900x1050/2.vue

@@ -0,0 +1,56 @@
+<template>
+    <div class="listNewsBox">
+        <div v-for="item in listData.data.rows">
+            <NuxtLink 
+                :href="getLinkPathDetail(item)" 
+                :title="item.title"
+                :target="item.islink == 1 ? '_blank' : '_self'"
+            >
+                {{item.title}}
+                <span>{{getTime(item.updated_at, 'month', 1)}}</span>
+            </NuxtLink>
+        </div>
+    </div>
+</template>
+
+<script setup>
+//引入vue
+import {ref} from 'vue';
+//获得新闻数据
+const props = defineProps({
+    listData:Array//新闻数据
+});
+</script>
+
+<style lang="less" scoped>
+.listNewsBox {
+    div{
+        height: 24px;
+        line-height: 24px;
+        color:#333333;
+        font-size:18px;
+        margin-bottom: 20px;
+        a {
+            color:#333333;
+        }
+        &:first-child {
+            //font-weight: bold;
+        }
+        &:nth-child(5n) {
+            height: 54px;
+            //padding-bottom:30px;
+            border-bottom: 1px solid #D9D9D9;
+        }
+        &:nth-child(5n+1) {
+            //font-weight: bold;
+            margin-top: 30px;
+        }
+        span {
+            float: right;
+        }
+        &:last-child {
+            margin-bottom: 0;
+        }
+    }
+}
+</style>

+ 52 - 12
components/template/component/public/breadcrumb.vue

@@ -3,21 +3,54 @@
         <span class="location">当前位置:</span>
         <el-breadcrumb :separator-icon="ArrowRight">
             <el-breadcrumb-item>
-                <NuxtLink to="/">首页{{ routeLevel }}</NuxtLink>
+                <NuxtLink to="/">首页</NuxtLink>
             </el-breadcrumb-item>
-            <!--只要出现第二级一定是跳转到频道页-->
+            <!--第一种情况 当前是2级的列表页 start-->
+            <el-breadcrumb-item v-if="routeLevel==1">
+                <span class="routeName">
+                    {{name}}
+                </span>
+            </el-breadcrumb-item>
+            <!--第一种情况 当前是2级的列表页 end-->
+            <!--第二种情况 当前是3级的列表页 start-->
             <el-breadcrumb-item v-if="routeLevel==2">
-                <NuxtLink :to="`/${parent_pinyin}/index.html`">{{parent_name}}</NuxtLink>
+                <NuxtLink :to="`/${parent_pinyin}/list-1.html`" class="routeName">
+                    {{parent_name}}
+                </NuxtLink> 
             </el-breadcrumb-item>
-            <el-breadcrumb-item>
-                <span class="routeName" v-if="routeLevel==1">
-                    {{ name }}
+            <el-breadcrumb-item v-if="routeLevel==2">
+                <span class="routeName">
+                    {{name}}
+                </span>
+            </el-breadcrumb-item>
+            <!--第二种情况 当前是3级的列表页 end-->
+            <!--第三种情况 当前是2级的详情页 start-->
+            <el-breadcrumb-item v-if="routeLevel==3">
+                <NuxtLink :to="`/${pinyin}/index.html`">{{name}}</NuxtLink>
+            </el-breadcrumb-item>
+            <el-breadcrumb-item v-if="routeLevel==3">
+                <span class="routeName">
+                    {{ articleName }}
                 </span>
-                <NuxtLink :to="`/${parent_pinyin}/${pinyin}/list-1.html`" class="routeName" v-else>
-                    {{ name }}
-                </NuxtLink>
             </el-breadcrumb-item>
-            <!--详情页增加文章标题作为结束-->
+            <!--第三种情况 当前是2级的详情页 end-->
+            <!--第四种情况 当前是3级的详情页 start-->
+            <el-breadcrumb-item v-if="routeLevel==4">
+                <NuxtLink :to="`/${parent_pinyin}/list-1.html`" class="routeName">
+                    {{parent_name}}
+                </NuxtLink> 
+            </el-breadcrumb-item>
+            <el-breadcrumb-item v-if="routeLevel==4">
+                <NuxtLink :to="`/${parent_pinyin}/${pinyin}/list-1.html`">
+                    {{parent_name}}
+                </NuxtLink> 
+            </el-breadcrumb-item>
+            <el-breadcrumb-item v-if="routeLevel==4">
+                <span class="routeName">
+                    {{ articleName }}
+                </span>
+            </el-breadcrumb-item>
+            <!--第四种情况 当前是3级的详情页 end-->
         </el-breadcrumb>
     </div>
 </template>
@@ -29,6 +62,7 @@ import { ArrowRight } from '@element-plus/icons-vue';
 //获得页面的routeId导航池id
 const props = defineProps({
     routeId: Number,
+    articleName: String,
 });
 //1.获得当前路由的层级
 const route = useRoute();
@@ -42,6 +76,14 @@ if(route.name=='dir-dir-list-id'){
 if(route.name=='dir-list-id'){
     routeLevel.value = 1
 }
+//第二层详情
+if(route.name=='dir-dir-id'){
+    routeLevel.value = 4
+}
+//第一层详情
+if(route.name=='dir-id'){
+    routeLevel.value = 3
+}
 //2.获得当前栏目的名称 面包屑的最后一级
 const name = ref('')
 const pinyin = ref('');
@@ -66,8 +108,6 @@ if (pageName.code == 200) {
     parent_id.value = pageName.data.parent_id;
     parent_pinyin.value = pageName.data.parent_pinyin;
     parent_children_count.value = pageName.data.children_count;
-    // console.log(111222)
-    // console.log(pageName)
 }
 </script>
 

+ 97 - 0
components/template/sector/body/article/article/1200x1710/1.vue

@@ -0,0 +1,97 @@
+<template>
+    <div class="articleBigBox">
+        <div class="articleBox">
+            <div class="listRouterBox">
+                <templateBreadcrumb :routeId="routeId" :articleName="articleData.data.title" />
+            </div>
+            <div class="articleContentBox">
+                <div class="articleContentBoxLeft">
+                    <article1Style :templateData="articleData" />
+                </div>
+                <div class="articleContentBoxRight">
+                    <div class="articleContentBoxRightTop">
+                        <div v-if="templateData.componentList[1].component_style == 1">
+                            <news1style :templateData="templateData.componentList[1].data" :skinId="skinId"/>
+                        </div>
+                        <div v-if="templateData.componentList[1].component_style == 2">
+                            <news2style :templateData="templateData.componentList[1].data" :skinId="skinId"/>
+                        </div>
+                    </div>
+                    <div class="articleContentBoxRightBottom">
+                        <div v-if="templateData.componentList[2].component_style == 1">
+                            <hotNews1style :templateData="templateData.componentList[2].data" :skinId="skinId"/>
+                        </div>
+                        <div v-if="templateData.componentList[2].component_style == 2">
+                            <hotNews2style :templateData="templateData.componentList[2].data" :skinId="skinId"/>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script setup>
+//引入vue
+import {ref} from 'vue';
+import {ElPagination} from 'element-plus';
+//引入面包屑路径组件
+import templateBreadcrumb from '@/components/template/component/public/breadcrumb.vue'
+//正文组件
+import article1Style from '@/components/template/component/article/900x1384/1.vue'
+//最新资讯
+import news1style from '@/components/template/component/list/270x450/1.vue'
+import news2style from '@/components/template/component/list/270x450/2.vue'
+//热点精选
+import hotNews1style from '@/components/template/component/list/270x580/1.vue'
+import hotNews2style from '@/components/template/component/list/270x580/2.vue'
+
+const props = defineProps({
+    skinId: Number,//皮肤id
+    articleData:Object,//新闻正文
+    templateData:Object,//其他组件
+    routeId: Number,//导航池id
+});
+</script>
+
+<style lang="less" scoped>
+.articleBigBox{
+    width: 100%;
+    height: 1587px;
+    margin-bottom: 30px;
+    .articleBox{
+        width: 1200px;
+        height: 1587px;
+        margin: 0 auto;
+        .listRouterBox{
+            border-bottom: 1px solid #D9D9D9;
+        }
+        .articleContentBox {
+            display: flex;
+            justify-content: space-between;
+            align-items: flex-start;
+            margin-top: 17px;
+            .articleContentBoxLeft {
+                width: 900px;
+                height: 1384px;
+                position: relative;
+            }
+            .articleContentBoxRight {
+                width: 270px;
+                height: 1050px;
+                .articleContentBoxRightTop {
+                    width: 270px;
+                    height: 440px;
+                    margin-bottom: 30px;
+                    position: relative;
+                }
+                .articleContentBoxRightBottom {
+                    width: 270px;
+                    height: 580px;
+                    position: relative;
+                }
+            }
+        }
+    }
+}
+</style>

+ 130 - 16
components/template/sector/body/list/list/1200x1220/1.vue

@@ -6,28 +6,28 @@
             </div>
             <div class="listContentBox">
                 <div class="listContentBoxLeft">
-                    <div v-if="templateData.componentList[0].component_style == 1">
-                        <!-- <list1Style /> -->
-                    </div>
                     <div v-if="templateData.componentList[0].component_style == 2">
-                        <!-- <list2Style /> -->
+                        <list1Style :listData="listData" :skinId="skinId"/>
+                    </div>
+                    <div v-if="templateData.componentList[0].component_style == 1">
+                        <list2Style :listData="listData" :skinId="skinId"/>
                     </div>
                 </div>
                 <div class="listContentBoxRight">
                     <div class="listContentBoxRightTop">
                         <div v-if="templateData.componentList[1].component_style == 1">
-                            <!-- <news1style /> -->
+                            <news1style :templateData="templateData.componentList[1].data" :skinId="skinId"/>
                         </div>
                         <div v-if="templateData.componentList[1].component_style == 2">
-                            <!-- <news2style /> -->
+                            <news2style :templateData="templateData.componentList[1].data" :skinId="skinId"/>
                         </div>
                     </div>
                     <div class="listContentBoxRightBottom">
                         <div v-if="templateData.componentList[2].component_style == 1">
-                            <!-- <hotNews1style /> -->
+                            <hotNews1style :templateData="templateData.componentList[2].data" :skinId="skinId"/>
                         </div>
                         <div v-if="templateData.componentList[2].component_style == 2">
-                            <!-- <hotNews2style /> -->
+                            <hotNews2style :templateData="templateData.componentList[2].data" :skinId="skinId"/>
                         </div>
                     </div>
                 </div>
@@ -39,11 +39,12 @@
                         background 
                         layout="prev, pager, next" 
                         :total="100" 
-                        :page-size="1" 
-                        :current-page="1" 
+                        :page-size="pageSize" 
+                        :current-page="pageNum" 
                         prev-text="上一页" 
                         next-text="下一页"
-                     />
+                        @current-change="changePage"
+                    />
                 </div>
             </div>
         </div>
@@ -53,21 +54,135 @@
 <script setup>
 //引入vue
 import {ref} from 'vue';
+import {ElPagination} from 'element-plus';
 //引入面包屑路径组件
 import templateBreadcrumb from '@/components/template/component/public/breadcrumb.vue'
-
+//引入列表组件
+import list1Style from '@/components/template/component/list/900x1050/1.vue'
+import list2Style from '@/components/template/component/list/900x1050/2.vue'
+//最新资讯
+import news1style from '@/components/template/component/list/270x450/1.vue'
+import news2style from '@/components/template/component/list/270x450/2.vue'
+//热点精选
+import hotNews1style from '@/components/template/component/list/270x580/1.vue'
+import hotNews2style from '@/components/template/component/list/270x580/2.vue'
 
 const props = defineProps({
     skinId: Number,//皮肤id
     templateData:Object,//新闻数据
     routeId: Number,//导航池id
 });
+
+const listData = {
+    "code": 200,
+    "message": "success",
+    "data": {
+        "rows": [
+            {
+                "id": 2863,
+                "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                "islink": 0,
+                "linkurl": "",
+                "pinyin": "nongminxinnongcun/nongcunxinfangshe",
+                "updated_at":"2025-07-19 10:00:00"
+            },
+            {
+                "id": 50129,
+                "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                "islink": 0,
+                "linkurl": "",
+                "pinyin": "sannongzixun",
+                "updated_at":"2025-07-19 10:00:00"
+            },
+            {
+                "id": 50129,
+                "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                "islink": 0,
+                "linkurl": "",
+                "pinyin": "sannongzixun",
+                "updated_at":"2025-07-19 10:00:00"
+            },
+            {
+                "id": 2862,
+                "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                "islink": 0,
+                "pinyin": "sannongzixun/buweidongtai",
+                "updated_at":"2025-07-19 10:00:00"
+            },
+            {
+                "id": 50126,
+                "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                "islink": 0,
+                "pinyin": "sannongzixun",
+                "updated_at":"2025-07-19 10:00:00"
+            },
+            {
+                "id": 3976,
+                "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                "islink": 0,
+                "pinyin": "sannongzixun",
+                "updated_at":"2025-07-19 10:00:00"
+            },
+            {
+                "id": 50189,
+                "title": "7以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                "islink": 0,
+                "pinyin": "nongminhezuoshe",
+                "updated_at":"2025-07-19 10:00:00"
+            },
+            {
+                "id": 50190,
+                "title": "8以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                "islink": 0,
+                "pinyin": "nongminhezuoshe",
+                "updated_at":"2025-07-19 10:00:00"
+            }
+        ],
+        "count": 100
+    }
+}
+
+//页面数据 ---------------------------------------->
+// let pageNum = ref(2); //当前页码
+// pageNum.value = parseInt(route.params.id);//路由中传递的分页页码
+// let total = ref(1); //总条数
+// let pageSize = ref(20); //每页条数
+
+// //新闻列表
+// const newsList = ref([]);
+// let newslists = async () => {
+//     const listData = await requestDataPromise('/web/getWebsiteArticleList', {
+//         method: 'GET',
+//         query: {
+//             'page': pageNum.value,
+//             'pageSize': pageSize.value,
+//             'catid': articleId
+//         },
+//     });
+//     if (listData.code == 200) {
+//         newsList.value = listData.data.rows;
+//         total.value = listData.data.count;
+
+//     } else {
+//         console.log("错误位置:获取新闻列表")
+//     }
+// }
+// //获得列表
+// newslists();
+
+// //分页事件
+// let changePage = (value) => {
+//     console.log("当前页码", value);
+//     navigateTo(`/${targetSegment}/list-${value}.html`)
+// }
+//页面数据---------------------------------------->
 </script>
 
 <style lang="less" scoped>
 .listBigBox{
     width: 100%;
     height: 1220px;
+    margin-bottom: 30px;
     .listBox{
         width: 1200px;
         height: 1220px;
@@ -131,17 +246,16 @@ const props = defineProps({
         height: 34px;
         margin: 0px 10px;
         border-radius: 4px;
-        background-color: #F6F6F6;
-        border: #EAEAEA 1px solid;
     }
     .el-pagination.is-background::v-deep .el-pager li {
         margin: 0px 10px;
         width: 38px;
         height: 34px;
         border-radius: 4px;
-        line-height: 34px;
     }
-    .el-pagination.is-background::v-deep .el-pager li:not(.disabled).active {
+    .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: #004564;
         color: #fff;
     }

+ 602 - 568
pages/[dir]/[dir]/[id].vue

@@ -1,147 +1,38 @@
 <template>
-    <!-- 页面头部 -->
-    <HomePageHead></HomePageHead>
-    <!-- 导航栏 -->
-    <HomePageNavigation1></HomePageNavigation1>
-    <!-- 广告1 -->
-    <HomeAdvertising :imgurl="adImg1"></HomeAdvertising>
-    <!-- 资讯列表 -->
-    <div class="newsDetail">
-        <div class="inner">
-            <div class="innerLeft">
-                <!-- 面包屑导航 -->
-                <div class="breadcrumb">
-                    <div class="inner">
-                        <span class="location">当前位置:</span>
-                        <el-breadcrumb :separator-icon="ArrowRight">
-                            <el-breadcrumb-item>
-                                <NuxtLink to="/">首页</NuxtLink>
-                            </el-breadcrumb-item>
-                            <el-breadcrumb-item v-if="parent_name != ''">
-                                <NuxtLink :to="`/${parent_pinyin}/index.html`"> {{ parent_name }}</NuxtLink>
-                            </el-breadcrumb-item>
-                            <el-breadcrumb-item>
-                                <NuxtLink :to="`list-1.html`"> {{ routLevelTitle }}</NuxtLink>
-                            </el-breadcrumb-item>
-                            <el-breadcrumb-item>{{ routeNewsTtitle }}</el-breadcrumb-item>
-                        </el-breadcrumb>
-                    </div>
-                </div>
-                <div class="LeftTop">
-                    <h1>{{ newsDetail.title }}</h1>
-                    <p>
-                        来源: <span>{{ newsDetail.copyfrom }}</span>
-                        作者: <span>{{ newsDetail.author }}</span>
-                        发布时间: <span>{{ time }}</span>
-                    </p>
-                </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.copyfrom != '本网'">
-                    <p>原文链接:{{ newsDetail.fromurl }}</p>
-                    <p>[免责声明]本文来源于网络转载,仅供学习交流使用,不构成商业目的。 版权归原作者所有,如涉及作品内容,版权和其他问题,请在30日与本网联系,我们将第一时间处理。</p>
-                </div>
-                <div v-if="articleChoice">
-                    <!-- 投票 start ---------------------------------------->
-                    <div class="index_3_box_vote" v-if="articleChoice">
-                        <div class="voteTitle">投票区</div>
-                        <div class="inquire">
-                            <p v-if="voteList.length > 0">{{ voteList[0].survey_name }}</p>
-                            <div class="radioBox">
-                                <!--投票选项-->
-                                <div v-if="!isDisabled">
-                                    <div class="radio" v-if="isRadio">
-                                        <el-radio-group v-model="radio1" @change="handleRadioChange">
-                                            <el-radio v-for="item in voteList" :key="item.id" :value="item.id"
-                                                size="large">
-                                                <span v-if="item.is_other == 0">{{ item.choice_name }}</span>
-                                                <span v-else>其他</span>
-                                            </el-radio>
-                                        </el-radio-group>
-                                        <el-input v-if="showUserChoice" v-model="userChoice" :rows="2" type="textarea"
-                                            resize="none" placeholder="请输入.." />
-                                    </div>
-                                    <div class="checkInputBox" v-else>
-                                        <el-checkbox-group v-model="check1" @change="handleCheckboxChange">
-                                            <span v-for="item in voteList" :key="item.id">
-                                                <span v-if="item.is_other == 0">
-                                                    <el-checkbox size="large" :label="item.choice_name"
-                                                        :value="item.id" />
-                                                </span>
-                                                <span v-else>
-                                                    <el-checkbox size="large" label="其他" :value="item.id" />
-                                                </span>
-                                            </span>
-                                        </el-checkbox-group>
-                                        <el-input v-if="showUserChoice" v-model="userChoice" :rows="2" type="textarea"
-                                            resize="none" placeholder="请输入.." />
-                                    </div>
-                                </div>
-                                <!--投票结果-->
-                                <div class="inquireData" v-else>
-                                    <div v-for="item in websiteSurveyData.data" :key="item.id">
-                                        <div class="inquireDataItem active" v-if="item.status == 1">
-                                            <div class="inquireDataItemTitle">
-                                                <span v-if="item.choice_name == ''">其他</span>
-                                                <span v-else>{{ item.choice_name }}</span>
-                                            </div>
-                                            <div class="inquireDataItemNum">{{ item.results }}票</div>
-                                        </div>
-                                        <div class="inquireDataItem" v-else>
-                                            <div class="inquireDataItemTitle">
-                                                <span v-if="item.choice_name == ''">其他</span>
-                                                <span v-else>{{ item.choice_name }}</span>
-                                            </div>
-                                            <div class="inquireDataItemNum">{{ item.results }}票</div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                            <div class="btn">
-                                <button class="voting" @click="addWebsiteSurvey" :disabled="isDisabled"
-                                    v-if="!isDisabled">投票</button>
-                            </div>
-                        </div>
-                    </div>
-                    <!-- 投票 end ---------------------------------------->
-                </div>
-            </div>
-            <div class="innerRight">
-                <!-- 热点资讯1 -->
-                <div class="hotList1">
-                    <DetailHotNews></DetailHotNews>
-                </div>
-                <!-- 热点资讯2 -->
-                <div class="hotList2">
-                    <DetailHotNews2></DetailHotNews2>
-                </div>
-            </div>
-        </div>
+    <!-- 头部 -->
+    <templateHead></templateHead>
+    <!-- 菜单 -->
+    <templateMenu></templateMenu>
+    <!-- 内容 -->
+    <div>
+        <!--广告组件-->
+        <templateAd :adTag="'nmw_detail_0001'" :skinId="skinId" :adData="adData"></templateAd>
+        <!--资讯正文-->
+        <templateArticle :skinId="skinId" :templateData="testTemplateData" :articleData="articleData" :routeId="routeId"></templateArticle>
     </div>
-    <!-- 广告1 -->
-    <HomeAdvertising :imgurl="adImg2"></HomeAdvertising>
-    <!-- 页面底部 -->
-    <HomeFoot></HomeFoot>
+    <!-- 底部 -->
+    <templateFoot></templateFoot>
 </template>
 
 <script setup>
-//1.页面依赖 start ---------------------------------------->
-import { onMounted } from 'vue'
-import { ElBreadcrumb, ElBreadcrumbItem, ElRadio, ElRadioGroup, ElCheckbox, ElCheckboxGroup, ElMessage, ElInput } from 'element-plus'
-import { ArrowRight } from '@element-plus/icons-vue'
-//1.页面依赖 end ---------------------------------------->
+//0.加载全局模板组件 start---------------------------------------->
+//0.1全局通栏
+import templateHead from '@/components/template/sector/head/1200x200/1.vue'
+import templateMenu from '@/components/template/sector/menu/1200x130/1.vue'
+import templateFoot from '@/components/template/sector/foot/1200x580/1.vue'
+//0.2局部通栏
+//0.2.1广告组件
+import templateAd from '@/components/template/sector/body/ad/1200x90/1.vue'
+//0.2.2资讯正文通栏
+import templateArticle from '@/components/template/sector/body/article/article/1200x1710/1.vue'
+//0.加载全局模板组件 end---------------------------------------->
 
-//2.页面路径 start ---------------------------------------->
-const route = useRoute();
-const articleId = parseInt(route.params.id);
-const targetSegment = getRoutePath(1);
-
-let routeId;
-//通过导航路径反向查询导航id
+//1.获得基本信息单元 start---------------------------------------->
+//1.1获得页面依赖
+import { ref, onMounted } from 'vue';
+//1.2使用url查询导航池id
+const targetSegment = getRoutePath(2);//当前页面的url路径 
+const routeId = ref("");//当前url路径代表的cid
 const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
     method: 'GET',
     query: {
@@ -149,458 +40,601 @@ const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
     },
 });
 if (getRouteId.code == 200) {
-    routeId = getRouteId.data.category_id
-} else {
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    console.log("错误位置:通过url路径查询导航池id")
-    console.log("后端错误反馈:", getRouteId.message)
-    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
+    routeId.value = getRouteId.data.category_id
 }
-//2.页面路径 end ---------------------------------------->
-
-//3.面包屑 start ---------------------------------------->
-const parent_name = ref("");
-const parent_id = ref("");
-const parent_pinyin = ref("");
-
-let getParentNav = async () => {
-    const listData = await requestDataPromise('/web/getOneWebsiteCategory', {
-        method: 'GET',
-        query: {
-            'catid': routeId
-        },
-    });
 
-    if (listData.code == 200) {
-        parent_name.value = listData.data.alias;
-        parent_id.value = listData.data.parent_id;
-        parent_pinyin.value = listData.data.aLIas_pinyin;
-
-    } else {
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-        console.log("错误位置:获取面包屑导航")
-        console.log("后端错误反馈:", listData.message)
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    }
+//1.3获得二级导航
+const navigateData = await requestDataPromise('/web/getWebsiteModelCategory', {
+    method: 'GET',
+    query: {
+        'placeid': 1,
+        'pid': routeId.value,
+        'num': 8
+    },
+});
+//1.4获得pinia源
+import { useTemplateBaseStore } from '@/stores/templateBase'
+const templateBaseStore = useTemplateBaseStore()
+//1.5获得该页的皮肤id - 在每个组件中也是同样的获得方法
+const skinId = ref("")
+//1.6获得站点基本信息
+const responseStatus = await requestDataPromise('/web/getWebsiteAllinfo', {
+    method: 'GET',
+    query: {
+        'link_textnum':24,
+        'link_imgnum':18,
+        'link_footnum':4
+    },
+});
+if (responseStatus.code == 200) {
+    //1.6.1设置站点基本信息
+    templateBaseStore.setWebSiteInfo(responseStatus.data)
+    //1.6.2设置皮肤id
+    skinId.value = templateBaseStore.webSiteInfo.website_foot.foot_info.template_id;
 }
-//获得父级栏目详情
-getParentNav();
-//3.面包屑 end ---------------------------------------->
-
-//4.新闻详情 start ---------------------------------------->
-//4.1 资讯详情
-const newsDetail = ref({})
-const routeNewsTtitle = ref("");
-//4.2 发布日期
-const time = ref("");
-//4.3 路径
-const routLevelTitle = ref("");
-const routLevelId = ref("");
-//4.4 是否展示投票
-const articleChoice = ref(false);
-//4.5 获取详情
-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 >= 20) {
-            routeNewsTtitle.value = newsDetail.value.title.substr(0, 20) + "...";
-        } else {
-            routeNewsTtitle.value = newsDetail.value.title
-        }
-    } else {
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-        console.log("错误位置:获取详情内容")
-        console.log("后端错误反馈:", mkdata.message)
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    }
+//1.7获得广告池
+const adData = ref([]);
+const adResponseStatus = await requestDataPromise('/web/getWebsiteAdvertisement', {
+    method: 'GET',
+    query: {},
+});
+if (adResponseStatus.code == 200) {
+    templateBaseStore.setAdList(adResponseStatus.data)
+    adData.value = adResponseStatus.data;
 }
-getPageData();
-//4.新闻详情 end ---------------------------------------->
-
-
-//5.广告 start ---------------------------------------->
-let adImg1 = ref([]);
-let adImg2 = ref([]);
-onMounted(async () => {
-    const { $webUrl, $CwebUrl } = useNuxtApp();
-    //广告1
-    let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmw_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
-    let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmw_detail_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 ---------------------------------------->
-
-//6.设置seo信息 start---------------------------------------->
-const setData = await requestDataPromise('/web/selectWebsiteArticleInfo', {
+//1.8.seo
+const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
     method: 'GET',
     query: {
-        'articleid': articleId
+        'catid': routeId.value
     },
 });
-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("获取广告数据失败!", setData.message)
-}
-//6.设置seo信息 end---------------------------------------->
-
-//7.投票 start---------------------------------------->
-const radio1 = ref(''); //单选
-const check1 = ref([]); //多选
-const isDisabled = ref(false);//是否禁用提交按钮
-const isRadio = ref(true);//是否渲染单选
-
-const userSurId = ref('');//投票属于哪一篇文章
-const userChoice = ref('');//用于判断用户选择了其他选项以后,输入的值
-const userIsChoice = ref('');//用于判断其他选项目前是什么值
-const showUserChoice = ref(false);//是否显示其他输入框
-const websiteSurveyData = ref([]);//投票结果
+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 + "_" + seoSuffix,
+    meta: [
+        { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
+        { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
+    ]
+});
+//1.获得基本信息单元 end---------------------------------------->
 
-//7.1获得投票列表
-let voteList = ref([]);
-async function getVoteList() {
-    const voteData = await requestHome('/web/getWebsiteSurvey', { method: 'GET', query: { 'art_id': articleId } });
-    console.log(778899)
-    console.log(voteData)
-    if (voteData.code == 200) {
-        voteList.value = voteData.data;
-        console.log(voteList.value)
-        //判断显示单选还是多选
-        //survey_type 0是单选 1是多选
-        if (voteData.data[0].survey_type == 0) {
-            isRadio.value = true;
-            console.log("1111")
-        } else {
-            isRadio.value = false;
-        }
-        //把最后一个的值拿出来 用于判断用户是否选择了其他
-        for (let item of voteData.data) {
-            //如果含有其他
-            if (item.is_other == 1) {
-                userIsChoice.value = item.id;
+//2.获得页面数据 start---------------------------------------->
+//2.0 测试数据 后期移除
+const articleData = {
+    "code": 200,
+    "message": "success",
+    "data": {
+        "id": null,
+        "catid": 315,
+        "title": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+        "introduce": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+        "tag": "",
+        "keyword": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+        "author": "lin",
+        "copyfrom": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+        "fromurl": "",
+        "hits": 0,
+        "ip": "114.255.249.227, 127.0.0.1",
+        "status": 1,
+        "islink": 0,
+        "linkurl": "",
+        "imgurl": "http://img.bjzxtw.org.cn/pre/image/png/20250620/1750408152809621.png",
+        "admin_user_id": 79,
+        "cat_arr_id": "[28,315]",
+        "created_at": "2025-03-19 13:58:49",
+        "updated_at": "2025-07-15 17:10:29",
+        "is_original": 1,
+        "survey_id": "",
+        "survey_name": "",
+        "is_survey": 0,
+        "survey_type": 0,
+        "web_site_id": "2",
+        "ignore_ids": null,
+        "reason": null,
+        "department_arr_id": "[]",
+        "department_id": 0,
+        "city_arr_id": "[]",
+        "city_id": 0,
+        "level": "[2]",
+        "commend_id": "[3505]",
+        "level_text": "[2]",
+        "article_id": null,
+        "content": "<p>新华社北京3月18日电 3月18日,国家副主席韩正在北京会见英国伦敦金融城市长靳翊伟。</p><p>韩正表示,伦敦金融城是世界著名金融中心,为推动中英金融、经贸领域合作作出积极贡献。中国和英国同为世界主要经济体,合作互补性强、前景广阔。无论世界如何变化,中国内外政策都会保持连贯性。中方愿同英方秉持战略伙伴定位,加强沟通合作,共同推动世界多极化、经济全球化,落实好两国领导人达成的重要共识,使中英合作成果更好惠及两国和世界。</p><p>靳翊伟表示,英中在绿色经济、可持续金融、可再生能源领域合作前景巨大。伦敦金融城欢迎更多中资企业赴伦敦发展兴业,愿全力提供支持和便利。</p>",
+        "website_url": null,
+        "email": null,
+        "contacts": null,
+        "contacts_mobile": null,
+        "contacts_address": null,
+        "zip_code": null,
+        "enterprise_name": null,
+        "category_id": 315,
+        "cat_name": "三农专题",
+        "website_name": "三农资讯网-测试专用",
+        "suffix": "全国三农信息一体化应用平台",
+        "commendArticle": [
+            {
+                "id": 3505,
+                "title": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                "catid": 1,
+                "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                "hits": 0,
+                "created_at": "2025-02-19 20:30:35"
             }
-        }
-        //用户投票属于哪一篇文章
-        userSurId.value = voteData.data[0].sur_id;
-
-    } else {
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-        console.log("错误位置:首页投票")
-        console.log("后端错误反馈:", voteData.message)
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    }
-}
-
-
-//7.2当用户选择了选项,判断是否展示其他输入框
-const handleRadioChange = (value) => {
-    if (value == userIsChoice.value) {
-        showUserChoice.value = true;
-    } else {
-        showUserChoice.value = false;
-    }
-}
-
-const handleCheckboxChange = (value) => {
-    if (value.includes(userIsChoice.value)) {
-        showUserChoice.value = true;
-    } else {
-        showUserChoice.value = false;
+        ]
     }
 }
 
-//7.3发起投票
-async function addWebsiteSurvey() {
-    //判断当前是单选还是多选
-    console.log(isRadio.value)
-    if (isRadio.value) {
-        console.log("用户单选!")
-        if (radio1.value != '') {
-            //先判断一下是否使用了其他选项
-            if (showUserChoice.value) {
-                if (userChoice.value != '') {
-                    //文章id
-                    // console.log(userSurId.value)
-                    // 用户输入的值
-                    // console.log(userChoice.value)
-                    //如果使用了其他,其他的选项需要增加进去
-                    const ChoiceData = await requestHome('/web/addWebsiteSurveyOption', {
-                        method: 'GET',
-                        query: {
-                            'sur_id': userSurId.value,//投票的新闻id
-                            'choice_name': userChoice.value,//投票的选项id
-                        }
-                    });
-                    if (ChoiceData.code == 200) {
-                        //提交完其他选项以后,再正式发起投票
-                        const mkData = await requestHome('/web/addWebsiteSurveyVote', {
-                            method: 'GET',
-                            query: {
-                                'sur_id': userSurId.value,
-                                'choice_id': ChoiceData.data
-                            }
-                        });
-                        if (mkData.code == 200) {
-                            ElMessage.success('投票成功!')
-                            //把投票结果显示到页面上 禁用投票按钮
-                            isDisabled.value = true;
-                            websiteSurveyData.value = mkData.data;
-                            //遍历一下,把用户选中的那个设置status为1
-                            let data = mkData.data;
-                            //遍历一下,把用户选中的那个设置status为1
-                            for (let item of data.data) {
-                                for (let i of data.choice) {
-                                    if (item.id == i) {
-                                        console.log(item.id)
-                                        item.status = 1;
-                                    }
-                                }
-                            }
-                            websiteSurveyData.value = data;
-                        } else {
-                            ElMessage.error(mkData.message)
-                        }
-                    } else {
-                        ElMessage.error('其他投票失败!')
-                    }
-                } else {
-                    ElMessage.error('请输入选项内容!')
-                }
-            } else {
-                //如果没选择其他,直接提交选择的内容
-                const mkData = await requestHome('/web/addWebsiteSurveyVote', {
-                    method: 'GET',
-                    query: {
-                        'sur_id': userSurId.value,
-                        'choice_id': radio1.value
+//2.0 测试数据 后期移除
+const testTemplateData = {
+    "sectorName": "text",
+    "componentList": [
+        {
+            "component_type": 1,//1=新闻 2=广告
+            "component_style": 1,//样式
+            "sort": 1,//组件位置
+            "data": {
+                "alias":"一级导航名称",
+                "category_id": 11,
+                "pinyin": "nongyeshengchan",
+                "text": [
+                    {
+                        "id": 2863,
+                        "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "nongminxinnongcun/nongcunxinfangshe"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 2862,
+                        "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun/buweidongtai"
+                    },
+                    {
+                        "id": 50126,
+                        "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 3976,
+                        "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50189,
+                        "title": "7以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "nongminhezuoshe"
+                    },
+                    {
+                        "id": 50190,
+                        "title": "8以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "nongminhezuoshe"
                     }
-                });
-                if (mkData.code == 200) {
-                    ElMessage.success('投票成功!')
-                    //把投票结果显示到页面上 禁用投票按钮
-                    isDisabled.value = true;
-                    let data = mkData.data;
-                    //遍历一下,把用户选中的那个设置status为1
-                    for (let item of data.data) {
-                        for (let i of data.choice) {
-                            if (item.id == i) {
-                                item.status = 1;
-                            }
-                        }
+                ],
+                "img": [
+                    {
+                        "id": 50129,
+                        "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "linyuting123",
+                        "updated_at": "2025-05-30 13:50:54",
+                        "introduce": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "cat_arr_id": "[1,201]",
+                        "catid": 201,
+                        "level": "[1,2,3]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:46",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[2]",
+                        "catid": 2,
+                        "level": "[2,3]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:45",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[1]",
+                        "catid": 1,
+                        "level": "[2]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:44",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[11]",
+                        "catid": 11,
+                        "level": "[2]",
+                        "pinyin": "xinnongcun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:43",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[14,240]",
+                        "catid": 240,
+                        "level": "[2,3]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙6",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-04-16 11:04:29",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": null,
+                        "catid": 36,
+                        "level": "[2]",
+                        "pinyin": "sannongzixun"
                     }
-                    websiteSurveyData.value = data;
-                } else {
-                    ElMessage.error('投票失败!')
-                }
+                ]
             }
-        } else {
-            ElMessage.error('请选择一个选项')
-        }
-    } else {
-        console.log("多选!")
-        //多选
-        if (check1.value != []) {
-            //先判断一下是否使用了其他选项
-            if (showUserChoice.value) {
-                if (userChoice.value != '') {
-                    //判断用户是否只选择了一个其他
-                    if (check1.value.length == 1) {
-                        const ChoiceData = await requestDataPromise('/web/addWebsiteSurveyOption', {
-                            method: 'GET',
-                            query: {
-                                'sur_id': userSurId.value,//投票的新闻id
-                                'choice_name': userChoice.value,//用户输入的其他选项文字
-                            }
-                        });
-                        if (ChoiceData.code == 200) {
-                            //提交完其他选项以后,再正式发起投票
-                            const mkData = await requestDataPromise('/web/addWebsiteSurveyVote', {
-                                method: 'GET',
-                                query: {
-                                    'sur_id': userSurId.value,
-                                    'choice_id': ChoiceData.data
-                                }
-                            });
-                            if (mkData.code == 200) {
-                                ElMessage.success('投票成功!')
-                                //把投票结果显示到页面上 禁用投票按钮
-                                isDisabled.value = true;
-                                websiteSurveyData.value = mkData.data;
-                                //遍历一下,把用户选中的那个设置status为1
-                                let data = mkData.data;
-                                //遍历一下,把用户选中的那个设置status为1
-                                for (let item of data.data) {
-                                    for (let i of data.choice) {
-                                        if (item.id == i) {
-                                            console.log(item.id)
-                                            item.status = 1;
-                                        }
-                                    }
-                                }
-                                websiteSurveyData.value = data;
-                            } else {
-                                ElMessage.error(mkData.message)
-                            }
-                        } else {
-                            ElMessage.error('其他投票失败!')
-                        }
-
-                    } else {
-                        //用户选择了除了其他以外,还包括别的选项
-                        const ChoiceData = await requestDataPromise('/web/addWebsiteSurveyOption', {
-                            method: 'GET',
-                            query: {
-                                'sur_id': userSurId.value,//投票的新闻id
-                                'choice_name': userChoice.value,//用户输入的其他选项文字
-                            }
-                        });
-                        if (ChoiceData.code == 200) {
-                            let data = check1.value;
-                            //找到多选的数组,把其他默认值给替换掉
-                            for (let i = 0; i < data.length; i++) {
-                                if (data[i] == userIsChoice.value) {
-                                    data[i] = ChoiceData.data;
-                                }
-                            }
-                            let jsonArray = JSON.stringify(data);
-                            //提交完其他选项以后,再正式发起投票
-                            const mkData = await requestDataPromise('/web/addWebsiteSurveyVote', {
-                                method: 'GET',
-                                query: {
-                                    'sur_id': userSurId.value,
-                                    'choice_id': jsonArray
-                                }
-                            });
-
-                            if (mkData.code == 200) {
-                                ElMessage.success('投票成功!')
-                                //把投票结果显示到页面上 禁用投票按钮
-                                isDisabled.value = true;
-                                websiteSurveyData.value = mkData.data;
-                                //遍历一下,把用户选中的那个设置status为1
-                                let data = mkData.data;
-                                //遍历一下,把用户选中的那个设置status为1
-                                for (let item of data.data) {
-                                    for (let i of data.choice) {
-                                        if (item.id == i) {
-                                            //console.log(item.id)
-                                            item.status = 1;
-                                        }
-                                    }
-                                }
-                                websiteSurveyData.value = data;
-                            } else {
-                                ElMessage.error(mkData.message)
-                            }
-                        } else {
-                            ElMessage.error('其他投票失败!')
-                        }
-
+        },
+        {
+            "component_type": 1,//1=新闻 2=广告
+            "component_style": 1,//样式
+            "sort": 1,//组件位置
+            "data": {
+                "alias":"最新资讯",
+                "category_id": 11,
+                "pinyin": "sannongzixun/zhengcefagui",
+                "text": [
+                    {
+                        "id": 2863,
+                        "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "nongminxinnongcun/nongcunxinfangshe"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 2862,
+                        "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun/buweidongtai"
+                    },
+                    {
+                        "id": 50126,
+                        "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 3976,
+                        "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50189,
+                        "title": "7以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "nongminhezuoshe"
+                    },
+                    {
+                        "id": 50190,
+                        "title": "8以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "nongminhezuoshe"
                     }
-                } else {
-                    ElMessage.error('请输入选项内容!')
-                }
-            } else {
-                let jsonArray = JSON.stringify(check1.value);
-                //如果没选择其他,直接提交选择的内容
-                const mkData = await requestDataPromise('/web/addWebsiteSurveyVote', {
-                    method: 'GET',
-                    query: {
-                        'sur_id': userSurId.value,
-                        'choice_id': jsonArray
+                ],
+                "img": [
+                    {
+                        "id": 50129,
+                        "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "linyuting123",
+                        "updated_at": "2025-05-30 13:50:54",
+                        "introduce": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "cat_arr_id": "[1,201]",
+                        "catid": 201,
+                        "level": "[1,2,3]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:46",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[2]",
+                        "catid": 2,
+                        "level": "[2,3]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:45",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[1]",
+                        "catid": 1,
+                        "level": "[2]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:44",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[11]",
+                        "catid": 11,
+                        "level": "[2]",
+                        "pinyin": "xinnongcun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:43",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[14,240]",
+                        "catid": 240,
+                        "level": "[2,3]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙6",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-04-16 11:04:29",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": null,
+                        "catid": 36,
+                        "level": "[2]",
+                        "pinyin": "sannongzixun"
+                    }
+                ]
+            }
+        },
+        {
+            "component_type": 1,//1=新闻 2=广告
+            "component_style": 1,//样式
+            "sort": 3,//组件位置
+            "data": {
+                "alias":"热点精选",
+                "category_id": 11,
+                "pinyin": "sannongzixun/zhengcefagui",
+                "text": [
+                    {
+                        "id": 2863,
+                        "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "nongminxinnongcun/nongcunxinfangshe"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 2862,
+                        "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun/buweidongtai"
+                    },
+                    {
+                        "id": 50126,
+                        "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 3976,
+                        "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50189,
+                        "title": "7以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "nongminhezuoshe"
+                    },
+                    {
+                        "id": 50190,
+                        "title": "8以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "nongminhezuoshe"
                     }
-                });
-                if (mkData.code == 200) {
-                    ElMessage.success('投票成功!')
-                    //把投票结果显示到页面上 禁用投票按钮
-                    isDisabled.value = true;
-                    websiteSurveyData.value = mkData.data;
-                    //遍历一下,把用户选中的那个设置status为1
-                    let data = mkData.data;
-                    //遍历一下,把用户选中的那个设置status为1
-                    for (let item of data.data) {
-                        for (let i of data.choice) {
-                            if (item.id == i) {
-                                console.log(item.id)
-                                item.status = 1;
-                            }
-                        }
+                ],
+                "img": [
+                    {
+                        "id": 50129,
+                        "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "linyuting123",
+                        "updated_at": "2025-05-30 13:50:54",
+                        "introduce": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "cat_arr_id": "[1,201]",
+                        "catid": 201,
+                        "level": "[1,2,3]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:46",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[2]",
+                        "catid": 2,
+                        "level": "[2,3]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:45",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[1]",
+                        "catid": 1,
+                        "level": "[2]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:44",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[11]",
+                        "catid": 11,
+                        "level": "[2]",
+                        "pinyin": "xinnongcun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:43",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[14,240]",
+                        "catid": 240,
+                        "level": "[2,3]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙6",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-04-16 11:04:29",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": null,
+                        "catid": 36,
+                        "level": "[2]",
+                        "pinyin": "sannongzixun"
                     }
-                    websiteSurveyData.value = data;
-                } else {
-                    ElMessage.error('投票失败!')
-                }
+                ]
             }
-        } else {
-            ElMessage.error('请选择一个选项')
-        }
-    }
-}
-//7.投票 end---------------------------------------->
-
-//8.页面图片放大 start---------------------------------------->
-const previewVisible = ref(false)
-const selectedImage = ref(' ')
-
-const openPreview = (event) => {
-    if (event.target.tagName === 'IMG') {
-        selectedImage.value = event.target.src;
-        previewVisible.value = true;
+        },
+    ],
+    "ad": {
+        "ad_tag": "nmw_index_0003"
     }
 }
-const closePreview = () => {
-    previewVisible.value = false;
-}
-//8.页面图片放大 end---------------------------------------->
+//2.获得页面数据 end---------------------------------------->
 </script>
 
 <style lang="less" scoped>

+ 605 - 498
pages/[dir]/[id].vue

@@ -1,78 +1,38 @@
 <template>
-    <!-- 页面头部 -->
-    <HomePageHead></HomePageHead>
-    <!-- 导航栏 -->
-    <HomePageNavigation></HomePageNavigation>
-
-
-    <div>当前皮肤:{{ skinId }}</div>
-        <div>/sannongzixun/601517.html</div>
-        <div><br/><br/><br/></div>
-
-        
-    <!-- 页面底部 -->
-    <HomeFoot></HomeFoot>
+    <!-- 头部 -->
+    <templateHead></templateHead>
+    <!-- 菜单 -->
+    <templateMenu></templateMenu>
+    <!-- 内容 -->
+    <div>
+        <!--广告组件-->
+        <templateAd :adTag="'nmw_detail_0001'" :skinId="skinId" :adData="adData"></templateAd>
+        <!--资讯正文-->
+        <templateArticle :skinId="skinId" :templateData="testTemplateData" :articleData="articleData" :routeId="routeId"></templateArticle>
+    </div>
+    <!-- 底部 -->
+    <templateFoot></templateFoot>
 </template>
 
 <script setup>
-//0.pinia单基本信息 start---------------------------------------->
-//0.1获得pinia源
-import { useTemplateBaseStore } from '@/stores/templateBase'
-const templateBaseStore = useTemplateBaseStore()
-//0.2获得该页的皮肤id - 在每个组件中也是同样的获得方法
-const skinId = ref("")
-//0.3获得站点基本信息
-let getTemplateBaseInfo = async () => {
-    const responseStatus = await requestDataPromise('/web/getWebsiteAllinfo', {
-        method: 'GET',
-        query: {
-            'link_textnum':24,
-            'link_imgnum':18,
-            'link_footnum':4
-        },
-    });
-    if (responseStatus.code == 200) {
-        templateBaseStore.setWebSiteInfo(responseStatus.data)
-        skinId.value = templateBaseStore.webSiteInfo.website_foot.foot_info.template_id;
-    }
-}
-getTemplateBaseInfo();
-//0.4获得广告池
-let getAdList = async (adKey) => {
-    const responseStatus = await requestDataPromise('/web/getWebsiteAdvertisement', {
-        method: 'GET',
-        query: {
-            
-        },
-    });
-    if (responseStatus.code == 200) {
-        //console.log(responseStatus.data)
-        templateBaseStore.setAdList(responseStatus.data)
-        //获取广告
-        //adImg.value = requestAd(templateBaseStore.webAdList,templateBaseStore.webSiteInfo.website_head.ad_key + "_" + "top")
-    }
-}
-getAdList();
-//0.5设置seo信息
-
-
-//0.pinia单基本信息 end---------------------------------------->
-
-
-
-
-
-
-//1.页面依赖 start ---------------------------------------->
-import { onMounted } from 'vue'
-import { ElBreadcrumb, ElBreadcrumbItem, ElRadio, ElRadioGroup, ElCheckbox, ElCheckboxGroup, ElMessage, ElInput } from 'element-plus'
-import { ArrowRight } from '@element-plus/icons-vue'
-//1.页面依赖 end ---------------------------------------->
-
-//2.页面路径 start ---------------------------------------->
-const targetSegment = getRoutePath(1);
-let routeId;
-//通过导航路径反向查询导航id
+//0.加载全局模板组件 start---------------------------------------->
+//0.1全局通栏
+import templateHead from '@/components/template/sector/head/1200x200/1.vue'
+import templateMenu from '@/components/template/sector/menu/1200x130/1.vue'
+import templateFoot from '@/components/template/sector/foot/1200x580/1.vue'
+//0.2局部通栏
+//0.2.1广告组件
+import templateAd from '@/components/template/sector/body/ad/1200x90/1.vue'
+//0.2.2资讯正文通栏
+import templateArticle from '@/components/template/sector/body/article/article/1200x1710/1.vue'
+//0.加载全局模板组件 end---------------------------------------->
+
+//1.获得基本信息单元 start---------------------------------------->
+//1.1获得页面依赖
+import { ref, onMounted } from 'vue';
+//1.2使用url查询导航池id
+const targetSegment = getRoutePath(1);//当前页面的url路径 这是第一层 所以获得域名后面的第一层url
+const routeId = ref("");//当前url路径代表的cid
 const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
     method: 'GET',
     query: {
@@ -80,454 +40,601 @@ const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
     },
 });
 if (getRouteId.code == 200) {
-    routeId = getRouteId.data.category_id
-} else {
-    console.log("错误位置:获得页面路径")
+    routeId.value = getRouteId.data.category_id
 }
-//2.页面路径 start ---------------------------------------->
-
-//3.面包屑 start ---------------------------------------->
-const route = useRoute();
-const articleId = parseInt(route.params.id); //获得该页面的id
 
-//3.1 获得父级栏目的名称、id
-const parent_name = ref([]);
-const parent_id = ref([]);
-const parent_pinyin = ref("");
-const parent_children_count = ref(0)
-let getParentNav = async () => {
-    const listData = await requestDataPromise('/web/getOneWebsiteCategory', {
-        method: 'GET',
-        query: {
-            'catid': routeId
-        },
-    });
-    if (listData.code == 200) {
-        parent_name.value = listData.data.alias;
-        parent_id.value = listData.data.parent_id;
-        parent_pinyin.value = listData.data.aLIas_pinyin;
-        parent_children_count.value = listData.data.children_count;
-    } else {
-        console.log("错误位置:获取面包屑导航")
-    }
+//1.3获得二级导航
+const navigateData = await requestDataPromise('/web/getWebsiteModelCategory', {
+    method: 'GET',
+    query: {
+        'placeid': 1,
+        'pid': routeId.value,
+        'num': 8
+    },
+});
+//1.4获得pinia源
+import { useTemplateBaseStore } from '@/stores/templateBase'
+const templateBaseStore = useTemplateBaseStore()
+//1.5获得该页的皮肤id - 在每个组件中也是同样的获得方法
+const skinId = ref("")
+//1.6获得站点基本信息
+const responseStatus = await requestDataPromise('/web/getWebsiteAllinfo', {
+    method: 'GET',
+    query: {
+        'link_textnum':24,
+        'link_imgnum':18,
+        'link_footnum':4
+    },
+});
+if (responseStatus.code == 200) {
+    //1.6.1设置站点基本信息
+    templateBaseStore.setWebSiteInfo(responseStatus.data)
+    //1.6.2设置皮肤id
+    skinId.value = templateBaseStore.webSiteInfo.website_foot.foot_info.template_id;
 }
-getParentNav();
-//3.页面依赖 end ---------------------------------------->
-
-//4.页面数据 start ---------------------------------------->
-//4.1 资讯详情
-const newsDetail = ref({})
-const routeNewsTtitle = ref("");
-//4.2 发布日期
-const time = ref("");
-//4.3 路径
-const routLevelTitle = ref("");
-const routLevelId = ref("");
-//4.4 是否展示投票
-const articleChoice = ref(false);
-//4.5 获取详情
-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 >= 20) {
-            routeNewsTtitle.value = newsDetail.value.title.substr(0, 20) + "...";
-        } else {
-            routeNewsTtitle.value = newsDetail.value.title
-        }
-    } else {
-        console.log("错误位置:获取详情内容")
-    }
+//1.7获得广告池
+const adData = ref([]);
+const adResponseStatus = await requestDataPromise('/web/getWebsiteAdvertisement', {
+    method: 'GET',
+    query: {},
+});
+if (adResponseStatus.code == 200) {
+    templateBaseStore.setAdList(adResponseStatus.data)
+    adData.value = adResponseStatus.data;
 }
-getPageData();
-//4.页面数据 end ---------------------------------------->
-
-//5.广告 start ---------------------------------------->
-let adImg1 = ref([]);
-let adImg2 = ref([]);
-
-onMounted(async () => {
-    const { $webUrl, $CwebUrl } = useNuxtApp();
-    //广告1
-    let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmw_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
-    let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmw_detail_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 ---------------------------------------->
-
-//6.设置seo信息 start---------------------------------------->
-const setData = await requestDataPromise('/web/selectWebsiteArticleInfo', {
+//1.8.seo
+const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
     method: 'GET',
     query: {
-        'articleid': articleId
+        'catid': routeId.value
     },
 });
-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 ---------->")
-}
-//6.设置seo信息 end---------------------------------------->
-
-//7.投票 start---------------------------------------->
-const radio1 = ref(''); //单选
-const check1 = ref([]); //多选
-const isDisabled = ref(false);//是否禁用提交按钮
-const isRadio = ref(true);//是否渲染单选
-
-const userSurId = ref('');//投票属于哪一篇文章
-const userChoice = ref('');//用于判断用户选择了其他选项以后,输入的值
-const userIsChoice = ref('');//用于判断其他选项目前是什么值
-const showUserChoice = ref(false);//是否显示其他输入框
-const websiteSurveyData = ref([]);//投票结果
-
-//7.2获得投票列表
-let voteList = ref([]);
-async function getVoteList() {
-    const voteData = await requestHome('/web/getWebsiteSurvey', { method: 'GET', query: { 'art_id': articleId } });
-    console.log(778899)
-    console.log(voteData)
-    if (voteData.code == 200) {
-        voteList.value = voteData.data;
-        console.log(voteList.value)
-        //判断显示单选还是多选
-        //survey_type 0是单选 1是多选
-        if (voteData.data[0].survey_type == 0) {
-            isRadio.value = true;
-            console.log("1111")
-        } else {
-            isRadio.value = false;
-        }
-        //把最后一个的值拿出来 用于判断用户是否选择了其他
-        for (let item of voteData.data) {
-            //如果含有其他
-            if (item.is_other == 1) {
-                userIsChoice.value = item.id;
+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 + "_" + seoSuffix,
+    meta: [
+        { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
+        { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
+    ]
+});
+//1.获得基本信息单元 end---------------------------------------->
+
+//2.获得页面数据 start---------------------------------------->
+//2.0 测试数据 后期移除
+const articleData = {
+    "code": 200,
+    "message": "success",
+    "data": {
+        "id": null,
+        "catid": 315,
+        "title": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+        "introduce": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+        "tag": "",
+        "keyword": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+        "author": "lin",
+        "copyfrom": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+        "fromurl": "",
+        "hits": 0,
+        "ip": "114.255.249.227, 127.0.0.1",
+        "status": 1,
+        "islink": 0,
+        "linkurl": "",
+        "imgurl": "http://img.bjzxtw.org.cn/pre/image/png/20250620/1750408152809621.png",
+        "admin_user_id": 79,
+        "cat_arr_id": "[28,315]",
+        "created_at": "2025-03-19 13:58:49",
+        "updated_at": "2025-07-15 17:10:29",
+        "is_original": 1,
+        "survey_id": "",
+        "survey_name": "",
+        "is_survey": 0,
+        "survey_type": 0,
+        "web_site_id": "2",
+        "ignore_ids": null,
+        "reason": null,
+        "department_arr_id": "[]",
+        "department_id": 0,
+        "city_arr_id": "[]",
+        "city_id": 0,
+        "level": "[2]",
+        "commend_id": "[3505]",
+        "level_text": "[2]",
+        "article_id": null,
+        "content": "<p>新华社北京3月18日电 3月18日,国家副主席韩正在北京会见英国伦敦金融城市长靳翊伟。</p><p>韩正表示,伦敦金融城是世界著名金融中心,为推动中英金融、经贸领域合作作出积极贡献。中国和英国同为世界主要经济体,合作互补性强、前景广阔。无论世界如何变化,中国内外政策都会保持连贯性。中方愿同英方秉持战略伙伴定位,加强沟通合作,共同推动世界多极化、经济全球化,落实好两国领导人达成的重要共识,使中英合作成果更好惠及两国和世界。</p><p>靳翊伟表示,英中在绿色经济、可持续金融、可再生能源领域合作前景巨大。伦敦金融城欢迎更多中资企业赴伦敦发展兴业,愿全力提供支持和便利。</p>",
+        "website_url": null,
+        "email": null,
+        "contacts": null,
+        "contacts_mobile": null,
+        "contacts_address": null,
+        "zip_code": null,
+        "enterprise_name": null,
+        "category_id": 315,
+        "cat_name": "三农专题",
+        "website_name": "三农资讯网-测试专用",
+        "suffix": "全国三农信息一体化应用平台",
+        "commendArticle": [
+            {
+                "id": 3505,
+                "title": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                "catid": 1,
+                "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                "hits": 0,
+                "created_at": "2025-02-19 20:30:35"
             }
-        }
-        //用户投票属于哪一篇文章
-        userSurId.value = voteData.data[0].sur_id;
-
-    } else {
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-        console.log("错误位置:首页投票")
-        console.log("后端错误反馈:", voteData.message)
-        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
-    }
-}
-
-
-//7.3当用户选择了选项,判断是否展示其他输入框
-const handleRadioChange = (value) => {
-    if (value == userIsChoice.value) {
-        showUserChoice.value = true;
-    } else {
-        showUserChoice.value = false;
-    }
-}
-
-const handleCheckboxChange = (value) => {
-    if (value.includes(userIsChoice.value)) {
-        showUserChoice.value = true;
-    } else {
-        showUserChoice.value = false;
+        ]
     }
 }
 
-//7.4发起投票
-async function addWebsiteSurvey() {
-    //判断当前是单选还是多选
-    console.log(isRadio.value)
-    if (isRadio.value) {
-        console.log("用户单选!")
-        if (radio1.value != '') {
-            //先判断一下是否使用了其他选项
-            if (showUserChoice.value) {
-                if (userChoice.value != '') {
-                    //文章id
-                    // console.log(userSurId.value)
-                    // 用户输入的值
-                    // console.log(userChoice.value)
-                    //如果使用了其他,其他的选项需要增加进去
-                    const ChoiceData = await requestHome('/web/addWebsiteSurveyOption', {
-                        method: 'GET',
-                        query: {
-                            'sur_id': userSurId.value,//投票的新闻id
-                            'choice_name': userChoice.value,//投票的选项id
-                        }
-                    });
-                    if (ChoiceData.code == 200) {
-                        //提交完其他选项以后,再正式发起投票
-                        const mkData = await requestHome('/web/addWebsiteSurveyVote', {
-                            method: 'GET',
-                            query: {
-                                'sur_id': userSurId.value,
-                                'choice_id': ChoiceData.data
-                            }
-                        });
-                        if (mkData.code == 200) {
-                            ElMessage.success('投票成功!')
-                            //把投票结果显示到页面上 禁用投票按钮
-                            isDisabled.value = true;
-                            websiteSurveyData.value = mkData.data;
-                            //遍历一下,把用户选中的那个设置status为1
-                            let data = mkData.data;
-                            //遍历一下,把用户选中的那个设置status为1
-                            for (let item of data.data) {
-                                for (let i of data.choice) {
-                                    if (item.id == i) {
-                                        console.log(item.id)
-                                        item.status = 1;
-                                    }
-                                }
-                            }
-                            websiteSurveyData.value = data;
-                        } else {
-                            ElMessage.error(mkData.message)
-                        }
-                    } else {
-                        ElMessage.error('其他投票失败!')
-                    }
-                } else {
-                    ElMessage.error('请输入选项内容!')
-                }
-            } else {
-                //如果没选择其他,直接提交选择的内容
-                const mkData = await requestHome('/web/addWebsiteSurveyVote', {
-                    method: 'GET',
-                    query: {
-                        'sur_id': userSurId.value,
-                        'choice_id': radio1.value
+//2.0 测试数据 后期移除
+const testTemplateData = {
+    "sectorName": "text",
+    "componentList": [
+        {
+            "component_type": 1,//1=新闻 2=广告
+            "component_style": 1,//样式
+            "sort": 1,//组件位置
+            "data": {
+                "alias":"一级导航名称",
+                "category_id": 11,
+                "pinyin": "nongyeshengchan",
+                "text": [
+                    {
+                        "id": 2863,
+                        "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "nongminxinnongcun/nongcunxinfangshe"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 2862,
+                        "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun/buweidongtai"
+                    },
+                    {
+                        "id": 50126,
+                        "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 3976,
+                        "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50189,
+                        "title": "7以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "nongminhezuoshe"
+                    },
+                    {
+                        "id": 50190,
+                        "title": "8以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "nongminhezuoshe"
                     }
-                });
-                if (mkData.code == 200) {
-                    ElMessage.success('投票成功!')
-                    //把投票结果显示到页面上 禁用投票按钮
-                    isDisabled.value = true;
-                    let data = mkData.data;
-                    //遍历一下,把用户选中的那个设置status为1
-                    for (let item of data.data) {
-                        for (let i of data.choice) {
-                            if (item.id == i) {
-                                item.status = 1;
-                            }
-                        }
+                ],
+                "img": [
+                    {
+                        "id": 50129,
+                        "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "linyuting123",
+                        "updated_at": "2025-05-30 13:50:54",
+                        "introduce": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "cat_arr_id": "[1,201]",
+                        "catid": 201,
+                        "level": "[1,2,3]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:46",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[2]",
+                        "catid": 2,
+                        "level": "[2,3]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:45",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[1]",
+                        "catid": 1,
+                        "level": "[2]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:44",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[11]",
+                        "catid": 11,
+                        "level": "[2]",
+                        "pinyin": "xinnongcun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:43",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[14,240]",
+                        "catid": 240,
+                        "level": "[2,3]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙6",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-04-16 11:04:29",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": null,
+                        "catid": 36,
+                        "level": "[2]",
+                        "pinyin": "sannongzixun"
                     }
-                    websiteSurveyData.value = data;
-                } else {
-                    ElMessage.error('投票失败!')
-                }
+                ]
             }
-        } else {
-            ElMessage.error('请选择一个选项')
-        }
-    } else {
-        console.log("多选!")
-        //多选
-        if (check1.value != []) {
-            //先判断一下是否使用了其他选项
-            if (showUserChoice.value) {
-                if (userChoice.value != '') {
-                    //判断用户是否只选择了一个其他
-                    if (check1.value.length == 1) {
-                        const ChoiceData = await requestDataPromise('/web/addWebsiteSurveyOption', {
-                            method: 'GET',
-                            query: {
-                                'sur_id': userSurId.value,//投票的新闻id
-                                'choice_name': userChoice.value,//用户输入的其他选项文字
-                            }
-                        });
-                        if (ChoiceData.code == 200) {
-                            //提交完其他选项以后,再正式发起投票
-                            const mkData = await requestDataPromise('/web/addWebsiteSurveyVote', {
-                                method: 'GET',
-                                query: {
-                                    'sur_id': userSurId.value,
-                                    'choice_id': ChoiceData.data
-                                }
-                            });
-                            if (mkData.code == 200) {
-                                ElMessage.success('投票成功!')
-                                //把投票结果显示到页面上 禁用投票按钮
-                                isDisabled.value = true;
-                                websiteSurveyData.value = mkData.data;
-                                //遍历一下,把用户选中的那个设置status为1
-                                let data = mkData.data;
-                                //遍历一下,把用户选中的那个设置status为1
-                                for (let item of data.data) {
-                                    for (let i of data.choice) {
-                                        if (item.id == i) {
-                                            console.log(item.id)
-                                            item.status = 1;
-                                        }
-                                    }
-                                }
-                                websiteSurveyData.value = data;
-                            } else {
-                                ElMessage.error(mkData.message)
-                            }
-                        } else {
-                            ElMessage.error('其他投票失败!')
-                        }
-
-                    } else {
-                        //用户选择了除了其他以外,还包括别的选项
-                        const ChoiceData = await requestDataPromise('/web/addWebsiteSurveyOption', {
-                            method: 'GET',
-                            query: {
-                                'sur_id': userSurId.value,//投票的新闻id
-                                'choice_name': userChoice.value,//用户输入的其他选项文字
-                            }
-                        });
-                        if (ChoiceData.code == 200) {
-                            let data = check1.value;
-                            //找到多选的数组,把其他默认值给替换掉
-                            for (let i = 0; i < data.length; i++) {
-                                if (data[i] == userIsChoice.value) {
-                                    data[i] = ChoiceData.data;
-                                }
-                            }
-                            let jsonArray = JSON.stringify(data);
-                            //提交完其他选项以后,再正式发起投票
-                            const mkData = await requestDataPromise('/web/addWebsiteSurveyVote', {
-                                method: 'GET',
-                                query: {
-                                    'sur_id': userSurId.value,
-                                    'choice_id': jsonArray
-                                }
-                            });
-
-                            if (mkData.code == 200) {
-                                ElMessage.success('投票成功!')
-                                //把投票结果显示到页面上 禁用投票按钮
-                                isDisabled.value = true;
-                                websiteSurveyData.value = mkData.data;
-                                //遍历一下,把用户选中的那个设置status为1
-                                let data = mkData.data;
-                                //遍历一下,把用户选中的那个设置status为1
-                                for (let item of data.data) {
-                                    for (let i of data.choice) {
-                                        if (item.id == i) {
-                                            //console.log(item.id)
-                                            item.status = 1;
-                                        }
-                                    }
-                                }
-                                websiteSurveyData.value = data;
-                            } else {
-                                ElMessage.error(mkData.message)
-                            }
-                        } else {
-                            ElMessage.error('其他投票失败!')
-                        }
-
+        },
+        {
+            "component_type": 1,//1=新闻 2=广告
+            "component_style": 1,//样式
+            "sort": 1,//组件位置
+            "data": {
+                "alias":"最新资讯",
+                "category_id": 11,
+                "pinyin": "sannongzixun/zhengcefagui",
+                "text": [
+                    {
+                        "id": 2863,
+                        "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "nongminxinnongcun/nongcunxinfangshe"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 2862,
+                        "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun/buweidongtai"
+                    },
+                    {
+                        "id": 50126,
+                        "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 3976,
+                        "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50189,
+                        "title": "7以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "nongminhezuoshe"
+                    },
+                    {
+                        "id": 50190,
+                        "title": "8以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "nongminhezuoshe"
                     }
-                } else {
-                    ElMessage.error('请输入选项内容!')
-                }
-            } else {
-                let jsonArray = JSON.stringify(check1.value);
-                //如果没选择其他,直接提交选择的内容
-                const mkData = await requestDataPromise('/web/addWebsiteSurveyVote', {
-                    method: 'GET',
-                    query: {
-                        'sur_id': userSurId.value,
-                        'choice_id': jsonArray
+                ],
+                "img": [
+                    {
+                        "id": 50129,
+                        "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "linyuting123",
+                        "updated_at": "2025-05-30 13:50:54",
+                        "introduce": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "cat_arr_id": "[1,201]",
+                        "catid": 201,
+                        "level": "[1,2,3]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:46",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[2]",
+                        "catid": 2,
+                        "level": "[2,3]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:45",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[1]",
+                        "catid": 1,
+                        "level": "[2]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:44",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[11]",
+                        "catid": 11,
+                        "level": "[2]",
+                        "pinyin": "xinnongcun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:43",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[14,240]",
+                        "catid": 240,
+                        "level": "[2,3]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙6",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-04-16 11:04:29",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": null,
+                        "catid": 36,
+                        "level": "[2]",
+                        "pinyin": "sannongzixun"
                     }
-                });
-                if (mkData.code == 200) {
-                    ElMessage.success('投票成功!')
-                    //把投票结果显示到页面上 禁用投票按钮
-                    isDisabled.value = true;
-                    websiteSurveyData.value = mkData.data;
-                    //遍历一下,把用户选中的那个设置status为1
-                    let data = mkData.data;
-                    //遍历一下,把用户选中的那个设置status为1
-                    for (let item of data.data) {
-                        for (let i of data.choice) {
-                            if (item.id == i) {
-                                console.log(item.id)
-                                item.status = 1;
-                            }
-                        }
+                ]
+            }
+        },
+        {
+            "component_type": 1,//1=新闻 2=广告
+            "component_style": 1,//样式
+            "sort": 3,//组件位置
+            "data": {
+                "alias":"热点精选",
+                "category_id": 11,
+                "pinyin": "sannongzixun/zhengcefagui",
+                "text": [
+                    {
+                        "id": 2863,
+                        "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "nongminxinnongcun/nongcunxinfangshe"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 2862,
+                        "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun/buweidongtai"
+                    },
+                    {
+                        "id": 50126,
+                        "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 3976,
+                        "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50189,
+                        "title": "7以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "nongminhezuoshe"
+                    },
+                    {
+                        "id": 50190,
+                        "title": "8以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "pinyin": "nongminhezuoshe"
+                    }
+                ],
+                "img": [
+                    {
+                        "id": 50129,
+                        "title": "1以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "linyuting123",
+                        "updated_at": "2025-05-30 13:50:54",
+                        "introduce": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "cat_arr_id": "[1,201]",
+                        "catid": 201,
+                        "level": "[1,2,3]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "2以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:46",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[2]",
+                        "catid": 2,
+                        "level": "[2,3]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "3以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:45",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[1]",
+                        "catid": 1,
+                        "level": "[2]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "4以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:44",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[11]",
+                        "catid": 11,
+                        "level": "[2]",
+                        "pinyin": "xinnongcun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "5以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-05-30 13:50:43",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": "[14,240]",
+                        "catid": 240,
+                        "level": "[2,3]",
+                        "pinyin": "sannongzixun"
+                    },
+                    {
+                        "id": 50129,
+                        "title": "6以生态为内核推动文旅发展海南深山黎寨找到乡村振兴金钥匙6",
+                        "imgurl": "http://img.bjzxtw.org.cn/dev/image/jpeg/20250220/1740044079754901.png",
+                        "author": "佚名",
+                        "updated_at": "2025-04-16 11:04:29",
+                        "introduce": "描述",
+                        "islink": 0,
+                        "linkurl": "",
+                        "copyfrom": "本网",
+                        "cat_arr_id": null,
+                        "catid": 36,
+                        "level": "[2]",
+                        "pinyin": "sannongzixun"
                     }
-                    websiteSurveyData.value = data;
-                } else {
-                    ElMessage.error('投票失败!')
-                }
+                ]
             }
-        } else {
-            ElMessage.error('请选择一个选项')
-        }
-    }
-}
-//7.投票 end---------------------------------------->
-
-//8.页面图片放大 start---------------------------------------->
-const previewVisible = ref(false)
-const selectedImage = ref(' ')
-
-const openPreview = (event) => {
-    if (event.target.tagName === 'IMG') {
-        selectedImage.value = event.target.src;
-        previewVisible.value = true;
+        },
+    ],
+    "ad": {
+        "ad_tag": "nmw_index_0003"
     }
 }
-const closePreview = () => {
-    previewVisible.value = false;
-}
-//8.页面图片放大 end---------------------------------------->
+//2.获得页面数据 end---------------------------------------->
 </script>
 
 <style lang="less" scoped>

+ 7 - 100
pages/[dir]/list-[id].vue

@@ -103,104 +103,11 @@ useSeoMeta({
 //1.获得基本信息单元 end---------------------------------------->
 
 //2.获得页面数据 start---------------------------------------->
-const route = useRoute();
-let pageNum = ref(1); //列表页当前页码
-pageNum.value = parseInt(route.params.id);//路由中传递的分页页码
-let total = ref(1); //总条数
-let pageSize = ref(20); //每页条数
-
-//2.1新闻数据
-// const newsList = ref([]);
-// let newslists = async () => {
-//     const listData = await requestDataPromise('/web/getWebsiteArticleList', {
-//         method: 'GET',
-//         query: {
-//             'page': pageNum.value,
-//             'pageSize': pageSize.value,
-//             'catid': articleId
-//         },
-//     });
-//     if (listData.code == 200) {
-//         newsList.value = listData.data.rows;
-//         total.value = listData.data.count;
-
-//     } else {
-//         console.log("错误位置:获取新闻列表")
-//     }
-// }
-// newslists();
-
-// //2.2分页
-// let changePage = (value) => {
-//     console.log("当前页码", value);
-//     navigateTo(`/${targetSegment}/list-${value}.html`)
-// }
-//2.获得页面数据 end---------------------------------------->
-
-
-
-//4.面包屑 start ---------------------------------------->
-// const name = ref('')
-// //4.1 当前频道名称
-// 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("错误位置:获取当前频道名称", pageName.message)
-//     }
-// }
-// getPageName();
-
-// //4.2 查询是否含有父级导航
-// const parent_name = ref([]);
-// const parent_id = ref([]);
-// const parent_pinyin = ref("");
-// let getParentNav = async () => {
-//     const listData = await requestDataPromise('/web/getOneWebsiteCategory', {
-//         method: 'GET',
-//         query: {
-//             'catid': articleId
-//         },
-//     });
-//     if (listData.code == 200) {
-//         parent_name.value = listData.data.parent_name;
-//         parent_id.value = listData.data.parent_id;
-//         parent_pinyin.value = listData.data.parent_pinyin;
-//     } else {
-//         console.log("错误位置:查询父级导航信息")
-//     }
-//     getSecondNav();
-// }
-// getParentNav();
-
-// //4.3 获取二级栏目列表
-// 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);
-
-//     if (listData.code == 200) {
-//         secondNav.value = listData.data
-//     } else {
-//         console.log("错误位置:获得二级栏目列表")
-//     }
-// }
-//4.面包屑 end ---------------------------------------->
-
-
+// const route = useRoute();
+// let pageNum = ref(1); //列表页当前页码
+// pageNum.value = parseInt(route.params.id);//路由中传递的分页页码
+// let total = ref(1); //总条数
+// let pageSize = ref(20); //每页条数
 
 //2.页面数据 start---------------------------------------->
 //2.0 测试数据 后期移除
@@ -364,7 +271,7 @@ const testTemplateData = {
             "component_style": 1,//样式
             "sort": 1,//组件位置
             "data": {
-                "alias":"一级导航名称2",
+                "alias":"最新资讯",
                 "category_id": 11,
                 "pinyin": "sannongzixun/zhengcefagui",
                 "text": [
@@ -516,7 +423,7 @@ const testTemplateData = {
             "component_style": 1,//样式
             "sort": 3,//组件位置
             "data": {
-                "alias":"一级导航名称3",
+                "alias":"热点精选",
                 "category_id": 11,
                 "pinyin": "sannongzixun/zhengcefagui",
                 "text": [