<template>
    <div>
        <!-- 页面头部 -->
        <HomePageHead></HomePageHead>

        <!-- 页面导航 -->
        <HomePageNavigation></HomePageNavigation>

        <!-- 二级标题-->
        <HomeSecondaryHeading :titleName="routeName" :titleData="pageData"></HomeSecondaryHeading>
        <!-- {{ name }} -->

        <!-- 第一层 -->
        <div class="farmingPartOne" v-if="pageData.length>=1">
            <div class="inner">
                <div class="innerLeft" v-if="pageData.length>=1">
                    <div class="title">
                        <h3>
                            <NuxtLink :to="{ path: `/newsList/${pageData[0].cid}`}" v-if="pageData[0]" :title="pageData[0].alias">
                                {{ pageData[0].alias }}
                            </NuxtLink>
                            <span>
                                <NuxtLink
                                    :to="{ path: `/newsList/${pageData[0].cid}`}"
                                    v-if="pageData[0]" :title="pageData[0].title">查看更多</NuxtLink>
                            </span>
                        </h3>
                    </div>
                    <div class="leftTop">
                        <div class="leftTopPhoto left" >
                            <NuxtLink :to="item.linkurl" v-if="pageData[0].data[0]&&pageData[0].data[0].islink==1" :title="pageData[0].data[0].title">
                                <img :src="pageData[0].data[0].imgurl" :alt="pageData[0].data[0].title">
                                <span>{{pageData[0].data[0].title }}</span>
                            </NuxtLink>
                            <NuxtLink :to="{ path: `/newsDetail/${pageData[0].data[0].id}`, query: { listId: routeId, listName: routeName } }"
                                v-if="pageData[0].data[0]&&pageData[0].data[0].islink==0" :title="pageData[0].data[0].title">
                                <img :src="pageData[0].data[0].imgurl" :alt="pageData[0].data[0].title">
                                <span>{{pageData[0].data[0].title}}</span>
                            </NuxtLink>
                        </div>
                        <ul class="left">
                            <li v-for="item in pageData[0].data3">
                                <em></em>
                                <span>
                                    <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">{{ item.title }}</NuxtLink>
                                    <NuxtLink
                                        :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                        v-if="item.islink==0" :title="item.title">{{ item.title }}
                                    </NuxtLink>
                                </span>
                            </li>
                        </ul>
                    </div>
                    <ul class="leftBottom" v-if="pageData[0]">
                        <li v-for="item in pageData[0].data2">
                            <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">
                                <img :src="item.imgurl" :alt="item.title">
                            </NuxtLink>
                            <NuxtLink
                                :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                v-if="item.islink==0" :title="item.title">
                                <img :src="item.imgurl" :alt="item.title">
                            </NuxtLink>
                            <p>
                                <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">{{ item.title }}</NuxtLink>
                                <NuxtLink
                                    :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                    v-if="item.islink==0" :title="item.title">{{ item.title }}</NuxtLink>
                            </p>
                        </li>
                    </ul>
                </div>
                <div class="innerRight" v-if="pageData.length>=2">
                    <div class="title">
                        <h3>
                            <NuxtLink :to="{ path: `/newsList/${pageData[1].cid}`}" v-if="pageData[1]" :title="pageData[1].alias">
                                {{ pageData[1].alias }}
                            </NuxtLink>
                            <span>
                                <NuxtLink
                                    :to="{ path: `/newsList/${pageData[1].cid}`}"
                                    v-if="pageData[1]" :title="pageData[1].title">查看更多</NuxtLink>
                            </span>

                        </h3>
                    </div>
                    <ul class="rightList">
                        <li v-for="item in pageData[1].data">
                            <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">{{ item.title }}</NuxtLink>
                            <NuxtLink
                                :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                v-if="item.islink==0" :title="item.title">
                                <img class="left" :src="item.imgurl" :alt="item.title">
                            </NuxtLink>
                            <p class="left">
                                <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">{{ item.title }}</NuxtLink>
                                <NuxtLink
                                    :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                    v-if="item.islink==0" :title="item.title">
                                    {{ item.title }}
                                </NuxtLink>
                            </p>
                        </li>
                    </ul>
                </div>
            </div>
        </div>

        <!-- 三农资讯logo -->
        <HomeTopTen :imgurl="adList[0]" v-if="adList[0]"></HomeTopTen>

        <!-- 第二层 -->
        <div class="farmingPartTwo" v-if="pageData.length>=3">
            <div class="inner">
                <div class="farmer"  v-if="pageData.length>=3">
                    <div class="title">
                        <h3>
                            <NuxtLink :to="{ path: `/newsList/${pageData[2].cid}`}" v-if="pageData[2]" :title="pageData[2].alias">
                                {{ pageData[2].alias }}
                            </NuxtLink>
                            <span>
                                <NuxtLink
                                    :to="{ path: `/newsList/${pageData[2].cid}`, query: { catid: pageData[2].cid } }"
                                    v-if="pageData[2]" :title="pageData[2].title">查看更多</NuxtLink>
                            </span>
                        </h3>
                    </div>
                    <div class="PartTwoPhoto" v-if="pageData[2].data[0]">
                        <NuxtLink :to="item.linkurl" v-if="pageData[2].data[0].islink==1" :title="pageData[2].data[0].title">
                            <img :src="pageData[2].data[0].imgurl" :alt="pageData[2].data[0].title">
                            <span>{{ pageData[2].data[0].title }}</span>
                        </NuxtLink>
                        <NuxtLink
                            :to="{ path: `/newsDetail/${pageData[2].data[0].id}`, query: { listId: routeId, listName: routeName } }"
                            v-if="pageData[2].data[0].islink==0" :title="pageData[2].data[0].title">
                            <img :src="pageData[2].data[0].imgurl" :alt="pageData[2].data[0].title">
                            <span>{{ pageData[2].data[0].title }}</span>
                        </NuxtLink>
                    </div>
                    <ul class="PartTwoList">
                        <li v-for="item in pageData[2].data2">
                            <em></em>
                            <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">{{ item.title }}</NuxtLink>
                            <NuxtLink
                                :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                v-if="item.islink==0" :title="item.title">{{ item.title }}</NuxtLink>
                        </li>
                    </ul>
                </div>
                <div class="farmer" v-if="pageData.length>=4">
                    <div class="title">
                        <h3>
                            <NuxtLink :to="{ path: `/newsList/${pageData[3].cid}`}" v-if="pageData[3]" :title="pageData[3].alias">
                                {{ pageData[3].alias }}
                            </NuxtLink>
                            <span>
                                <NuxtLink
                                    :to="{ path: `/newsList/${pageData[3].cid}`, query: { catid: pageData[3].cid } }"
                                    v-if="pageData[3]" :title="pageData[3].title">查看更多</NuxtLink>
                            </span>
                        </h3>
                    </div>
                    <div class="PartTwoPhoto" v-if="pageData[3].data[0]">
                        <NuxtLink :to="item.linkurl" v-if="pageData[3].data[0].islink==1" :title="pageData[3].data[0].title">
                            <img :src="pageData[3].data[0].imgurl" :alt="pageData[3].data[0].title">
                            <span>{{ pageData[3].data[0].title }}</span>
                        </NuxtLink>
                        <NuxtLink
                            :to="{ path: `/newsDetail/${pageData[3].data[0].id}`, query: { listId: routeId, listName: routeName } }"
                            v-if="pageData[3].data[0].islink==0" :title="pageData[3].data[0].title">
                            <img :src="pageData[3].data[0].imgurl" :alt="pageData[3].data[0].title">
                            <span>{{ pageData[3].data[0].title }}</span>
                        </NuxtLink>
                    </div>
                    <ul class="PartTwoList">
                        <li v-for="item in pageData[3].data2">
                            <em></em>
                            <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">{{ item.title }}</NuxtLink>
                            <NuxtLink
                                :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                v-if="item.islink==0" :title="item.title">{{ item.title }}</NuxtLink>
                        </li>
                    </ul>
                </div>
                <div class="farmer" v-if="pageData.length>=5">
                    <div class="title">
                        <h3>
                            <NuxtLink :to="{ path: `/newsList/${pageData[4].cid}`}" v-if="pageData[4]" :title="pageData[4].alias">
                                {{ pageData[4].alias }}
                            </NuxtLink>
                            <span>
                                <NuxtLink
                                    :to="{ path: `/newsList/${pageData[4].cid}`, query: { catid: pageData[4].cid } }"
                                    v-if="pageData[4]" :title="pageData[4].title">查看更多</NuxtLink>
                            </span>
                        </h3>
                    </div>
                    <div class="PartTwoPhoto" v-if="pageData[4].data[0]">
                        <NuxtLink :to="item.linkurl" v-if="pageData[4].data[0].islink==1" :title="pageData[4].data[0].title">
                            <img :src="pageData[4].data[0].imgurl" :alt="pageData[4].data[0].title">
                            <span>{{ pageData[4].data[0].title }}</span>
                        </NuxtLink>
                        <NuxtLink
                            :to="{ path: `/newsDetail/${pageData[4].data[0].id}`, query: { listId: routeId, listName: routeName } }"
                            v-if="pageData[4].data[0].islink==0" :title="pageData[4].data[0].title">
                            <img :src="pageData[4].data[0].imgurl" :alt="pageData[4].data[0].title">
                            <span>{{ pageData[4].data[0].title }}</span>
                        </NuxtLink>
                    </div>
                    <ul class="PartTwoList">
                        <li v-for="item in pageData[4].data2">
                            <em></em>
                            <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">{{ item.title }}</NuxtLink>
                            <NuxtLink
                                :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                v-if="item.islink==0" :title="item.title">
                                {{ item.title }}
                            </NuxtLink>
                        </li>
                    </ul>
                </div>
            </div>
        </div>

        <!-- 三农资讯logo -->
        <HomeTopTen :imgurl="adList[1]" v-if="adList[1]"></HomeTopTen>

        <!-- 第三层 -->
        <div class="zixuntuijian" v-if="pageData.length>=6">
            <div class="inner">
                <div class="innerLeft" >
                    <div class="zixunTop">
                        <div class="zixunLeft" v-if="pageData.length>=6">
                            <div class="title">
                                <h3>
                                    <NuxtLink :to="{ path: `/newsList/${pageData[5].cid}`}" v-if="pageData[5]" :title="pageData[5].alias">
                                        {{ pageData[5].alias }}
                                    </NuxtLink>
                                    <span>
                                        <NuxtLink
                                            :to="{ path: `/newsList/${pageData[5].cid}`, query: { catid: pageData[5].cid } }"
                                            v-if="pageData[5]" :title="pageData[5].title">查看更多</NuxtLink>
                                    </span>
                                </h3>
                            </div>
                            <ul class="photo_text">
                                <li v-for="item in pageData[5].data">
                                    <article>
                                        <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">
                                            <img :src="item.imgurl" :alt="item.title">
                                        </NuxtLink>
                                        <NuxtLink
                                            :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                            v-if="item.islink==0" :title="item.title">
                                            <img :src="item.imgurl" :alt="item.title">
                                        </NuxtLink>
                                        <div>
                                            <h5>
                                                <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">{{ item.title }}</NuxtLink>
                                                <NuxtLink
                                                    :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                                    v-if="item.islink==0" :title="item.title">{{ item.title }}</NuxtLink>
                                            </h5>
                                            <p>
                                                <span>{{ item.author }}</span>
                                                <span>{{ getTime(item.updated_at,'month',1) }}</span>
                                            </p>
                                        </div>
                                    </article>
                                </li>
                                <li v-for="item in pageData[5].data2">
                                    <article>
                                        <em></em>
                                        <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">{{ item.title }}</NuxtLink>
                                        <NuxtLink
                                            :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                            v-if="item.islink==0" :title="item.title">{{ item.title }}</NuxtLink>
                                    </article>
                                </li>
                            </ul>
                        </div>
                        <div class="zixunRight"  v-if="pageData.length>=7">
                            <div class="title">
                                <h3>
                                    <NuxtLink :to="{ path: `/newsList/${pageData[6].cid}`}" v-if="pageData[6]" :title="pageData[6].alias">
                                        {{ pageData[6].alias }}
                                    </NuxtLink>
                                    <span>
                                        <NuxtLink
                                            :to="{ path: `/newsList/${pageData[6].cid}`, query: { catid: pageData[6].cid } }"
                                            v-if="pageData[6]" :title="pageData[6].title">查看更多</NuxtLink>
                                    </span>

                                </h3>
                            </div>
                            <div class="towPic">
                                <div v-for="item in pageData[6].data" class="picBox">
                                    <div>
                                        <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">
                                            <img :src="item.imgurl" :alt="item.title">
                                        </NuxtLink>
                                        <NuxtLink
                                            :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                            v-if="item.islink==0" :title="item.title">
                                            <img :src="item.imgurl" :alt="item.title">
                                        </NuxtLink>
                                    </div>
                                </div>
                            </div>
                            <ul class="photo_text">
                                <li v-for="item in pageData[6].data2">
                                    <article>
                                        <em></em>
                                        <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">{{ item.title }}</NuxtLink>
                                        <NuxtLink
                                            :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                            v-if="item.islink==0" :title="item.title">{{ item.title }}
                                        </NuxtLink>
                                    </article>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="zixunBottom" v-if="pageData[7]">
                        <img class="left" :src="pageData[7].data[0].imgurl" :alt="pageData[7].data[0].title"
                            v-if="pageData[7].data[0] && hoverStatus == 0">
                        <img class="left" :src="pageData[7].data[1].imgurl" :alt="pageData[7].data[1].title"
                            v-if="pageData[7].data[1] && hoverStatus == 1">
                        <img class="left" :src="pageData[7].data[2].imgurl" :alt="pageData[7].data[2].title"
                            v-if="pageData[7].data[2] && hoverStatus == 2">
                        <img class="left" :src="pageData[7].data[3].imgurl" :alt="pageData[7].data[3].title"
                            v-if="pageData[7].data[3] && hoverStatus == 3">
                        <img class="left" :src="pageData[7].data[4].imgurl" :alt="pageData[7].data[4].title"
                            v-if="pageData[7].data[4] && hoverStatus == 4">
                        <img class="left" :src="pageData[7].data[5].imgurl" :alt="pageData[7].data[5].title"
                            v-if="pageData[7].data[5] && hoverStatus == 5">
                        <ul class="leftList left">
                            <li v-for="(item, index) in pageData[7].data" @mouseenter="qhPic(index)">
                                <h4>
                                    <em></em>
                                    <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">{{ item.title }}</NuxtLink>
                                    <NuxtLink
                                        :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                        v-if="item.islink==0" :title="item.title">{{ item.title }}</NuxtLink>
                                </h4>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="innerRight" v-if="pageData.length>=9">
                    <div class="title">
                        <h3>
                            <NuxtLink :to="{ path: `/newsList/${pageData[8].cid}`}" v-if="pageData[8]" :title="pageData[8].alias">
                                {{ pageData[8].alias }}
                            </NuxtLink>
                            <span>
                                <NuxtLink
                                    :to="{ path: `/newsList/${pageData[8].cid}`, query: { catid: pageData[8].cid } }"
                                    v-if="pageData[8]" :title="pageData[8].title">查看更多</NuxtLink>
                            </span>

                        </h3>
                    </div>
                    <ul class="information">
                        <li v-for="item in pageData[8].data">
                            <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">
                                <img :src="item.imgurl" :alt="item.title">
                            </NuxtLink>
                            <NuxtLink
                                :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                v-if="item.islink==0" :title="item.title">
                                <img :src="item.imgurl" :alt="item.title">
                            </NuxtLink>
                            <div class="text">
                                <h5>
                                    <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">{{ item.title }}</NuxtLink>
                                    <NuxtLink :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }" v-if="item.islink==0" :title="item.title">{{ item.title }}</NuxtLink>
                                </h5>
                                <p>{{ item.author }}</p>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>

        <HomeTopTen :imgurl="adList[2]" v-if="adList[2]"></HomeTopTen>

        <div class="farming" v-if="pageData.length>=10">
            <div class="inner">
                <div class="innerLeft">
                    <div class="farmer" v-if="pageData.length>=10">
                        <h3>
                            <NuxtLink :to="{ path: `/newsList/${pageData[9].cid}`}" v-if="pageData[9]" :title="pageData[9].alias">
                                {{ pageData[9].alias }}
                            </NuxtLink>
                            <span>
                                <NuxtLink
                                    :to="{ path: `/newsList/${pageData[9].cid}`, query: { catid: pageData[9].cid } }"
                                    v-if="pageData[9]" :title="pageData[9].title">查看更多</NuxtLink>
                            </span>
                        </h3>
                        <ul>
                            <li v-for="item in pageData[9].data">
                                <em></em>
                                <span>
                                    <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">{{ item.title }}</NuxtLink>
                                    <NuxtLink
                                        :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                        v-if="item.islink==0" :title="item.title">{{ item.title }}</NuxtLink>
                                </span>
                            </li>
                        </ul>
                    </div>
                    <div class="farmer" v-if="pageData.length>=11">
                        <h3>
                            <NuxtLink :to="{ path: `/newsList/${pageData[10].cid}`}" v-if="pageData[10]" :title="pageData[10].alias">
                                {{ pageData[10].alias }}
                            </NuxtLink>
                            <span>
                                <NuxtLink
                                    :to="{ path: `/newsList/${pageData[10].cid}`, query: { catid: pageData[10].cid } }"
                                    v-if="pageData[10]" :title="pageData[10].title">查看更多</NuxtLink>
                            </span>

                        </h3>
                        <ul>
                            <li v-for="item in pageData[10].data">
                                <em></em>
                                <span>
                                    <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">{{ item.title }}</NuxtLink>
                                    <NuxtLink
                                        :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                        v-if="item.islink==0" :title="item.title">{{ item.title }}</NuxtLink>
                                </span>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="innerRight"  v-if="pageData.length>=12">
                    <h3>
                        <NuxtLink :to="{ path: `/newsList/${pageData[11].cid}`}" v-if="pageData[11]" :title="pageData[11].alias">
                            {{ pageData[11].alias }}
                        </NuxtLink>
                        <span>
                            <NuxtLink
                                :to="{ path: `/newsList/${pageData[11].cid}`, query: { catid: pageData[11].cid } }"
                                v-if="pageData[11]" :title="pageData[11].title">查看更多</NuxtLink>
                        </span>
                    </h3>
                    <div class="banner">
                        <HomeSmallSwiper :swiperData="pageData[11].data"></HomeSmallSwiper>
                    </div>
                    <div class="banner_b_img">
                        <div class="photo">
                            <article v-for="(item, index) in pageData[11].data2">
                                <div class="photoL" v-if="index == 0">
                                    <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">
                                        <img :src="item.imgurl" :alt="item.title">
                                        <span>{{ item.title }}</span>
                                    </NuxtLink>
                                    <NuxtLink
                                        :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                        v-if="item.islink==0" :title="item.title">
                                        <img :src="item.imgurl" :alt="item.title">
                                        <span>{{ item.title }}</span>
                                    </NuxtLink>
                                </div>
                                <div class="photoL" v-if="index == 1">
                                    <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">
                                        <img :src="item.imgurl" :alt="item.title">
                                        <span>{{ item.title }}</span>
                                    </NuxtLink>
                                    <NuxtLink
                                        :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                        v-if="item.islink==0" :title="item.title">
                                        <img :src="item.imgurl" :alt="item.title">
                                        <span>{{ item.title }}</span>
                                    </NuxtLink>
                                </div>
                            </article>
                        </div>
                    </div>
                    <div class="banner_text_list">
                        <ul>
                            <li v-for="item in pageData[11].data3">
                                <em></em>
                                <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">
                                    <span>{{ item.title }}</span>
                                </NuxtLink>
                                <NuxtLink
                                    :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                    v-if="item.islink==0" :title="item.title">
                                    <span>{{ item.title }}</span>
                                </NuxtLink>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>

        <!-- 十强称号logo -->
        <HomeTopTen :imgurl="adList[3]" v-if="adList[3]"></HomeTopTen>

        <!-- 第五层 -->
        <div class="scienceEducation" v-if="pageData.length>=13">
            <div class="inner">
                <div class="innerLeft"  v-if="pageData.length>=13">
                    <div class="slider">
                        <div class="scienceTitle">
                            <h5>
                                <NuxtLink :to="{ path: `/newsList/${pageData[12].cid}`}" v-if="pageData[12]" :title="pageData[12].title">
                                    {{ pageData[12].title }}
                                </NuxtLink>
                            </h5>
                            
                            <p class="title">
                                <span v-if="pageData[12]" @click="qhtabs(1)">
                                    <b v-if="showTabs == 1" class="active">{{ pageData[12].title1 }}</b>
                                    <b v-else class="noSelect">{{ pageData[12].title1 }}</b>
                                </span>
                                <span v-if="pageData[12]" @click="qhtabs(2)">
                                    <b v-if="showTabs == 2" class="active">{{ pageData[12].title2 }}</b>
                                    <b v-else class="noSelect">{{ pageData[12].title2 }}</b>
                                </span>
                                <span v-if="pageData[12]" @click="qhtabs(3)">
                                    <b v-if="showTabs == 3" class="active">{{ pageData[12].title3 }}</b>
                                    <b v-else class="noSelect">{{ pageData[12].title3 }}</b>
                                </span>
                                <span v-if="pageData[12]" @click="qhtabs(4)">
                                    <b v-if="showTabs == 4" class="active">{{ pageData[12].title4 }}</b>
                                    <b v-else class="noSelect">{{ pageData[12].title4 }}</b>
                                </span>
                            </p>
                        </div>
                        <div class="box">
                            <div class="scienceListBox">
                                <ul class="scienceList" v-if="showTabs == 1">
                                    <li v-for="item in pageData[12].data1">
                                        <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title"><img :src="item.imgurl" :alt="item.title"></NuxtLink>
                                        <NuxtLink
                                            :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                            v-if="item.islink==0" :title="item.title"><img :src="item.imgurl" :alt="item.title"></NuxtLink>
                                        <p>
                                            <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">{{ item.title }}</NuxtLink>
                                            <NuxtLink
                                                :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                                v-if="item.islink==0" :title="item.title">{{ item.title }}</NuxtLink>
                                        </p>
                                    </li>
                                </ul>
                                <ul class="scienceList" v-if="showTabs == 2">
                                    <li v-for="item in pageData[12].data2">
                                        <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title"><img :src="item.imgurl" :alt="item.title"></NuxtLink>
                                        <NuxtLink
                                            :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                            v-if="item.islink==0" :title="item.title"><img :src="item.imgurl" :alt="item.title"></NuxtLink>
                                        <p>
                                            <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">{{ item.title }}</NuxtLink>
                                            <NuxtLink
                                                :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                                v-if="item.islink==0" :title="item.title">{{ item.title }}</NuxtLink>
                                        </p>
                                    </li>
                                </ul>
                                <ul class="scienceList" v-if="showTabs == 3">
                                    <li v-for="item in pageData[12].data3">
                                        <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title"><img :src="item.imgurl" :alt="item.title"></NuxtLink>
                                        <NuxtLink
                                            :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                            v-if="item.islink==0" :title="item.title"><img :src="item.imgurl" :alt="item.title"></NuxtLink>
                                        <p>
                                            <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">{{ item.title }}</NuxtLink>
                                            <NuxtLink
                                                :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                                v-if="item.islink==0" :title="item.title">{{ item.title }}</NuxtLink>
                                        </p>
                                    </li>
                                </ul>
                                <ul class="scienceList" v-if="showTabs == 4">
                                    <li v-for="item in pageData[12].data4">
                                        <img :src="item.imgurl" :alt="item.title">
                                        <p>
                                            <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">{{ item.title }}</NuxtLink>
                                            <NuxtLink
                                                :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                                v-if="item.islink==0" :title="item.title">{{ item.title }}</NuxtLink>
                                        </p>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>

                </div>
                <div class="innerRight" v-if="pageData.length>=14">
                    <h3>
                        <NuxtLink :to="{ path: `/newsList/${pageData[13].cid}`}" v-if="pageData[13]" :title="pageData[13].alias">
                            {{ pageData[13].alias }}
                        </NuxtLink>
                        <span>
                            <NuxtLink
                                :to="{ path: `/newsList/${pageData[13].cid}`, query: { catid: pageData[13].cid } }"
                                v-if="pageData[13]" :title="pageData[13].title">查看更多</NuxtLink>
                        </span>

                    </h3>
                    <ul class="sannongList">
                        <li v-for="item in pageData[13].data3">
                            <em></em>
                            <span>
                                <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">{{ item.title }}</NuxtLink>
                                <NuxtLink
                                    :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                    v-if="item.islink==0" :title="item.title">{{ item.title }}</NuxtLink>
                            </span>
                        </li>
                    </ul>
                    <div class="banner">
                        <HomeSmallSwiper :swiperData="pageData[13].data"></HomeSmallSwiper>
                    </div>
                    <div class="banner_b_img">
                        <div class="photo">
                            <article v-for="(item, index) in pageData[13].data2">
                                <div class="photoL" v-if="index == 0">
                                    <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">
                                        <img :src="item.imgurl" :alt="item.title">
                                        <span>{{ item.title }}</span>
                                    </NuxtLink>
                                    <NuxtLink
                                        :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                        v-if="item.islink==0" :title="item.title">
                                        <img :src="item.imgurl" :alt="item.title">
                                        <span>{{ item.title }}</span>
                                    </NuxtLink>
                                </div>
                                <div class="photoL" v-if="index == 1">
                                    <NuxtLink :to="item.linkurl" v-if="item.islink==1" :title="item.title">
                                        <img :src="item.imgurl" :alt="item.title">
                                        <span>{{ item.title }}</span>
                                    </NuxtLink>
                                    <NuxtLink
                                        :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
                                         v-if="item.islink==0" :title="item.title">
                                        <img :src="item.imgurl" :alt="item.title">
                                        <span>{{ item.title }}</span>
                                    </NuxtLink>
                                </div>
                            </article>
                        </div>
                    </div>

                </div>
            </div>
        </div>

        <!-- 页脚部分 -->
        <HomeFoot1></HomeFoot1>
    </div>
