<template>
    <div>
        <HomePageHead></HomePageHead>
        <HomePageNavigation></HomePageNavigation>
        <main class="index_main">
            <section class="index_1 clearfix">
                <div class="index_1_head_box">
                    <h1 class="index_1_h3">
                        <NuxtLink class="index_1_h3_a dot1" :href="getLinkPathDetail(headline)" :title="headline.title"
                            :target="headline.islink == 1 ? '_blank' : '_self'">
                            {{ headline.title }}
                        </NuxtLink>
                    </h1>
                    <div class="index_1_title_box">
                        <NuxtLink class="index_1_title_box_a dot1" :href="getLinkPathDetail(item)" :title="item.title"
                            v-for="item in headlineData2" :key="index" :target="item.islink == 1 ? '_blank' : '_self'">
                            {{ item.title }}
                        </NuxtLink>
                    </div>
                </div>
            </section>
            <section class="index_2 clearfix">
                <div class="index_box_1 clearfix">
                    <div class="index_1_ul clearfix">
                        <NuxtLink class="index_1_ul_a dot1" :href="getLinkPathDetail(item)" v-for="item in hotNewsList"
                            :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'">
                            {{ item.title }}
                        </NuxtLink>
                    </div>
                </div>
                <div class="index_box_2 clearfix">
                    <div class="roll_1_box clearfix">
                        <HomeBigSwiper></HomeBigSwiper>
                    </div>
                </div>
            </section>
            <!-- 广告1 -->
            <HomeAdvertising :imgurl="adImg1"></HomeAdvertising>
            <section class="index_3 clearfix">
                <div class="index_box_3 clearfix">
                    <div class="index_head_btn_box">
                        <div class="index_head_btn" :class="{ index_head_btn_only: hoverStatus == 1 }"
                            v-if="pageData[0]" @mouseover="qhPic(1)">
                            <NuxtLink class="index_head_a" :href="getLinkPath(pageData[0])" :title="pageData[0].alias">
                                {{ pageData[0].alias }}
                            </NuxtLink>
                        </div>
                        <div class="index_head_btn" :class="{ index_head_btn_only: hoverStatus == 2 }"
                            v-if="pageData[1]" @mouseover="qhPic(2)">
                            <NuxtLink class="index_head_a" :href="getLinkPath(pageData[1])" :title="pageData[1].alias">
                                {{ pageData[1].alias }}
                            </NuxtLink>
                        </div>
                        <div class="index_head_btn" :class="{ index_head_btn_only: hoverStatus == 3 }"
                            v-if="pageData[2]" @mouseover="qhPic(3)">
                            <NuxtLink class="index_head_a" :href="getLinkPath(pageData[2])" :title="pageData[2].alias">
                                {{ pageData[2].alias }}
                            </NuxtLink>
                        </div>
                    </div>
                    <div class="">
                        <!--open  农产供求 -->
                        <div class=" clearfix" v-if="hoverStatus == 1">
                            <div class="index_box_5 clearfix">
                                <div class="index_img_ul_1 clearfix">
                                    <div class="index_img_ul_1_li clearfix">
                                        <NuxtLink class="index_img_ul_1_li_a clearfix" :href="getLinkPathDetail(item)"
                                            v-for="item in boxData1" :title="item.title"
                                            :target="item.islink == 1 ? '_blank' : '_self'">
                                            <div class="index_img_ul_1_li_img_box">
                                                <img class="index_img_ul_1_li_img" :src="item.imgurl" alt="item.title">
                                            </div>
                                            <div class="index_img_ul_1_li_dot3 dot3">
                                                {{ item.title }}
                                            </div>
                                        </NuxtLink>
                                    </div>
                                </div>
                                <div class="index_name_ul">
                                    <div class="index_name_ul_li" v-for="item in boxData1data3" :key="per_obj">
                                        <NuxtLink class="index_name_ul_li_tag" :href="getLinkPath1(item)"
                                            :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'">
                                            [{{ item.alias }}]
                                        </NuxtLink>
                                        <NuxtLink class="index_name_ul_li_dot1 dot1" :href="getLinkPathDetail1(item)"
                                            :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'">
                                            {{ item.title }}
                                        </NuxtLink>
                                    </div>
                                </div>
                            </div>
                            <div class="index_box_6 clearfix">
                                <div class="index_img_ul_2 clearfix">
                                    <div class="index_img_ul_2_li clearfix">
                                        <NuxtLink class="index_img_ul_2_li_a clearfix" :href="getLinkPathDetail(item)"
                                            v-for="item in boxData1data2" :title="item.title"
                                            :target="item.islink == 1 ? '_blank' : '_self'">
                                            <div class="index_img_ul_2_li_img_box">
                                                <img class="index_img_ul_2_li_img" :src="item.imgurl" alt="item.title">
                                            </div>
                                            <div class="index_img_ul_2_li_dot3 dot3">
                                                {{ item.title }}
                                            </div>
                                        </NuxtLink>
                                    </div>
                                </div>
                                <div class="index_name_ul_2">
                                    <div class="index_name_ul_2_li" v-for="item in boxData1data4">
                                        <NuxtLink class="index_name_ul_2_li_tag" :href="getLinkPath1(item)"
                                            :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'">
                                            [{{ item.alias }}]
                                        </NuxtLink>
                                        <NuxtLink class="index_name_ul_2_li_dot1 dot1" :href="getLinkPathDetail1(item)"
                                            :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'">
                                            {{ item.title }}
                                        </NuxtLink>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--end  农产供求-->
                        <!--open   致富项目-->
                        <div class=" clearfix" v-if="hoverStatus == 2">
                            <div class="index_box_5 clearfix">
                                <div class="index_img_ul_1 clearfix">
                                    <div class="index_img_ul_1_li clearfix">
                                        <NuxtLink class="index_img_ul_1_li_a clearfix" :href="getLinkPathDetail(item)"
                                            v-for="item in boxData2" :title="item.title"
                                            :target="item.islink == 1 ? '_blank' : '_self'">
                                            <div class="index_img_ul_1_li_img_box">
                                                <img class="index_img_ul_1_li_img" :src="item.imgurl" alt="item.title">
                                            </div>
                                            <div class="index_img_ul_1_li_dot3 dot3">
                                                {{ item.title }}
                                            </div>
                                        </NuxtLink>
                                    </div>
                                </div>
                                <div class="index_name_ul">
                                    <div class="index_name_ul_li" v-for="item in boxData2data3" :key="per_obj">
                                        <NuxtLink class="index_name_ul_li_tag" :href="getLinkPath1(item)"
                                            :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'">
                                            [{{ item.alias }}]
                                        </NuxtLink>
                                        <NuxtLink class="index_name_ul_li_dot1 dot1" :href="getLinkPathDetail1(item)"
                                            :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'">
                                            {{ item.title }}
                                        </NuxtLink>
                                    </div>
                                </div>
                            </div>
                            <div class="index_box_6 clearfix">
                                <div class="index_img_ul_2 clearfix">
                                    <div class="index_img_ul_2_li clearfix">
                                        <NuxtLink class="index_img_ul_2_li_a clearfix" :href="getLinkPathDetail(item)"
                                            v-for="item in boxData2data2" :title="item.title"
                                            :target="item.islink == 1 ? '_blank' : '_self'">
                                            <div class="index_img_ul_2_li_img_box">
                                                <img class="index_img_ul_2_li_img" :src="item.imgurl" alt="item.title">
                                            </div>
                                            <div class="index_img_ul_2_li_dot3 dot3">
                                                {{ item.title }}
                                            </div>
                                        </NuxtLink>
                                    </div>
                                </div>
                                <div class="index_name_ul_2">
                                    <div class="index_name_ul_2_li" v-for="item in boxData2data4">
                                        <NuxtLink class="index_name_ul_2_li_tag" :href="getLinkPath1(item)"
                                            :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'">
                                            [{{ item.alias }}]
                                        </NuxtLink>
                                        <NuxtLink class="index_name_ul_2_li_dot1 dot1" :href="getLinkPathDetail1(item)"
                                            :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'">
                                            {{ item.title }}
                                        </NuxtLink>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--end  致富项目-->
                        <!--open   招商招标-->
                        <div class=" clearfix" v-if="hoverStatus == 3">
                            <div class="index_box_5 clearfix">
                                <div class="index_img_ul_1 clearfix">
                                    <div class="index_img_ul_1_li clearfix">
                                        <NuxtLink class="index_img_ul_1_li_a clearfix" :href="getLinkPathDetail(item)"
                                            v-for="item in boxData3" :title="item.title"
                                            :target="item.islink == 1 ? '_blank' : '_self'">
                                            <div class="index_img_ul_1_li_img_box">
                                                <img class="index_img_ul_1_li_img" :src="item.imgurl" alt="item.title">
                                            </div>
                                            <div class="index_img_ul_1_li_dot3 dot3">
                                                {{ item.title }}
                                            </div>
                                        </NuxtLink>
                                    </div>
                                </div>
                                <div class="index_name_ul">
                                    <div class="index_name_ul_li" v-for="item in boxData3data3" :key="per_obj">
                                        <NuxtLink class="index_name_ul_li_tag" :href="getLinkPath1(item)"
                                            :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'">
                                            [{{ item.alias }}]
                                        </NuxtLink>
                                        <NuxtLink class="index_name_ul_li_dot1 dot1" :href="getLinkPathDetail1(item)"
                                            :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'">
                                            {{ item.title }}
                                        </NuxtLink>
                                    </div>
                                </div>
                            </div>
                            <div class="index_box_6 clearfix">
                                <div class="index_img_ul_2 clearfix">
                                    <div class="index_img_ul_2_li clearfix">
                                        <NuxtLink class="index_img_ul_2_li_a clearfix" :href="getLinkPathDetail(item)"
                                            v-for="item in boxData3data2" :title="item.title"
                                            :target="item.islink == 1 ? '_blank' : '_self'">
                                            <div class="index_img_ul_2_li_img_box">
                                                <img class="index_img_ul_2_li_img" :src="item.imgurl" alt="item.title">
                                            </div>
                                            <div class="index_img_ul_2_li_dot3 dot3">
                                                {{ item.title }}
                                            </div>
                                        </NuxtLink>
                                    </div>
                                </div>
                                <div class="index_name_ul_2">
                                    <div class="index_name_ul_2_li" v-for="item in boxData3data4">
                                        <NuxtLink class="index_name_ul_2_li_tag" :href="getLinkPath1(item)"
                                            :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'">
                                            [{{ item.alias }}]
                                        </NuxtLink>
                                        <NuxtLink class="index_name_ul_2_li_dot1 dot1" :href="getLinkPathDetail1(item)"
                                            :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'">
                                            {{ item.title }}
                                        </NuxtLink>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--end  招商招标-->
                    </div>
                </div>
                <div class="index_box_4 clearfix">
                    <div class="index_head_btn_box">
                        <div class="index_head_btn" :class="{ index_head_btn_only: hoverStatusTwo == 1 }"
                            v-if="pageData[3]" @mouseover="qhPicTwo(1)">
                            <NuxtLink class="index_head_a" :href="getLinkPath(pageData[3])" :title="pageData[3].alias">
                                {{ pageData[3].alias }}
                            </NuxtLink>
                        </div>
                        <div class="index_head_btn" :class="{ index_head_btn_only: hoverStatusTwo == 2 }"
                            v-if="pageData[4]" @mouseover="qhPicTwo(2)">
                            <NuxtLink class="index_head_a" :href="getLinkPath(pageData[4])" :title="pageData[4].alias">
                                {{ pageData[4].alias }}
                            </NuxtLink>
                        </div>
                    </div>
                    <div class=" clearfix">
                        <!--open   动态资讯-->
                        <div class=" clearfix" v-if="hoverStatusTwo == 1">
                            <div class="index_img_ul_3">
                                <div class="index_img_ul_3_li">
                                    <NuxtLink class="index_img_ul_3_li_a" v-for="item in boxData4"
                                        :href="getLinkPathDetail(item)" :title="item.title"
                                        :target="item.islink == 1 ? '_blank' : '_self'">
                                        <img class="index_img_ul_3_li_img" :src="item.imgurl" alt="item.title">
                                        <div class="index_img_ul_3_li_dot1 dot1">
                                            {{ item.title }}
                                        </div>
                                    </NuxtLink>
                                </div>
                            </div>
                            <div class="index_ul_1">
                                <NuxtLink class="index_ul_1_a dot1" v-for="item in boxData4data2"
                                    :href="getLinkPathDetail(item)" :title="item.title"
                                    :target="item.islink == 1 ? '_blank' : '_self'">
                                    {{ item.title }}
                                </NuxtLink>
                            </div>
                        </div>
                        <!--end  动态资讯-->
                        <!--open 农户农企-->
                        <div class=" clearfix" v-show="hoverStatusTwo == 2">
                            <div class="index_img_ul_3">
                                <div class="index_img_ul_3_li">
                                    <NuxtLink class="index_img_ul_3_li_a" v-for="item in boxData5"
                                        :href="getLinkPathDetail(item)" :title="item.title"
                                        :target="item.islink == 1 ? '_blank' : '_self'">
                                        <img class="index_img_ul_3_li_img" :src="item.imgurl" alt="item.title">
                                        <div class="index_img_ul_3_li_dot1 dot1">
                                            {{ item.title }}
                                        </div>
                                    </NuxtLink>
                                </div>
                            </div>
                            <div class="index_ul_1">
                                <NuxtLink class="index_ul_1_a dot1" v-for="item in boxData5data2"
                                    :href="getLinkPathDetail(item)" :title="item.title"
                                    :target="item.islink == 1 ? '_blank' : '_self'">
                                    {{ item.title }}
                                </NuxtLink>
                            </div>
                        </div>
                        <!--end  农户农企-->
                    </div>
                </div>
            </section>
            <section class="index_4 clearfix">
                <!--open   市场分类-->
                <div class="index_head_btn_box">
                    <div class="index_head_btn index_head_btn_only">
                        <span class="index_head_a">市场分类</span>
                    </div>
                    <!-- 长度最多可以放8个 -->
                    <!-- <div class="index_head_right_btn_box">
                        <a class="index_2_head_right_a" v-for="(item, index) in navigation.slice(0, 8)" :key="index"
                            :href="getLinkPath(item)" :title="item.alias">
                            {{ item.alias }}
                        </a>
                    </div> -->
                    <div class="index_head_btn_right_box">
                        <span class="index_head_btn_right_a" @click="goAddShop">发布信息</span>
                    </div>
                </div>
                <div class="index_4_in clearfix">
                    <div class="index_4_img_box back100">
                    </div>
                    <div class="index_4_ol clearfix">
                        <div class="index_4_ol_li" v-for="(item, index) in navigation" :key="index">
                            <div class="index_4_ol_li_head clearfix">
                                <a class="index_4_ol_li_head_a dot1" :href="getLinkPath(item)" :title="item.alias">
                                    {{ item.alias }}
                                </a>
                            </div>
                            <div class="index_4_ol_in clearfix">
                                <a class="index_4_ol_in_li_a dot1"
                                    :href="`${item.aLIas_pinyin}/${item1.aLIas_pinyin}/list-1.html`"
                                    :title="item1.alias" v-for="(item1, index1) in item.children.slice(0, 5)"
                                    :key="index1">
                                    {{ item1.alias }}
                                </a>
                                <a class="index_4_ol_in_li_a dot1" :href="getLinkPath(item)" :title="item.alias"
                                    v-if="item.children.length > 5">
                                    更多 &gt;
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
                <!--end  市场分类-->
            </section>
            <section class="index_5 clearfix">
                <div class="index_box_3 clearfix">
                    <div class="index_head_btn_box">
                        <div class="index_head_btn index_head_btn_only" v-if="pageData[5]">
                            <NuxtLink class="index_head_a" :href="getLinkPath(pageData[5])" :title="pageData[5].alias">
                                {{ pageData[5].alias }}
                            </NuxtLink>
                        </div>
                    </div>
                    <!--open   策划-->
                    <div class=" clearfix">
                        <div class="index_box_5 clearfix">
                            <div class="index_img_ul_4_ul">
                                <div class="index_img_ul_4_li">
                                    <NuxtLink class="index_img_ul_4_li_a" :href="getLinkPathDetail(item)"
                                        v-for="item in boxData6" :title="item.title"
                                        :target="item.islink == 1 ? '_blank' : '_self'">
                                        <img class="index_img_ul_4_li_img" :src="item.imgurl" alt="item.title">
                                        <div class="index_img_ul_4_li_dot1 dot1">
                                            {{ item.title }}
                                        </div>
                                    </NuxtLink>
                                </div>
                            </div>
                            <div class="index_img_even_1_ul clearfix">
                                <div class="index_img_even_1_li" v-for="item in boxData6data2">
                                    <NuxtLink class="index_img_even_1_li_a" :href="getLinkPathDetail(item)"
                                        :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'">
                                        <img class="index_img_even_1_li_img" :src="item.imgurl" alt="item.title">
                                        <div class="index_img_even_1_li_dot1 dot1">
                                            {{ item.title }}
                                        </div>
                                    </NuxtLink>
                                </div>
                            </div>
                        </div>
                        <div class="index_box_6 clearfix">
                            <div class="index_ul_2 clearfix">
                                <NuxtLink class="index_ul_2_a dot1" :href="getLinkPathDetail(item)"
                                    v-for="item in boxData6data3" :title="item.title"
                                    :target="item.islink == 1 ? '_blank' : '_self'">
                                    {{ item.title }}
                                </NuxtLink>
                            </div>
                        </div>
                    </div>
                    <!--end  策划-->
                </div>
                <div class="index_box_4 clearfix">
                    <div class="index_head_btn_box">
                        <div class="index_head_btn index_head_btn_only" v-if="pageData[6]">
                            <NuxtLink class="index_head_a" :href="getLinkPath(pageData[6])" :title="pageData[6].alias">
                                {{ pageData[6].alias }}
                            </NuxtLink>
                        </div>
                    </div>
                    <!--open   专家服务-->
                    <div class="index_5_right">
                        <div class="index_5_right_img_ul clearfix">
                            <div class="index_5_right_img_li clearfix">
                                <div class="index_5_right_img_li_img_box" v-if="boxData7[0]">
                                    <NuxtLink class="index_5_right_img_li_a" :href="getLinkPathDetail(boxData7[0])"
                                        :title="boxData7[0].title"
                                        :target="boxData7[0].islink == 1 ? '_blank' : '_self'">
                                        <img class="index_5_right_img_li_a_img" :src="boxData7[0].imgurl"
                                            :title="boxData7[0].title" :alt="boxData7[0].title">
                                    </NuxtLink>
                                </div>
                                <div class="index_ul_3" v-if="boxData7[0]">
                                    <NuxtLink class="index_ul_3_a dot1" :href="getLinkPathDetail(boxData7[0])"
                                        :title="boxData7[0].title"
                                        :target="boxData7[0].islink == 1 ? '_blank' : '_self'">
                                        {{ boxData7[0].title }}
                                    </NuxtLink>
                                    <NuxtLink class="index_ul_3_a dot1" :href="getLinkPathDetail(item)"
                                        v-for="item in boxData7data2" :title="item.title"
                                        :target="item.islink == 1 ? '_blank' : '_self'">
                                        <span class="index_ul_3_a_tag">问:</span>
                                        {{ item.title }}
                                    </NuxtLink>
                                </div>
                            </div>
                            <div class="index_5_right_img_li clearfix">
                                <div class="index_5_right_img_li_img_box" v-if="boxData7[1]">
                                    <NuxtLink class="index_5_right_img_li_a" :href="getLinkPathDetail(boxData7[1])"
                                        :title="boxData7[1].title"
                                        :target="boxData7[1].islink == 1 ? '_blank' : '_self'">
                                        <img class="index_5_right_img_li_a_img" :src="boxData7[1].imgurl"
                                            :title="boxData7[0].title" :alt="boxData7[0].title">
                                    </NuxtLink>
                                </div>
                                <div class="index_ul_3" v-if="boxData7[1]">
                                    <NuxtLink class="index_ul_3_a dot1" :href="getLinkPathDetail(boxData7[1])"
                                        :title="boxData7[1].title"
                                        :target="boxData7[1].islink == 1 ? '_blank' : '_self'">
                                        {{ boxData7[1].title }}
                                    </NuxtLink>
                                    <NuxtLink class="index_ul_3_a dot1" :href="getLinkPathDetail(item)"
                                        v-for="item in boxData7data3" :title="item.title"
                                        :target="item.islink == 1 ? '_blank' : '_self'">
                                        <span class="index_ul_3_a_tag">问:</span>
                                        {{ item.title }}
                                    </NuxtLink>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--end  专家服务-->
                </div>
            </section>
            <!-- 广告2 -->
            <HomeAdvertising :imgurl="adImg2"></HomeAdvertising>

            <section class="index_6 clearfix">
                <div class="index_box_3 clearfix">
                    <div class="index_head_btn_box">
                        <div class="index_head_btn index_head_btn_only" v-if="pageData[7]">
                            <NuxtLink class="index_head_a" :href="getLinkPath(pageData[7])" :title="pageData[7].alias">
                                {{ pageData[7].alias }}
                            </NuxtLink>
                        </div>
                    </div>
                    <!--open   行业报告-->
                    <div class="index_box_5 clearfix">
                        <div class="index_img_ul_5_ul">
                            <div class="index_img_ul_5_li">
                                <NuxtLink class="index_img_ul_5_li_a" :href="getLinkPathDetail(item)"
                                    :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'"
                                    v-for="item in boxData8">
                                    <img class="index_img_ul_5_li_img" :src="item.imgurl" alt="item.title">
                                    <div class="index_img_ul_5_li_dot1 dot1">
                                        {{ item.title }}
                                    </div>
                                </NuxtLink>
                            </div>
                        </div>
                        <div class="index_img_even_2_ul clearfix">
                            <div class="index_img_even_2_li" v-for="item in boxData8data2">
                                <NuxtLink class="index_img_even_2_li_a" :href="getLinkPathDetail(item)"
                                    :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'">
                                    <img class="index_img_even_2_li_img" :src="item.imgurl" alt="item.title">
                                    <div class="index_img_even_2_li_dot1 dot1">
                                        {{ item.title }}
                                    </div>
                                </NuxtLink>
                            </div>
                        </div>
                    </div>
                    <div class="index_box_6 clearfix">
                        <div class="index_ul_4 clearfix">
                            <NuxtLink class="index_ul_4_a dot1" :href="getLinkPathDetail(item)" :title="item.title"
                                :target="item.islink == 1 ? '_blank' : '_self'" v-for="item in boxData8data3">
                                {{ item.title }}
                            </NuxtLink>
                        </div>
                    </div>
                    <!--end  行业报告-->
                </div>
                <div class="index_box_4 clearfix">
                    <div class="index_head_btn_box">
                        <div class="index_head_btn index_head_btn_only" v-if="pageData[8]">
                            <NuxtLink class="index_head_a" :href="getLinkPath(pageData[8])" :title="pageData[8].alias">
                                {{ pageData[8].alias }}
                            </NuxtLink>
                        </div>
                    </div>
                    <!--open   农产知识-->
                    <div class="index_img_ul_3">
                        <div class="index_img_ul_3_li">
                            <NuxtLink class="index_img_ul_3_li_a" :href="getLinkPathDetail(item)" :title="item.title"
                                :target="item.islink == 1 ? '_blank' : '_self'" v-for="item in boxData9">
                                <img class="index_img_ul_3_li_img" :src="item.imgurl" title="item.title"
                                    alt="item.title">
                                <div class="index_img_ul_3_li_dot1 dot1">{{ item.title }}</div>
                            </NuxtLink>
                        </div>
                    </div>
                    <div class="index_ul_5">
                        <NuxtLink class="index_ul_5_a dot1" :href="getLinkPathDetail(item)" :title="item.title"
                            :target="item.islink == 1 ? '_blank' : '_self'" v-for="item in boxData9data2">
                            {{ item.title }}
                        </NuxtLink>
                    </div>
                    <!--end 农产知识 -->
                </div>
            </section>
            <!-- 模块7 -->
            <section class="index_7 clearfix">
                <div class="index_box_3 clearfix">
                    <div class="index_head_btn_box">
                        <div class="index_head_btn index_head_btn_only" v-if="pageData[9]">
                            <NuxtLink class="index_head_a" :href="getLinkPath(pageData[9])" :title="pageData[9].alias">
                                {{ pageData[9].alias }}
                            </NuxtLink>
                        </div>
                    </div>
                    <!--open   综合资讯-->
                    <div class="index_box_5 clearfix">
                        <div class="index_img_ul_6">
                            <div class="index_img_ul_6_li">
                                <NuxtLink class="index_img_ul_6_li_a" :href="getLinkPathDetail(item)"
                                    :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'"
                                    v-for="item in boxData10">
                                    <img class="index_img_ul_6_li_img" :src="item.imgurl" title="item.title"
                                        alt="item.title">
                                    <div class="index_img_ul_6_li_dot1 dot1">{{ item.title }}</div>
                                </NuxtLink>
                            </div>
                        </div>
                        <div class="index_img_even_1_ul clearfix">
                            <div class="index_img_even_1_li" v-for="item in boxData10data1">
                                <NuxtLink class="index_img_even_1_li_a" :href="getLinkPathDetail(item)"
                                    :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'">
                                    <img class="index_img_even_1_li_img" :src="item.imgurl" alt="item.title">
                                    <div class="index_img_even_1_li_dot1 dot1">
                                        {{ item.title }}
                                    </div>
                                </NuxtLink>
                            </div>
                        </div>
                        <ul class="index_7_btntext">
                            <li class="index_7_textList dot1" v-for="(item, index) in boxData10data2" :key="index">
                                <em></em>
                                <!-- <a href="">两项便利港澳台居民新举措实施帮助两项便利港澳台居民新举措实施帮助</a> -->
                                <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
                                    :target="item.islink == 1 ? '_blank' : '_self'">
                                    {{ item.title }}
                                </NuxtLink>
                            </li>
                        </ul>
                    </div>
                    <div class="index_box_6 clearfix">
                        <div class="index_ul_7 clearfix">
                            <NuxtLink class="index_ul_7_a dot1" :href="getLinkPathDetail(item)" :title="item.title"
                                :target="item.islink == 1 ? '_blank' : '_self'" v-for="item in boxData10data4">
                                {{ item.title }}
                            </NuxtLink>
                        </div>
                        <ul class="index_7_btntext">
                            <li class="index_7_textList dot1" v-for="(item, index) in boxData10data5" :key="index">
                                <em></em>
                                <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
                                    :target="item.islink == 1 ? '_blank' : '_self'">
                                    {{ item.title }}
                                </NuxtLink>
                            </li>
                        </ul>
                    </div>
                    <!--end  综合资讯-->
                </div>
                <div class="index_box_4 clearfix">
                    <div class="index_head_btn_box">
                        <div class="index_head_btn index_head_btn_only" v-if="pageData[10]">
                            <NuxtLink class="index_head_a" :href="getLinkPath(pageData[10])"
                                :title="pageData[10].alias">
                                {{ pageData[10].alias }}
                            </NuxtLink>
                        </div>
                    </div>
                    <!--open  消费指南 -->
                    <div class="index_2_box_1 clearfix">
                        <div class="index_img_ul_7">
                            <div class="index_img_ul_7_li" v-for="item in boxData11">
                                <NuxtLink class="index_img_ul_7_li_a" :href="getLinkPathDetail(item)"
                                    :title="item.title" :target="item.islink == 1 ? '_blank' : '_self'">
                                    <img class="index_img_ul_7_li_img" :src="item.imgurl" title="item.title"
                                        alt="item.title">
                                    <div class="index_img_ul_7_li_dot1 dot1">
                                        {{ item.title }}
                                    </div>
                                </NuxtLink>
                            </div>
                        </div>
                    </div>
                    <div class="index_2_box_2 clearfix">
                        <div class="index_ul_8_li_box" v-for="item in boxData11data2">
                            <div class="index_ul_8_li">
                                <NuxtLink class="index_ul_8_a dot2" :href="getLinkPathDetail(item)" :title="item.title"
                                    :target="item.islink == 1 ? '_blank' : '_self'">
                                    {{ item.title }}
                                </NuxtLink>
                            </div>

                        </div>
                    </div>
                    <!--end 消费指南 -->
                </div>
                <div class="lastAd" v-if="adImg3">
                    <a href="http://nzgxw.org.cn/" v-if="adImg3.image_url == null" target="_blank"
                        :title="adImg3.introduce">
                        <img :src="adImg3.thumb" :title="adImg3.introduce" :id="adImg3.ad_tag" data-tag="adImg3.ad_tag">
                    </a>
                    <a :href="adImg3.image_url" :title="adImg3.introduce" v-else>
                        <img :src="adImg3.image_src" :alt="adImg3.introduce" :id="adImg3.ad_tag"
                            data-tag="adImg3.ad_tag">
                    </a>
                </div>
            </section>
        </main>
        <HomeFoot></HomeFoot>
    </div>
