<template>
    <div>
        <HomePageHead></HomePageHead>
        <HomePageNavigation></HomePageNavigation>
        <HomeSecondaryHeadingZgzp :titleData="pageDataList" :pinyinid="routeId"></HomeSecondaryHeadingZgzp>
 
        <main class="index_main">
            <!-- 三农资讯网-招工招聘 snzx_recruit-->
            <section class="index_2">
                <!-- 职位搜索 -->
                <div class="recruit_head_box clearfix phone_none">
                    <div class="cruit_head_left">
                        <a class="cruit_head_a cruit_head_only" href="" title="">职位搜索</a>
                    </div>
                    <div class="cruit_head_right clearfix">
                        <span class="cruit_head_right_a" @click="createResume" v-if="type_id == 1">创建个人简历</span>
                        <!-- <span class="cruit_head_right_a" @click="createJob" v-if="type_id == 3">发布招聘信息</span> -->
                    </div>
                </div>
                <!-- <div class="cruit_ul_1 clearfix">
                    <NuxtLink class="cruit_ul_1_a" :class="{ cruit_ul_1_a_only: cruit_ul_1_a_only_num == index }"
                        :href="{ path: '/zhaogongzhaopinnongmingong/search', query: { provinceid: `${item.id}` } }"
                        title="" v-for="(item, index) in provinceList" :key="item.id">
                        {{ item.name }}
                    </NuxtLink>
                </div> -->
                <form class="phone_form clearfix pc_none" action=" " method=" ">


                    <div class="phone_form_tip phone_form_tip_1 clearfix">
                        
                        <el-select v-model="industry_category" placeholder="行业类别" style="width:32%" clearable
                                    @change="hyChange">
                                    <el-option v-for="item in industry_categoryList" :key="item.hyid"
                                        :label="item.hyname" :value="item.hyid" />
                        </el-select>

                        <el-select v-model="position_category" placeholder="职位类别" style="width:32%" clearable
                                    @change="zwChange">
                                    <el-option v-for="item in position_categoryList" :key="item.zwid"
                                        :label="item.zwname" :value="item.zwid" />
                        </el-select>
                        <el-select v-model="position" placeholder="具体职位" style="width:32%" clearable
                                    no-data-text="请先选择职位类别" @change="jtzwChange">
                                    <el-option v-for="item in positionList" :key="item.zwid" :label="item.zwname"
                                        :value="item.zwid" />
                        </el-select>
 
                    </div>

                    <div class="phone_form_tip phone_form_tip_2 clearfix">
                       
                        <el-select v-model="province" placeholder="省" style="width:15%" clearable
                                    @change="provinceChange">
                                    <el-option v-for="item in provinceList" :key="item.id" :label="item.name"
                                        :value="item.id" />
                        </el-select>

                        <el-select v-model="city" placeholder="市" style="width:15%" no-data-text="选省"
                            clearable @change="cityChange">
                            <el-option v-for="item in cityList" :key="item.id" :label="item.name"
                                :value="item.id" />
                        </el-select>
                        
                        <el-input v-model="keywords" 
                            style="width: 51%" 
                            placeholder="请输入搜索关键词" clearable>
                        </el-input>

                        <el-button type="" style="width: 13%"  @click="goSearch">搜索</el-button>
                    </div>

                    <div class="phone_form_tip clearfix">
                    </div>

                </form> 

                <form class="cruit_form clearfix phone_none" action=" " method=" ">
                    <div class="cruit_form_tip clearfix">
                        <div class="cruit_form_per">
                            <label class="cruit_form_label">行业类别：</label>
                            <div class="cruit_form_label_right clearfix">
                                <el-select v-model="industry_category" placeholder="请选择" style="width: 140px" clearable
                                    @change="hyChange">
                                    <el-option v-for="item in industry_categoryList" :key="item.hyid"
                                        :label="item.hyname" :value="item.hyid" />
                                </el-select>
                            </div>
                        </div>
                        <div class="cruit_form_per">
                            <label class="cruit_form_label">职位类别：</label>
                            <div class="cruit_form_label_right clearfix">
                                <el-select v-model="position_category" placeholder="请选择" style="width: 140px" clearable
                                    @change="zwChange">
                                    <el-option v-for="item in position_categoryList" :key="item.zwid"
                                        :label="item.zwname" :value="item.zwid" />
                                </el-select>
                            </div>
                        </div>
                        <div class="cruit_form_per">
                            <label class="cruit_form_label">具体职位：</label>
                            <div class="cruit_form_label_right clearfix">
                                <el-select v-model="position" placeholder="请选择" style="width: 140px" clearable
                                    no-data-text="请先选择职位类别" @change="jtzwChange">
                                    <el-option v-for="item in positionList" :key="item.zwid" :label="item.zwname"
                                        :value="item.zwid" />
                                </el-select>
                            </div>
                        </div>
                    </div>
                    <div class="cruit_form_tip clearfix">
                        <div class="cruit_form_per">
                            <label class="cruit_form_label">地区选择：</label>
                            <div class="cruit_form_label_right clearfix">
                                <el-select v-model="province" placeholder="请选择省" style="width: 140px" clearable
                                    @change="provinceChange">
                                    <el-option v-for="item in provinceList" :key="item.id" :label="item.name"
                                        :value="item.id" />
                                </el-select>
                                <el-select v-model="city" placeholder="请选择市" style="width: 140px" no-data-text="请先选择省"
                                    clearable @change="cityChange">
                                    <el-option v-for="item in cityList" :key="item.id" :label="item.name"
                                        :value="item.id" />
                                </el-select>
                            </div>
                        </div>
                    </div>
                    <div class="cruit_form_tip clearfix">
                        <div class="cruit_form_per">
                            <label class="cruit_form_label">关键词：</label>
                            <div class="cruit_form_label_right clearfix">
                                <span>
                                    <el-input v-model="keywords" style="width: 300px" placeholder="请输入搜索关键词"
                                        clearable></el-input>
                                </span>
                                <span>
                                    <el-button type="success" @click="goSearch">搜索</el-button>
                                </span>
                            </div>
                        </div>
                    </div>
                </form>
                
                <div class="phone_box_1 pc_none">
                    <div class="phone_box_1_head">
                           <a title="">职位搜索</a>
                    </div>
                </div>
                <!-- 职位搜索 -->
            </section>
        </main>
        <main class="color_main">
            <main class="index_main">
                <!-- 招聘职位 -->
                <section class="index_3 clearfix">
                    <div class="recruit_head_box clearfix phone_none">
                        <div class="cruit_head_left">
                            <a class="cruit_head_a cruit_head_only" href="" title="">招聘职位</a>
                        </div>
                    </div>
                    <div class="cruit_ul_2 clearfix" v-if="job_vacancy">
                        <div class="cruit_li_2 clearfix" v-for="(item, index) in job_vacancy" :key="item.id">
                            <NuxtLink class="cruit_li_2_a" :href="`/${item.pinyin}/${item.id}.html`" title="">
                                <div class="cruit_li_2_head_box clearfix">
                                    <div class="cruit_li_2_head clearfix dot1">{{ item.title }}</div>
                                    <div class="cruit_li_2_head_name clearfix dot1">{{ item.business_name }}</div>
                                </div>
                                <div class="cruit_li_2_foot_title_box clearfix">
                                    <span class="cruit_li_2_foot_title">{{ item.jtzw_name }}</span>
                                </div>
                                <div class="cruit_li_2_foot clearfix">
                                    <span class="cruit_li_2_foot_tag cruit_li_2_foot_addres">{{ item.city_name }}</span>
                                    <span class="cruit_li_2_foot_tag cruit_li_2_foot_exper"
                                        v-if="item.experience_name || item.education_name">
                                        <span class="cruit_li_2_foot_tag_in">{{ item.experience_name }}</span>
                                        <span class="cruit_li_2_foot_tag_in">{{ item.education_name }}</span>
                                    </span>
                                    <span class="cruit_li_2_foot_tag cruit_li_2_foot_time">
                                        {{ getTime(item.due_data, 'year', 1) }}
                                    </span>
                                </div>
                            </NuxtLink>
                        </div>
                    </div>
                    <div class="empty" v-if="job_vacancy == false">
                        <img src="@/public/topic/empty.png" alt="" class="empty_img">
                        <span class="empty_text">当前暂无数据</span>
                    </div>

                    <div class="pagination pagination_phone_none" v-if="zptotal">
                        <el-pagination size="small" background layout="prev, pager, next" :total="zptotal" class="mt-4"
                            prev-text="上一页" next-text="下一页" @change="changePage" />
                    </div>

                    <div class="pagination pagination_pc_none" v-if="zptotal">
                        <el-pagination 
                            pager-count="5"
                            size="small" 
                            background 
                            layout="pager" 
                            :default-page-size="pageSize"  
                            :total="zptotal"
                            class="mt-4"
                            @current-change="changePage" 
                        />
                    </div>

                </section>

                <!-- <section class="index_4 clearfix">
                    <div class="recruit_head_box clearfix">
                        <div class="cruit_head_left">
                            <a class="cruit_head_a cruit_head_only" href="" title="">人才服务</a>
                        </div>
                    </div>
                    <div class="cruit_ul_3 clearfix" v-if="job_resume">
                        <div class="cruit_li_3 clearfix" v-for="(item, index) in job_resume" :key="item.id">
                            <NuxtLink class="cruit_li_3_a" :href="`/${item.pinyin}/${item.id}.html`" title="">
                                <div class="cruit_li_3_head_box clearfix">
                                    <div class="cruit_li_3_head clearfix dot1">{{ item.name }}</div>
                                    <div class="cruit_li_3_head_name clearfix dot1">{{ item.jtzw_name }}</div>
                                </div>
                                <div class="cruit_li_3_text_box clearfix">
                                    <div class="cruit_li_3_text">
                                        {{ item.sexy == 1 ? '男' : '女' }}
                                        <em class="point">·</em>
                                    </div>
                                    <div class="cruit_li_3_text" v-if="item.experience">
                                        {{ item.experience }} 年
                                        <em class="point">·</em>
                                    </div>

                                    <div class="cruit_li_3_text">
                                        {{ item.origin }}
                                        <em class="point">·</em>
                                    </div>

                                    <div class="cruit_li_3_text">{{ item.hy_name }}</div>
                                </div>
                                <div class="cruit_li_3_tag_box clearfix">
                                    <span class="cruit_li_3_tag">{{ item.city_name }}</span>
                                    <span class="cruit_li_3_tag">
                                        {{ getTime(item.updated_at, 'year', 1) }}
                                    </span>
                                </div>
                            </NuxtLink>
                        </div>
                    </div>
                    <div class="empty" v-if="job_resume == false">
                        <img src="@/public/topic/empty.png" alt="" class="empty_img">
                        <span class="empty_text">当前暂无数据</span>
                    </div>
                </section> -->
            </main>
        </main>
        <HomeAdvertising :imgurl="adImg1" v-if="adImg1"></HomeAdvertising>
        <HomeFoot1></HomeFoot1>
    </div>