</template>

<script setup>
//1.加载页面依赖 start ---------------------------------------->
//获得跳转过来的id
const route = useRoute();
const routeId = route.params.id; //获得该页面的id
const routeName = route.query.name; //获得该页面的名称
//1.加载页面依赖 end ---------------------------------------->

//2.页面交互效果 start ---------------------------------------->
//2.1 新闻图片切换
const hoverStatus = ref(1)
const qhPic = function (num) {
    console.log(num)
    hoverStatus.value = num;
}

//2.2 选项卡切换
let showTabs = ref(1)
let qhtabs = function (number) {
    console.log(number)
    showTabs.value = number
}

//2.3 展示广告
const adList = ref([]);
async function getAdData(){
    const mkdata = await requestDataPromise('/web/getWebsiteAdvertisement',{method:'GET',query:{'ad_tag':'CATEGORY'}});
    if(mkdata.code == 200){
        adList.value = mkdata.data;
    }else{
        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
        console.log("错误位置：分类页广告")
        console.log("后端错误反馈：",mkdata.message)
        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
    }
}
getAdData();
//2.页面交互效果 end ---------------------------------------->

//3.渲染页面数据 start ---------------------------------------->
//3.1 该页面上所有的导航池 转为动态数据
const pageCategory = ref([]);
//3.2 该页面上需要渲染的所有数据
const pageData = ref([
    // { id: 0, data: [], data2: [], title: "", cid: "" },
    // { id: 1, data: [], title: "", cid: "" },
    // { id: 2, data: [], title: "", cid: "" },
    // { id: 3, data: [], title: "", cid: "" },
    // { id: 4, data: [], title: "", cid: "" },
    // { id: 5, data: [], title: "", cid: "" },
    // { id: 6, data: [], title: "", cid: "" },
    // { id: 7, data: [], title: "", cid: "" },
    // { id: 8, data: [], title: "", cid: "" },
    // { id: 9, data: [], title: "", cid: "" },
    // { id: 10, data: [], title: "", cid: "" },
    // { id: 10, data: [], title: "", cid: "" },
    // {
    //     id: 11,
    //     title: "",
    //     data: [],
    //     data1: [],
    //     data2: [],
    //     data3: [],
    //     data4: [],
    //     category_id1: "",
    //     category_id2: "",
    //     category_id3: "",
    //     category_id4: "",
    //     title1: "",
    //     title2: "",
    //     title3: "",
    //     title4: "",
    //     cid: ""
    // },
    // { id: 12, data1: [], data2: [], data3: [], cid: "" },
])