</template>

<script setup>
//0.加载页面必备组件 start---------------------------------------->
import { ref, onMounted } from 'vue';
import { ElMessage } from 'element-plus';
import { getToken } from '@/store/useCookieStore'
//获得全局url
const { $BwebUrl, $CwebUrl } = useNuxtApp();
//0.加载页面必备组件 end---------------------------------------->

//1.获取头条新闻 start---------------------------------------->
//1.1 头条
const headline = ref({})
const headlineData2 = ref([])
async function getModelData1() {
    const mkdata = await requestDataPromise('/web/getWebsiteArticlett', {
        method: 'GET',
        query: {
            'imgnum': 0,
            'textnum': 4,
            'level': 1,
            'placeid': 0,
            'id': '',
        },
    });
    if (mkdata.code == 200) {
        // console.log("设置大标题", mkdata.data);

        //填充大标题
        for (let index in mkdata.data.text) {
            if (index < 1) {
                headline.value = mkdata.data.text[index]
            } else {
                headlineData2.value.push(mkdata.data.text[index])
            }
        }
    } else {
        console.log("设置大标题错误", mkdata.message)
    }
}
getModelData1()

// 1.2 跳转
let goAddShop = () => {
    if (getToken()) {
        window.open($BwebUrl + '/#/addGood', '_blank');
    } else {
        ElMessage.error('请先登录!')
    }
}