</template>

<script setup>
//0.加载页面依赖 start ---------------------------------------->
import { ref, onMounted } from 'vue';
import { ElMessage, ElSelect, ElOption, ElInput, ElButton, ElPagination } from 'element-plus';
const { $webUrl, $CwebUrl, $BwebUrl } = useNuxtApp()

const nuxtApp = useNuxtApp();
const axios = nuxtApp.$axios;

//获取用户信息
let type_id = ref('')
let website_id = ref('')
let getUserInfo = () => {
    axios.get("/user/getUserInfo").then(response => {
        console.log("gettypeid", response.data);
        type_id.value = response.data.type_id
        website_id.value = response.data.website_id
    })
}
onMounted(() => {
    getUserInfo()
})
//0.加载页面依赖 end ---------------------------------------->

//1.获得路由id start ---------------------------------------->
const route = useRoute();

//获得当前的完整路径
const fullPath = route.path;
//拆分，取出来中间这一段，然后提取数字部分
const segments = fullPath.split('/');
const targetSegment = segments[1];
//let routeId = 11 //排除路径错误可以打开这个
//const numberPart = targetSegment.match(/\d+$/)?.[0]; 
//let routeId = numberPart;
let routeId;
//通过导航路径反向查询导航id
const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
    method: 'GET',
    query: {
        'pinyin': targetSegment,
    },
});
if (getRouteId.code == 200) {
    routeId = getRouteId.data.category_id
} else {
    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
    console.log("错误位置：通过url路径查询导航池id")
    console.log("后端错误反馈：", getRouteId.message)
    console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
}
//1.获得路由id end ---------------------------------------->