const navSize = ref("");

//3.3 获取所有导航
try {
    const navigateData = await requestDataPromise('/web/getWebsiteModelCategory', {
        method: 'GET',
        query: {
            'placeid': 1,
            'pid': routeId,
            'num': 14
        },
    });
    if(navigateData.code == 200){
        // 遍历可用的导航池放到页面中
        for (let index in navigateData.data) {
            let data = {
                title: navigateData.data[index].name,
                cid: navigateData.data[index].category_id,
                children_count: navigateData.data[index].children_count,
                alias: navigateData.data[index].alias,
                data:[],
                data1:[],
                data2:[],
                data3:[],
                data4:[],
                category_id1:"",
                category_id2:"",
                category_id3:"",
                category_id4:"",
                title1: "",
                title2: "",
                title3: "",
                title4: ""
            };
            if (navigateData.data[index].is_url == 1) {
                // 处理 URL 的逻辑
            } else {
                pageData.value.push(data);
            }
        }
        //导航池加载完毕，开始申请模块数据
        await getPageData1();
        await getPageData1_data2();
        await getPageData1_data3();
        await getPageData2();
        await getPageData3();
        await getPageData3_data2();
        await getPageData4();
        await getPageData4_data2();
        await getPageData5();
        await getPageData5_data2();
        await getPageData6();
        await getPageData6_data2();
        await getPageData7();
        await getPageData7_data2();
        await getPageData8();
        await getPageData9();
        await getPageData10();
        await getPageData11();
        await getPageData12();
        await getPageData12_data2();
        await getPageData12_data3();
        await getPageData13();
        if(navSize.value>=1){
            await getPageData13_data1();
        }
        if(navSize.value>=2){
            await getPageData13_data2();
        }
        if(navSize.value>=3){
            await getPageData13_data3();
        }
        if(navSize.value>=4){
            await getPageData13_data4();
        }
        await getPageData14();
        await getPageData14_data2();
        await getPageData14_data3();
    }else{
        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
        console.log("错误位置：分类页导航池")
        console.log("后端错误反馈：",navigateData.message)
        console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
    }
} catch (error) {
    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
    console.log("错误位置：分类页导航渲染阶段")
    console.log("错误：导航池渲染执行接口出错！请检查首页的14的模块的具体执行方法！")
    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
}