//1.3 今日热点
const hotNewsList = ref("")
async function getModelData3() {
    const mkdata = await requestDataPromise('/web/getWebsiteArticlett', {
        method: 'GET',
        query: {
            'imgnum': 0,
            'textnum': 10,
            'level': 6,
            'placeid': 0,
            'id': '',
        },
    });
    if (mkdata.code == 200) {
        console.log("设置大标题", mkdata.data);

        hotNewsList.value = mkdata.data.text;
    } else {
        console.log("获取首页今日热点错误", mkdata.message)
    }
}
getModelData3()

// 1.4 获取商城导航菜单
const navigation = ref([]);
async function getNavigation() {
    const mkdata = await requestDataPromise('/web/getWebsiteModelCategory', {
        method: 'GET',
        query: {
            'pid': 0,
            'num': 12,
            'placeid': 13,
            'type': 1,
        },
    });
    console.log("获取商城导航菜单", mkdata.data);

    navigation.value = mkdata.data;
}
getNavigation();
//1.获取头条新闻 end---------------------------------------->

//2.选项卡 start---------------------------------------->
const hoverStatus = ref(1)
const qhPic = function (num) {
    hoverStatus.value = num;
}

const hoverStatusTwo = ref(1)
const qhPicTwo = function (num) {
    hoverStatusTwo.value = num;
}