//2.页面交互效果 start ---------------------------------------->
//分页
const page = ref(1) //页码
const pageSize = ref(20) //每页显示条数
const zptotal = ref(0) //总条数
//分页事件
let changePage = (value) => {
    console.log("当前页码", value);
    // navigateTo(`/${targetSegment}/${value}.html`)
}
// 2.1 下拉列表
// 2.1.1 获取省份
const province = ref('')  //省
const provinceid = ref('')  //省
const city = ref('')  //市
const provinceList = ref([])  //省列表
const cityList = ref([])  //市列表
const getArea = await requestDataPromise('/web/selectWebsiteArea', {
    method: 'GET',
    query: {},
});
if (getArea.code == 200) {
    provinceList.value = getArea.data;
}
// 2.1.2 获取市
const provinceChange = async (val) => {
    console.log('获取到的省份id', val);
    provinceid.value = val;
    city.value = '';
    getCity(val)
}
const getCity = async (val) => {
    const getCity = await requestDataPromise('/web/selectWebsiteArea', {
        method: 'GET',
        query: {
            'pid': val,
        },
    });
    if (getCity.code == 200) {
        cityList.value = getCity.data;
    }
}

// 2.2.1 行业和职位
const industry_category = ref('')  //行业类别
const position_category = ref('')  //职位类别
const position = ref('')  //具体职位
const keywords = ref('')  //关键词
const industry_categoryList = ref([])  //行业类别列表
const position_categoryList = ref([])  //职位类别列表
const positionList = ref([])  //具体职位列表