//模块1
async function getPageData1() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[0].cid,
            'level': 3,
            'pagesize': 1
        },
    });
    pageData.value[0].data = mkdata.data;
}
async function getPageData1_data2() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[0].cid,
            'level': 3,
            'pagesize': 4,
            'placeid': 2
        },
    });
    pageData.value[0].data2 = mkdata.data;
}
async function getPageData1_data3() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[0].cid,
            'level': 1,
            'pagesize': 8,
        },
    });
    pageData.value[0].data3 = mkdata.data;
}
//模块2
async function getPageData2() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[1].cid,
            'level': 3,
            'pagesize': 5
        },
    });
    pageData.value[1].data = mkdata.data;
}

//模块3
async function getPageData3() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[2].cid,
            'level': 3,
            'pagesize': 6
        },
    });
    pageData.value[2].data = mkdata.data;
}
async function getPageData3_data2() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[2].cid,
            'level': 1,
            'pagesize': 6
        },
    });
    pageData.value[2].data2 = mkdata.data;
}
//模块4
async function getPageData4() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[3].cid,
            'level': 3,
            'pagesize': 6
        },
    });
    pageData.value[3].data = mkdata.data;
}
async function getPageData4_data2() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[3].cid,
            'level': 1,
            'pagesize': 6
        },
    });
    pageData.value[3].data2 = mkdata.data;
}
//模块5
async function getPageData5() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[4].cid,
            'level': 3,
            'pagesize': 6
        },
    });
    pageData.value[4].data = mkdata.data;
}
async function getPageData5_data2() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[4].cid,
            'level': 1,
            'pagesize': 6
        },
    });
    pageData.value[4].data2 = mkdata.data;
}
//模块6
async function getPageData6() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[5].cid,
            'level': 3,
            'pagesize':1
        },
    });
    pageData.value[5].data = mkdata.data;
}
async function getPageData6_data2() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[5].cid,
            'level': 1,
            'pagesize':3
        },
    });
    pageData.value[5].data2 = mkdata.data;
}
//模块7
async function getPageData7() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[6].cid,
            'level': 3,
            'pagesize': 2
        },
    });
    pageData.value[6].data = mkdata.data;
}
async function getPageData7_data2() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[6].cid,
            'level': 1,
            'pagesize': 3
        },
    });
    pageData.value[6].data2= mkdata.data;
}