const hoverStatusThree = ref(1)
const qhPicThree = function (num) {
    hoverStatusThree.value = num;
}

//图片切换
const showImg = ref(1)
const changeImg = function (num) {
    showImg.value = num;
}
//2.选项卡 end---------------------------------------->

//3.广告 start---------------------------------------->
//获得所有广告
let adImg1 = ref({})
let adImg2 = ref({})
let adImg3 = ref({})
let adImg4 = ref({})

onMounted(async () => {
    //从客户端获取行政职能部门 加快打开速度//从客户端获取行政职能部门 加快打开速度
    const { $webUrl, $CwebUrl } = useNuxtApp();

    //从客户端启动广告
    //广告1
    let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nfcpgxw_index_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=nfcpgxw_index_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];

    //广告3
    let url3 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nfcpgxw_index_0003`
    const responseAd3 = await fetch(url3, {
        headers: {
            'Content-Type': 'application/json',
            'Userurl': $CwebUrl,
            'Origin': $CwebUrl
        }
    });
    const resultAd3 = await responseAd3.json();
    adImg3.value = resultAd3.data[0];

    //广告4
    let url4 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nfcpgxw_index_0004`
    const responseAd4 = await fetch(url4, {
        headers: {
            'Content-Type': 'application/json',
            'Userurl': $CwebUrl,
            'Origin': $CwebUrl
        }
    });
    const resultAd4 = await responseAd4.json();
    adImg4.value = resultAd4.data[0];

})
//3.广告 end---------------------------------------->