const getData = async () => {
    const getData = await requestDataPromise('/web/getWebsiteJobSelect', {
        method: 'GET',
        query: {},
    });
    if (getData.code == 200) {
        // console.log("获取到的分类数据：", getData.data);
        industry_categoryList.value = getData.data.hy; //行业
        position_categoryList.value = getData.data.zw; //职位
        // positionList.value = getData.data.jtzw; //具体职位
    }
}
getData()
//2.2.2 获取岗位和简历
const job_vacancy = ref('') // 招聘岗位
const job_resume = ref('') // 简历
const getJob = async () => {
    const getJob = await requestDataPromise('/web/getWebsiteJobList', {
        method: 'GET',
        query: {
            'page': page.value,
            'pageSize': pageSize.value
        },
    });
    if (getJob.code == 200) {
        console.log("获取到的岗位和简历：", getJob.data);
        job_vacancy.value = getJob.data.JobRecruiting; // 招聘岗位
        job_resume.value = getJob.data.JobHunting; // 简历
        zptotal.value = getJob.data.recruit_count;
        // qztotal.value = getJob.data.hunt_count;
    }
}
getJob()

// 2.3 change事件
const hyid = ref('')  //行业
const zwid = ref('')  //职位
const jtzwid = ref('')  //具体职位
const cityid = ref('')  //具体城市
const hyChange = async (val) => {
    hyid.value = val;
}
const zwChange = async (val) => {
    console.log('111', val);

    zwid.value = val;
    position.value = '';
    const getPosition = await requestDataPromise('/web/getPositionList', {
        method: 'GET',
        query: {
            'zwpid': val,
        },
    })
    console.log("11112222", getPosition);

    if (getPosition.code == 200) {
        positionList.value = getPosition.data; //具体职位 
    } else {
        positionList.value = []; //具体职位
    }
}
const jtzwChange = async (val) => {
    jtzwid.value = val;
}
const cityChange = async (val) => {
    cityid.value = val;
}

//2.3 搜索
const router = useRouter();
const goSearch = () => {
    router.push({
        path: '/zhaogongzhaopin/search',
        query: {
            'hyid': hyid.value,
            'zwid': zwid.value,
            'jtzwid': jtzwid.value,
            'provinceid': provinceid.value,
            'cityid': cityid.value,
            'keywords': keywords.value,
        }
    })
}
// 创建个人简历
let createResume = () => {
    window.open($BwebUrl + '/#/addJobHunting', '_blank');
}
// 发布招聘信息
let createJob = () => {
    window.open($BwebUrl + '/#/creatJob', '_blank');
}


//2.4 展示广告
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=nmgw_category_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=nmgw_category_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=nmgw_category_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=nmgw_category_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];

})
//2.页面交互效果 end ---------------------------------------->