//模块8
async function getPageData8() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[7].cid,
            'level': 3,
            'pagesize': 5
        },
    });
    pageData.value[7].data = mkdata.data;
}


//模块9
async function getPageData9() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[8].cid,
            'level': 3,
            'pagesize': 4
        },
    });
    pageData.value[8].data = mkdata.data;
}
//模块10
async function getPageData10() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[9].cid,
            'level': 1,
            'pagesize': 10
        },
    });
    pageData.value[9].data = mkdata.data;
}
//模块11
async function getPageData11() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[10].cid,
            'level': 1,
            'pagesize': 10
        },
    });
    pageData.value[10].data = mkdata.data;
}
//模块12
async function getPageData12() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[11].cid,
            'level': 2,
            'pagesize': 4
        },
    });
    pageData.value[11].data = mkdata.data;
}

async function getPageData12_data2() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[11].cid,
            'level': 3,
            'pagesize': 2
        },
    });
    pageData.value[11].data2 = mkdata.data;
}
async function getPageData12_data3() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[11].cid,
            'level': 1,
            'pagesize': 5
        },
    });
    pageData.value[11].data3 = mkdata.data;
}
async function getPageData13() {
    const navData =  await requestDataPromise('/web/getWebsiteModelCategory', {
        method: 'GET',
        query: {
            'pid': pageData.value[12].cid,
            'placeid': 1,
            'num': 4
        },
    });
    let mkLength = navData.data.length;
    navSize.value = navData.data.length;
    if(mkLength != 0){
        for (let i = 1; i <= mkLength; i++) {
            if (i == 1) {
                pageData.value[12].title1 = navData.data[0].name;
                pageData.value[12].category_id1 = navData.data[0].category_id;
            }
            if (i == 2) {
                pageData.value[12].title2 = navData.data[1].name;
                pageData.value[12].category_id2 = navData.data[1].category_id;
            }
            if (i == 3) {
                pageData.value[12].title3 = navData.data[2].name;
                pageData.value[12].category_id3 = navData.data[2].category_id;
            }
            if (i == 4) {
                pageData.value[12].title4 = navData.data[3].name;
                pageData.value[12].category_id4 = navData.data[3].category_id;
            }
        }
    }
}