//4.页面数据 start---------------------------------------->
//4.1导航
const pageData = ref([
    //示例 { cid: "", title: "", data: [] ,children_count:""},
]);
//4.2 模块数据
//模块1
const boxData1 = ref([])
const boxData1data2 = ref([])
const boxData1data3 = ref([])
const boxData1data4 = ref([])
//模块2
const boxData2 = ref([])
const boxData2data2 = ref([])
const boxData2data3 = ref([])
const boxData2data4 = ref([])
//模块3 
const boxData3 = ref([])
const boxData3data2 = ref([])
const boxData3data3 = ref([])
const boxData3data4 = ref([])
//模块4
const boxData4 = ref([]);
const boxData4data2 = ref([]);
//模块5
const boxData5 = ref([]);
const boxData5data2 = ref([]);
//模块6
const boxData6 = ref([]);
const boxData6data2 = ref([]);
const boxData6data3 = ref([]);
//模块7
const boxData7 = ref([]);
const boxData7data2 = ref([]);
const boxData7data3 = ref([]);
//模块8
const boxData8 = ref([]);
const boxData8data2 = ref([]);
const boxData8data3 = ref([]);
//模块9
const boxData9 = ref([]);
const boxData9data2 = ref([]);
//模块10 
const boxData10 = ref([]);
const boxData10data1 = ref([]);
const boxData10data2 = ref([]);
const boxData10data4 = ref([]);
const boxData10data5 = ref([]);