//3.渲染页面数据 start ---------------------------------------->
//3.1 该页面上所有的导航池 转为动态数据
//3.1 该页面上所有的导航池 转为动态数据
const pageCategory = ref([]);
//3.2 该页面上需要渲染的所有数据
const pageData = ref([])
const pageDataList = ref([])
//3.3 获取所有导航
try {
    const navigateData = await requestDataPromise('/web/getWebsiteModelCategory', {
        method: 'GET',
        query: {
            'placeid': 1,
            'pid': routeId,
            'num': 8
        },
    });
    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: targetSegment + "/" + navigateData.data[index].aLIas_pinyin,
                data: [],
                data1: [],
                data2: [],
                data3: [],
                data4: [],
                category_id1: "",
                category_id2: "",
                category_id3: "",
                category_id4: "",
                title1: "",
                title2: "",
                title3: "",
                title4: ""
            };
            console.log("导航池数据：", navigateData.data[index]);

            if (navigateData.data[index].type == 1) {
                //每个页面最多8个模块
                pageData.value.push(data);
            }

            if (navigateData.data[index].is_url == 1) {
                // 处理 URL 的逻辑
            } else {
                //每个页面最多8个模块
                pageDataList.value.push(data);
            }
        }
        console.log("导航池数据11：", pageDataList.value);
        //导航池加载完毕，开始申请模块数据
        // await getPageData1();
        // await getPageData2();
        // await getPageData3();
        // await getPageData4();
        // await getPageData5();
        // await getPageData6();
        // await getPageData7();
        // await getPageData8();
        let getJson = [
            { "parent": routeId + ",0,0", "child": pageDataList.value[0].cid + ",1,1" },//模块1理论前沿
            { "parent": routeId + ",0,0", "child": pageDataList.value[1].cid + ",5,0" },//模块2典型经验
            { "parent": routeId + ",0,0", "child": pageDataList.value[2].cid + ",1,6" },//模块3农业天地
            { "parent": routeId + ",0,0", "child": pageDataList.value[3].cid + ",1,6" },//模块4美丽乡村
            { "parent": routeId + ",0,0", "child": pageDataList.value[4].cid + ",1,6" },//模块5农民之家
            { "parent": routeId + ",0,0", "child": pageDataList.value[5].cid + ",6,3" },//模块6农业天地
        ]

        let jsonString = JSON.stringify(getJson);
        // getPageAllData(jsonString);

    } 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 ---------->")
}
//获取资讯
async function getPageAllData(jsonString) {
    const mkdata = await requestDataPromise('/web/getWebsiteAllArticle', {
        method: 'GET',
        query: {
            'id': jsonString
        },
    });
    console.log('mkdata', mkdata);

    if (mkdata.code == 200) {
        console.log(778899)
        console.log(mkdata.data)
        //模块1理论前沿
        if (mkdata.data[0].child.imgnum.length > 0) {
            pageData.value[0].data.push(mkdata.data[0].child.imgnum[0]);
        }
        if (mkdata.data[0].child.imgnum.length > 1) {
            pageData.value[0].data2.push(mkdata.data[0].child.imgnum[1]);
        }
        if (mkdata.data[0].child.imgnum.length > 2) {
            pageData.value[0].data2.push(mkdata.data[0].child.imgnum[2]);
        }
        if (mkdata.data[0].child.imgnum.length > 3) {
            pageData.value[0].data2.push(mkdata.data[0].child.imgnum[3]);
        }
        if (mkdata.data[0].child.imgnum.length > 4) {
            pageData.value[0].data2.push(mkdata.data[0].child.imgnum[4]);
        }
        pageData.value[0].data3 = mkdata.data[0].child.textnum;
        //模块2典型经验
        pageData.value[1].data = mkdata.data[1].child.imgnum;
        //模块3农业天地
        pageData.value[2].data = mkdata.data[2].child.imgnum;
        pageData.value[2].data2 = mkdata.data[2].child.textnum;
        //模块4美丽乡村
        pageData.value[3].data = mkdata.data[3].child.imgnum;
        pageData.value[3].data2 = mkdata.data[3].child.textnum;
        //模块5农民之家
        pageData.value[4].data = mkdata.data[4].child.imgnum;
        pageData.value[4].data2 = mkdata.data[4].child.textnum;
        //模块6农业天地 注意，三农资讯网跟其他行星站不一样，你不需要复制我这个
        //因为本来二级分类页有9个模块，但是实际应用中只有8个，所以我把本来是模块7
        //的地方和现有的模块6合并成1个了
        if (mkdata.data[5].child.imgnum.length > 0) {
            pageData.value[5].data.push(mkdata.data[5].child.imgnum[0]);
        }
        pageData.value[5].data2 = mkdata.data[5].child.textnum;
        //把模块6的内容放到模块7中一部分
        for (let i = 1; i < mkdata.data[5].child.imgnum.length && i <= 5; i++) {
            pageData.value[7].data.push(mkdata.data[5].child.imgnum[i]);
        }
        //模块7农村建设
        pageData.value[6].data = mkdata.data[6].child.imgnum;
        pageData.value[6].data2 = mkdata.data[6].child.textnum;
        //模块8高端资讯
        pageData.value[7].data2 = mkdata.data[7].child.imgnum;

    } else {
        ElMessage.error(mkdata.message)
    }
}