async function getPageData13_data1() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[12].category_id1,
            'level': 3,
            'pagesize': 6
        },
    });
    pageData.value[12].data1 = mkdata.data;
}
async function getPageData13_data2() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[12].category_id2,
            'level': 3,
            'pagesize': 6
        },
    });
    pageData.value[12].data2 = mkdata.data;
}
async function getPageData13_data3() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[12].category_id3,
            'level': 3,
            'pagesize': 6
        },
    });
    pageData.value[12].data3 = mkdata.data;
}
async function getPageData13_data4() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[12].category_id4,
            'level': 3,
            'pagesize': 6
        },
    });
    pageData.value[12].data4 = mkdata.data;
}

//模块14
async function getPageData14() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[13].cid,
            'level': 2,
            'pagesize': 4
        },
    });
    pageData.value[13].data = mkdata.data;
}
async function getPageData14_data2() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[13].cid,
            'level': 3,
            'pagesize': 2
        },
    });
    pageData.value[13].data2 = mkdata.data;
}
async function getPageData14_data3() {
    const mkdata =  await requestDataPromise('/web/getWebsiteModelArticles', {
        method: 'GET',
        query: {
            'catid': pageData.value[13].cid,
            'level': 1,
            'pagesize': 5
        },
    });
    pageData.value[13].data3 = mkdata.data;
}
//3.渲染页面数据 end ---------------------------------------->

//4.设置seo信息 start---------------------------------------->
//4.1 设置seo信息
const setData =  await requestDataPromise('/web/getWebsiteCategoryHead', {
    method: 'GET',
    query: {
        'catid': routeId
    },
});

if(setData.code == 200){
    let seoTitle = setData.data.seo_title;
    let seoDescription = setData.data.seo_description;
    let seoKeywords = setData.data.seo_keywords;
    let seoSuffix = setData.data.suffix;
    let seoName = setData.data.website_name;

    useSeoMeta({
        title: seoTitle + "_" + seoSuffix,
        meta: [
            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix },
            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix }
        ]
    });
}else{
    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
    console.log("错误位置：设置分类页面SEO数据")
    console.log("后端错误反馈：",setData.message)
    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
}
//4.设置seo信息 end---------------------------------------->
</script>

<style lang="less" scoped>
    @import '@/assets/css/class.less';
</style>