//模块11
const boxData11 = ref([]);
const boxData11data2 = ref([]);

//获得全局配置的导航数据
const { $pageNav } = useNuxtApp();
//4.3获得导航数据
try {
    const navigateData = await requestDataPromise('/web/getWebsiteModelCategory', {
        method: 'GET',
        query: {
            'placeid': 1,
            'pid': 0,
            'num': 50
        },
    });
    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,
                aLIas_pinyin: navigateData.data[index].aLIas_pinyin,
                chilid_id: navigateData.data[index].chilid_id
            };
            //渲染标题
            //1 农产供求527
            if (navigateData.data[index].category_id == $pageNav[0]) { pageData.value[0] = data }
            //2 致富项目552
            if (navigateData.data[index].category_id == $pageNav[1]) { pageData.value[1] = data }
            //3 招商招标529
            if (navigateData.data[index].category_id == $pageNav[2]) { pageData.value[2] = data }
            //4 动态资讯502
            if (navigateData.data[index].category_id == $pageNav[3]) { pageData.value[3] = data }
            //5 农户农企510
            if (navigateData.data[index].category_id == $pageNav[4]) { pageData.value[4] = data }
            //6 策划服务535
            if (navigateData.data[index].category_id == $pageNav[5]) { pageData.value[5] = data }
            //7 专家服务533
            if (navigateData.data[index].category_id == $pageNav[6]) { pageData.value[6] = data }
            //8 行业报告536
            if (navigateData.data[index].category_id == $pageNav[7]) { pageData.value[7] = data }
            //9 农产知识504
            if (navigateData.data[index].category_id == $pageNav[8]) { pageData.value[8] = data }
            //10 综合资讯 三农专题500
            if (navigateData.data[index].category_id == $pageNav[9]) { pageData.value[9] = data }
            //11 消费指南503
            if (navigateData.data[index].category_id == $pageNav[10]) { pageData.value[10] = data }
            //12
            // if (navigateData.data[index].category_id == 15) { pageData.value[11] = data }
        }
    } else {
        console.log("获取导航池出错！", navigateData.message)
    }
} catch (error) {
    console.log("错误：导航池渲染执行接口出错！请检查首页的14的模块的具体执行方法！")
}