//4.设置seo信息 start---------------------------------------->
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 + "_" + seoName + "_" + seoSuffix,
        meta: [
            { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
            { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
            { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no',tagPriority: 10 }
        ]
    });
} else {
    // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
    // console.log("错误位置：设置分类页面SEO数据")
    // console.log("后端错误反馈：", setData.message)
    // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
}
//4.设置seo信息 end---------------------------------------->



</script>

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



<style lang="less" scoped>

 
    @media screen and (min-width:801px){/*pc*/

        .pagination_pc_none{display:none;}
		
            .pc_none{display:none;}
    }
    @media screen and (max-width:800px){/*ipad_phone*/


        .index_main{width:100%;}
        .phone_box_1 {
            width: 92%;
            margin: 0px auto 0px;
            .phone_box_1_head {

                height: 50px;
                line-height: 50px;
                background: #fff;
                border-bottom: 1px solid #E6E6E6;
                width: 100%;
                a {
                    float: left;
                    height: 50px;
                    line-height: 50px;
                    margin: 0;
                    position: relative;
                    color: #489d97;
                    font-size: 18px;
                    font-weight: bold;
                    box-sizing: border-box;
                    position: relative;
                    padding-left: 8px;
                }
                a::before {
                    content: '';
                    display: block;
                    position: absolute;
                    left: 0px;
                    top: 18px;
                    background: linear-gradient(to top, #0998A9, #6ADDD6);
                    width: 3px;
                    height: 15px;
                }
            }   
        }

        .phone_form{
            width:92%; 
            margin: 5px auto 0px;
            padding-bottom:8px;
             
        }

        .phone_form_tip{ 
        }

        .phone_form_tip_1 :deep(.el-select){
            margin:0px;
          
        }
        .phone_form_tip_1 :deep(.el-select:nth-of-type(2)){
            margin:0px 2%;
            box-sizing:border-box;
        }

        :deep(.el-select__wrapper){
             margin:5px 0px; padding:4px 4px 4px 8px;  
             font-size:12px;box-sizing:border-box;
             
        }

        .phone_form_tip_2 :deep(.el-select){
             margin-right:2%; 
        }
        
        :deep(.el-input){
          font-size:12px;
        }
        :deep(.el-button){
              border:solid 1px #ddd;
           color:#fff;float:right;margin:5px 0px 0px 0px;
           font-size:12px;
        }

        .cruit_ul_2{margin-top:0px;min-height:512px;}
        .cruit_li_2{
            width:92%;float:none!important;margin:0px auto 11px!important;  
                   
        }

        .cruit_li_2_head_box{margin-top:10px;}
         
        .cruit_li_2_foot_title{margin-top:8px;}
        .cruit_li_2_foot{margin-top:8px;}
        .cruit_li_2_a{padding-bottom:5px;}
        .cruit_li_2_foot_tag{
             background-size: 16px 70%;
             padding-left:18px;margin-bottom:5px;font-size:12px;
             margin-right:13px;

        }
        .cruit_li_2_foot_tag:nth-last-of-type(1){margin-right:0px;}


        .cruit_li_2_foot_tag_in{font-size:12px;}
        .cruit_li_2_foot_tag_in:nth-of-type(2){padding-left:16px;}
        .cruit_li_2_foot_tag_in:nth-of-type(2)::after {
                left: 8px;
            }    


        .cruit_li_2_head{font-size:18px;}
        .cruit_li_2_head_name{}
        .cruit_li_2_foot_title{font-size:12px;}
        .pagination .el-pagination.is-background .el-pager li{
            margin:0px 4px;
        }

        .pagination{width:100%;   margin-bottom:0px;}
        .pagination_phone_none{display:none;}
        .phone_none{display:none;}
    }
</style>