let getJson = [
    { "parent": $pageNav[0] + ",2,12", "child": "" },//模块1农产供求527
    { "parent": $pageNav[1] + ",2,12", "child": "" },//模块2致富项目552
    { "parent": $pageNav[2] + ",2,12", "child": "" },//模块3招商招标529
    { "parent": $pageNav[3] + ",1,2", "child": "" },//模块4动态资讯502
    { "parent": $pageNav[4] + ",1,2", "child": "" },//模块5农户农企510
    { "parent": $pageNav[5] + ",3,9", "child": "" },//模块6策划服务535
    { "parent": $pageNav[6] + ",2,6", "child": "" },//模块7专家服务533
    { "parent": $pageNav[7] + ",3,9", "child": "" },//模块8行业报告536
    { "parent": $pageNav[8] + ",1,2", "child": "" },//模块9农产知识504
    { "parent": $pageNav[9] + ",3,25", "child": "" },//模块10综合资讯 三农专题500
    { "parent": $pageNav[10] + ",3,6", "child": "" },//模块11消费指南503
]

let jsonString = JSON.stringify(getJson);

async function getPageAllData() {
    const mkdata = await requestDataPromise('/web/getWebsiteAllArticle', {
        method: 'GET',
        query: {
            'id': jsonString
        },
    });
    if (mkdata.code == 200) {
        //模块1
        for (let index in mkdata.data[0].imgnum) {
            if (index < 1) {
                boxData1.value.push(mkdata.data[0].imgnum[index])
            } else {
                boxData1data2.value.push(mkdata.data[0].imgnum[index])
            }
        }
        // for (let index in mkdata.data[0].textnum) {
        //     if (index < 6) {
        //         boxData1data3.value.push(mkdata.data[0].textnum[index])
        //     } else {
        //         boxData1data4.value.push(mkdata.data[0].textnum[index])
        //     }
        // }
        //模块2
        for (let index in mkdata.data[1].imgnum) {
            if (index < 1) {
                boxData2.value.push(mkdata.data[1].imgnum[index])
            } else {
                boxData2data2.value.push(mkdata.data[1].imgnum[index])
            }
        }
        // for (let index in mkdata.data[1].textnum) {
        //     if (index < 6) {
        //         boxData2data3.value.push(mkdata.data[1].textnum[index])
        //     } else {
        //         boxData2data4.value.push(mkdata.data[1].textnum[index])
        //     }
        // }
        //模块3
        for (let index in mkdata.data[2].imgnum) {
            if (index < 1) {
                boxData3.value.push(mkdata.data[2].imgnum[index])
            } else {
                boxData3data2.value.push(mkdata.data[2].imgnum[index])
            }
        }
        // for (let index in mkdata.data[2].textnum) {
        //     if (index < 6) {
        //         boxData3data3.value.push(mkdata.data[2].textnum[index])
        //     } else {
        //         boxData3data4.value.push(mkdata.data[2].textnum[index])
        //     }
        // }
        //模块4
        boxData4.value = mkdata.data[3].imgnum;
        boxData4data2.value = mkdata.data[3].textnum;
        //模块5
        boxData5.value = mkdata.data[4].imgnum;
        boxData5data2.value = mkdata.data[4].textnum;
        //模块6
        for (let index in mkdata.data[5].imgnum) {
            if (index < 1) {
                boxData6.value.push(mkdata.data[5].imgnum[index])
            } else {
                boxData6data2.value.push(mkdata.data[5].imgnum[index])
            }
        }
        boxData6data3.value = mkdata.data[5].textnum;
        //模块7
        boxData7.value = mkdata.data[6].imgnum;
        for (let index in mkdata.data[6].textnum) {
            if (index <= 2) {
                boxData7data2.value.push(mkdata.data[6].textnum[index])
            } else {
                boxData7data3.value.push(mkdata.data[6].textnum[index])
            }
        }
        //模块8
        for (let index in mkdata.data[7].imgnum) {
            if (index < 1) {
                boxData8.value.push(mkdata.data[7].imgnum[index])
            } else {
                boxData8data2.value.push(mkdata.data[7].imgnum[index])
            }
        }
        boxData8data3.value = mkdata.data[7].textnum;
        //模块9
        boxData9.value = mkdata.data[8].imgnum;
        boxData9data2.value = mkdata.data[8].textnum;
        //模块10
        for (let index in mkdata.data[9].imgnum) {
            if (index < 1) {
                boxData10.value.push(mkdata.data[9].imgnum[index])
            } else {
                boxData10data1.value.push(mkdata.data[9].imgnum[index])
            }
        }
        for (let index in mkdata.data[9].textnum) {
            if (index < 8) {
                boxData10data2.value.push(mkdata.data[9].textnum[index])
            } else if (index < 17) {
                boxData10data4.value.push(mkdata.data[9].textnum[index])
            } else {
                boxData10data5.value.push(mkdata.data[9].textnum[index])
            }
        }
        //模块11
        boxData11.value = mkdata.data[10].imgnum;
        boxData11data2.value = mkdata.data[10].textnum;
    } else {
        ElMessage.error(mkdata.message)
    }
}
getPageAllData();

//特殊资讯
let getJson1 = [
    { "parent": $pageNav[0] + ",0,12", "child": "" },//模块1农产供求527
    { "parent": $pageNav[1] + ",0,12", "child": "" },//模块2致富项目552
    { "parent": $pageNav[2] + ",0,12", "child": "" },//模块3招商招标529
]

let jsonString1 = JSON.stringify(getJson1);
async function getPageAllData1() {
    const mkdata = await requestDataPromise('/web/getWebsiteArticles', {
        method: 'GET',
        query: {
            'id': jsonString1
        },
    });
    if (mkdata.code == 200) {
        //模块1
        for (let index in mkdata.data[0].textnum) {
            if (index < 6) {
                boxData1data3.value.push(mkdata.data[0].textnum[index])
            } else {
                boxData1data4.value.push(mkdata.data[0].textnum[index])
            }
        }
        //模块2
        for (let index in mkdata.data[1].textnum) {
            if (index < 6) {
                boxData2data3.value.push(mkdata.data[1].textnum[index])
            } else {
                boxData2data4.value.push(mkdata.data[1].textnum[index])
            }
        }
        //模块3
        for (let index in mkdata.data[2].textnum) {
            if (index < 6) {
                boxData3data3.value.push(mkdata.data[2].textnum[index])
            } else {
                boxData3data4.value.push(mkdata.data[2].textnum[index])
            }
        }
    } else {
        ElMessage.error(mkdata.message)
    }
}
getPageAllData1();
//4.页面数据 end---------------------------------------->

//5.设置seo数据 start---------------------------------------->
//获取seo数据
const setData = await requestDataPromise('/web/getWebsiteFootInfo', {
    method: 'GET',
    query: {},
});
if (setData.code == 200) {
    let seoTitle = setData.data.website_head.title;
    let seoDescription = setData.data.website_head.description;
    let seoKeywords = setData.data.website_head.keywords;
    let seoSuffix = setData.data.website_head.suffix;
    let seoName = setData.data.website_head.website_name;

    useSeoMeta({
        title: seoTitle + "_" + seoSuffix,
        meta: [
            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
        ]
    });
} else {
    console.log("设置首页SEO出错！", setData.message)
}
//5.设置seo数据 start---------------------------------------->
</script>

<style lang="less" scoped>
@import url('@/assets/css/index.less');
</style>