1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906 |
- <template>
- <div>
- <!-- 页面头部 -->
- <HomePageHead></HomePageHead>
- <!-- 页面导航 -->
- <HomePageNavigation></HomePageNavigation>
- <!-- <HomePageNavigation1></HomePageNavigation1> -->
- <!-- 资讯 -->
- <HomePageMessage></HomePageMessage>
- <!-- 十强称号logo -->
- <HomeAdvertising></HomeAdvertising>
- <!-- <HomeTopTenTitle></HomeTopTenTitle> -->
- <!-- 更多服务 -->
- <HomeMoreService></HomeMoreService>
- <!-- 三农资讯logo -->
- <HomeSannongzixun></HomeSannongzixun>
- <!-- 模块一 -->
- <div class="farming">
- <div class="inner">
- <div class="farmerLeft">
- <div class="farmer">
- <h3>
- {{ pageData[0].alias }}
- <NuxtLink
- :to="{ path: `/newsList/${pageData[0].cid}`, query: { catid: pageData[0].cid } }"
- target="_blank" v-if="pageData[0].cid">
- 查看更多
- </NuxtLink>
- </h3>
- <ul>
- <li v-for="item in boxData1">
- <em></em>
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">{{ item.title }}</NuxtLink>
- </li>
- </ul>
- </div>
- <div class="farmerbottom">
- <!-- <img class="left"
- src="../static/images/rgmezdvz_19982_A_Chinese_farmer_carrying_a_hoe_is_hoeing_the_fi_a036c7b3-b05e-4d3d-a371-0bed91ec1ff8.png"
- alt=""> -->
- <img class="left" :src="boxData2[0].imgurl" v-if="boxData2[0] && hoverStatus == 0">
- <img class="left" :src="boxData2[1].imgurl" v-if="boxData2[1] && hoverStatus == 1">
- <img class="left" :src="boxData2[2].imgurl" v-if="boxData2[2] && hoverStatus == 2">
- <img class="left" :src="boxData2[3].imgurl" v-if="boxData2[3] && hoverStatus == 3">
- <img class="left" :src="boxData2[4].imgurl" v-if="boxData2[4] && hoverStatus == 4">
- <img class="left" :src="boxData2[5].imgurl" v-if="boxData2[5] && hoverStatus == 5">
- <ul class="leftList left">
- <li v-for='(item, index) in boxData2' @mouseenter="qhPic(index)">
- <NuxtLink
- :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
- target="_blank">
- <h4>
- <em></em>
- {{ item.title }}
- </h4>
- <!-- <p>{{ item.introduce }}</p> -->
- </NuxtLink>
- </li>
- <!-- <li>
- <h4>
- <em></em>
- 仪征市农业农村局召开
- </h4>
- <p>高邮市周山镇开展渔业安全生产应急高邮市周山镇开展渔业</p>
- </li> -->
- </ul>
- </div>
- </div>
- <div class="farmerRight">
- <!-- 致富信息 -->
- <div class="rich">
- <h3>
- {{ pageData[1].alias }}
- <NuxtLink
- :to="{ path: `/newsList/${pageData[1].cid}`, query: { catid: pageData[1].cid } }"
- target="_blank" v-if="pageData[1].cid">
- 查看更多
- </NuxtLink>
- </h3>
- <!-- <div class="photo">
- <div class="photoL" v-for="item in boxData4">
- <NuxtLink :to="`/newsDetail/${item.id}`" target="_blank">
- <img :src="item.imgurl">
- <span>{{ item.title }}</span>
- </NuxtLink>
- </div>
- </div> -->
- <ul>
- <li v-for="item in boxData3">
- <em></em>
- <NuxtLink :to="`/newsDetail/${item.id}`" target="_blank">{{ item.title }}</NuxtLink>
- </li>
- </ul>
- <!-- 轮播图 -->
- <div class="banner">
- <HomeSmallSwiper1 :message="pageData[1].cid"></HomeSmallSwiper1>
- <!-- <HomeSmallSwiper :swiperData="navigation1[17].data"></HomeSmallSwiper> -->
- </div>
- <!-- 轮播图下小图列表 及内容列表 -->
- <div class="photo">
- <div class="photoL" v-for="item in boxData4">
- <NuxtLink :to="`/newsDetail/${item.id}`" target="_blank">
- <img :src="item.imgurl">
- <span>{{ item.title }}</span>
- </NuxtLink>
- </div>
- </div>
- </div>
- <!-- 三农调查 -->
- <!-- <div class="inquire">
- <h3>
- 三农调查
- <span>查看更多</span>
- </h3>
- <p>郑州17名警察因出警慢被关禁闭,你怎么看?</p>
- <div class="radio">
- <el-radio-group v-model="radio1" text-color=#33B023>
- <el-radio value="1" size="large">支持,警察不关心百姓应惩罚</el-radio>
- <el-radio value="2" size="large">反对,这件事就关禁闭不合理</el-radio>
- <el-radio value="3" size="large">建议其他部门效仿此做法</el-radio>
- </el-radio-group>
- </div>
- <div class="btn">
- <button class="voting">投票</button>
- <button class="look">查看</button>
- </div>
- </div> -->
- </div>
- </div>
- </div>
- <!-- 十强称号logo -->
- <HomeTopTenTitle></HomeTopTenTitle>
- <!-- 三农科教 -->
- <div class="scienceEducation">
- <div class="inner">
- <!-- 左侧 -->
- <div class="scienceLeft">
- <HomeSlider :message="pageData[2]"></HomeSlider>
- </div>
- <!-- 右侧 -->
- <div class="scienceRight">
- <!-- 标题部分 -->
- <h3>
- {{ pageData[3].alias }}
- <NuxtLink
- :to="{ path: `/newsList/${pageData[3].cid}`, query: { catid: pageData[3].cid } }"
- target="_blank" v-if="pageData[3].cid">
- 查看更多
- </NuxtLink>
- </h3>
- <!-- 轮播图 -->
- <div class="banner">
- <HomeSmallSwiper1 :message="pageData[3].cid"></HomeSmallSwiper1>
- <!-- <HomeSmallSwiper :swiperData="navigation1[17].data"></HomeSmallSwiper> -->
- </div>
- <!-- 轮播图下小图列表 及内容列表 -->
- <div class="banner_b_img">
- <div class="photo">
- <div class="photoL" v-for="item in boxData6">
- <NuxtLink :to="`/newsDetail/${item.id}`" target="_blank">
- <img :src="item.imgurl">
- <span>{{ item.title }}</span>
- </NuxtLink>
- </div>
- </div>
- <ul>
- <li v-for="item in boxData5">
- <em></em>
- <!-- <span>{{ item.title }}</span> -->
- <NuxtLink :to="`/newsDetail/${item.id}`" target="_blank">{{ item.title }}</NuxtLink>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <!-- 农副产品十强光荣称号logo -->
- <HomeTopTen></HomeTopTen>
- <!--打假维权 产业动态 -->
- <div class="dynamic">
- <div class="inner">
- <div class="innerLeft">
- <!-- 标题部分 -->
- <div class="title">
- <h3>
- {{ pageData[4].alias }}
- <NuxtLink
- :to="{ path: `/newsList/${pageData[4].cid}`, query: { catid: pageData[4].cid } }"
- target="_blank" v-if="pageData[4].cid">
- 查看更多
- </NuxtLink>
- </h3>
- </div>
- <!-- 维权 protect rights -->
- <div class="protectRights">
- <div class="photoList">
- <div class="top" v-for="item in boxData8">
- <NuxtLink :to="`/newsDetail/${item.id}`" target="_blank">
- <img :src="item.imgurl" alt="">
- <span>{{ item.title }}</span>
- </NuxtLink>
- </div>
- <ul class="bottom">
- <li v-for="item in boxData88">
- <NuxtLink :to="`/newsDetail/${item.id}`" target="_blank">
- <img :src="item.imgurl" alt="">
- <p>{{ item.title }}</p>
- </NuxtLink>
- </li>
- </ul>
- </div>
- <ul class="textList">
- <li v-for="item in boxData9">
- <NuxtLink :to="`/newsDetail/${item.id}`" target="_blank">
- <h4>
- <em></em>
- {{ item.title }}
- </h4>
- <!-- <p>{{ item.introduce }}</p> -->
- </NuxtLink>
- </li>
- </ul>
- </div>
- </div>
- <div class="innerRight">
- <!-- 标题部分 -->
- <div class="title">
- <h3>
- {{ pageData[5].alias }}
- <NuxtLink
- :to="{ path: `/newsList/${pageData[5].cid}`, query: { catid: pageData[5].cid } }"
- target="_blank" v-if="pageData[5].cid">
- 查看更多
- </NuxtLink>
- </h3>
- </div>
- <ul class="dynamicList">
- <li v-for="item in boxData10">
- <NuxtLink :to="`/newsDetail/${item.id}`" target="_blank">
- <img :src="item.imgurl" alt="">
- <div class="text">
- <h5>{{ item.title }}</h5>
- <p>作者:{{ item.author }}</p>
- </div>
- </NuxtLink>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <!-- 三农资讯logo -->
- <HomeSannongzixun></HomeSannongzixun>
- <!--政策法规 -->
- <div class="policy">
- <div class="inner">
- <div class="innerLeft">
- <div class="title">
- <h3>
- {{ pageData[6].alias }}
- <NuxtLink
- :to="{ path: `/newsList/${pageData[6].cid}`, query: { catid: pageData[6].cid } }"
- target="_blank" v-if="pageData[6].cid">
- 查看更多
- </NuxtLink>
- </h3>
- </div>
- <ul class="policyList">
- <li v-for="item in boxData11">
- <NuxtLink :to="`/newsDetail/${item.id}`" target="_blank">
- <img :src="item.imgurl">
- <div class="text">
- <h5>{{ item.title }}</h5>
- <p>
- <span class="left">来源:{{ item.copyfrom }}</span>
- <span class="left">作者:{{ item.author }}</span>
- <span class="right">{{ item.created_at }}</span>
- </p>
- </div>
- </NuxtLink>
- </li>
- </ul>
- </div>
- <div class="innerRight">
- <div class="title">
- <h3>
- {{ pageData[7].alias }}
- <NuxtLink
- :to="{ path: `/newsList/${pageData[7].cid}`, query: { catid: pageData[7].cid } }"
- target="_blank" v-if="pageData[7].cid">
- 查看更多
- </NuxtLink>
- </h3>
- </div>
- <!-- 轮播图 -->
- <div class="banner">
- <HomeSmallSwiper1 :message="pageData[7].cid" v-show="pageData[7] != ''"></HomeSmallSwiper1>
- <!-- <HomeSmallSwiper :swiperData="navigation1[20].data"></HomeSmallSwiper> -->
- </div>
- <!-- 轮播图下小图列表 及内容列表 -->
- <div class="banner_b_img">
- <div class="photo">
- <div class="photoL" v-for="item in boxData13">
- <NuxtLink :to="`/newsDetail/${item.id}`" target="_blank">
- <img :src="item.imgurl">
- <span>{{ item.title }}</span>
- </NuxtLink>
- </div>
- </div>
- <ul>
- <li v-for="item in boxData12">
- <em></em>
- <NuxtLink :to="`/newsDetail/${item.id}`" target="_blank">{{ item.title }}</NuxtLink>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <!-- 页面底部 -->
- <HomeFoot></HomeFoot>
- </div>
- </template>
- <script setup>
- import { ref, onMounted } from 'vue'
- import { ElRadio, ElRadioGroup } from 'element-plus'
- const nuxtApp = useNuxtApp();
- const axios = nuxtApp.$axios;
- const aa = ref(21);
- const hoverStatus = ref(1)
- const qhPic = function (num) {
- console.log('--------------------------------------------');
- console.log('qhPic', num)
- hoverStatus.value = num;
- }
- const info = ref("");
- const getInfo = async () => {
- const response = await axios.get(`/web/getWebsiteFootInfo`);
- info.value = response.data.website_head;
- console.log('3333333333333333333333333')
- console.log(info.value)
- }
- // 定义响应式数据
- const seoData = ref({
- title: '默认标题',
- description: '默认描述',
- keywords: '默认关键词',
- image: 'https://example.com/default-image.jpg'
- });
- // 在 onMounted 钩子中获取数据
- onMounted(async () => {
- try {
- const response = await axios.get('/web/getWebsiteFootInfo');
- const data = response.data.website_head; // 假设接口返回的数据在 data 字段中
- console.log(seoData.value.title)
- // 更新 seoData
- seoData.value = {
- title: data.title,
- description: data.description,
- keywords: data.keywords,
- image: data.image
- };
- console.log(seoData.value.title)
- } catch (error) {
- console.error('获取 SEO 数据失败:', error);
- // 设置默认值
- seoData.value = {
- title: '默认标题',
- description: '默认描述',
- keywords: '默认关键词',
- image: 'https://example.com/default-image.jpg'
- };
- }
- });
- // 监听 seoData 的变化,动态设置 SEO 字段
- watch(seoData, (newVal) => {
- if (newVal.title) { // 确保 title 有值
- useSeoMeta({
- title: newVal.title, // 使用动态值
- description: newVal.description,
- ogTitle: newVal.title,
- ogDescription: newVal.description,
- ogImage: newVal.image,
- twitterTitle: newVal.title,
- twitterDescription: newVal.description,
- twitterImage: newVal.image,
- keywords: newVal.keywords
- });
- }
- }, { immediate: true });
- const radio1 = ref('1');
- let index = ref(0)
- onMounted(() => {
- getInfo();
- })
- const pageData = ref([
- { cid: "", title: "", data: [] },
- { cid: "", title: "", data: [] },
- { cid: "", title: "", data: [] },
- { cid: "", title: "", data: [] },
- { cid: "", title: "", data: [] },
- { cid: "", title: "", data: [] },
- { cid: "", title: "", data: [] },
- { cid: "", title: "", data: [] },
- { cid: "", title: "", data: [] },
- { cid: "", title: "", data: [] },
- { cid: "", title: "", data: [] },
- { cid: "", title: "", data: [] },
- { cid: "", title: "", data: [] },
- { cid: "", title: "", data: [] },
- { cid: "", title: "", data: [] },
- { cid: "", title: "", data: [] },
- { cid: "", title: "", data: [] },
- { cid: "", title: "", data: [] },
- { cid: "", title: "", data: [] },
- { cid: "", title: "", data: [] }
- ]);
- //获取导航一的栏目
- const navigation1 = ref("");
- const navigateList = async () => {
- try {
- const response = await axios.get(`/web/getWebsiteModelCategory?placeid=${1}&pid=${0}&num=${20}`);
- console.log('成功获得1级导航1111', pageData.value);
- pageData.value = response.data;
- for (let index in response.data) {
- pageData.value[index].title = response.data[index].name
- pageData.value[index].cid = response.data[index].category_id
- }
- //console.log('成功获得1级导航3333', pageData.value);
- //console.log(pageData.value[0].cid)
- //14
- //获取模块中的数据1
- getWebsiteModelArticles();
- //获取模块中的数据2
- getWebsiteModelArticles2();
- //15
- //获取模块中的数据3
- getWebsiteModelArticles3();
- //获取模块中的数据4
- getWebsiteModelArticles4();
- //17
- //获取模块中的数据5
- getWebsiteModelArticles5();
- //获取模块中的数据6
- getWebsiteModelArticles6()
- //获取模块中的数据7
- getWebsiteModelArticles7()
- //18
- //获取模块中的数据8
- getWebsiteModelArticles8();
- //获取模块中的数据9
- getWebsiteModelArticles9()
- getWebsiteModelArticles88()
- //19
- //获取模块中的数据10
- getWebsiteModelArticles10()
- //20
- //获取模块中的数据11
- getWebsiteModelArticles11()
- //21
- //获取模块中的数据12
- getWebsiteModelArticles12()
- //获取模块中的数据13
- getWebsiteModelArticles13()
- } catch (error) {
- console.error(error);
- }
- }
- //获取模块中的数据 getWebsiteModelArticles
- //14
- const boxData1 = ref("");
- const getWebsiteModelArticles = async () => {
- try {
- // const response = await axios.get(`/web/getWebsiteModelArticles?catid=${14}&level=${1}&pagesize=${10}`);
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[0].cid}&level=${1}&pagesize=${10}`);
- console.log('获得第一个板块的内容', response.data);
- boxData1.value = response.data;
- } catch (error) {
- console.error(error);
- }
- }
- const boxData2 = ref("");
- const getWebsiteModelArticles2 = async () => {
- try {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[0].cid}&level=${3}&pagesize=${6}`);
- console.log('mouseenter', response.data);
- boxData2.value = response.data;
- } catch (error) {
- console.error(error);
- }
- }
- //15
- const boxData3 = ref("");
- const getWebsiteModelArticles3 = async () => {
- try {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[1].cid}&level=${1}&pagesize=${5}`);
- console.log('一级导航', response.data);
- boxData3.value = response.data;
- } catch (error) {
- console.error(error);
- }
- }
- const boxData4 = ref("");
- const getWebsiteModelArticles4 = async () => {
- try {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[1].cid}&level=${3}&pagesize=${2}`);
- console.log('boxData4', response.data);
- boxData4.value = response.data;
- } catch (error) {
- console.error(error);
- }
- }
- //17
- const boxData5 = ref("");
- const getWebsiteModelArticles5 = async () => {
- try {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[3].cid}&level=${1}&pagesize=${5}`);
- console.log('一级导航', response.data);
- boxData5.value = response.data;
- } catch (error) {
- console.error(error);
- }
- }
- const boxData6 = ref("");
- const getWebsiteModelArticles6 = async () => {
- try {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[3].cid}&level=${3}&pagesize=${2}`);
- console.log('boxData6', response.data);
- boxData6.value = response.data;
- } catch (error) {
- console.error(error);
- }
- }
- const boxData7 = ref("");
- const getWebsiteModelArticles7 = async () => {
- try {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[3].cid}&level=${3}&pagesize=${2}`);
- console.log('一级导航', response.data);
- boxData7.value = response.data;
- } catch (error) {
- console.error(error);
- }
- }
- //18
- const boxData8 = ref("");
- const getWebsiteModelArticles8 = async () => {
- try {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[3].cid}&level=${3}&pagesize=${1}`);
- console.log('一级导航', response.data);
- boxData8.value = response.data;
- } catch (error) {
- console.error(error);
- }
- }
- const boxData88 = ref("");
- const getWebsiteModelArticles88 = async () => {
- try {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[3].cid}&level=${3}&pagesize=${2}&placeid=${1}`);
- console.log('一级导航', response.data);
- boxData88.value = response.data;
- } catch (error) {
- console.error(error);
- }
- }
- const boxData9 = ref("");
- const getWebsiteModelArticles9 = async () => {
- try {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[3].cid}&level=${1}&pagesize=${12}`);
- console.log('boxData9', response.data);
- boxData9.value = response.data;
- } catch (error) {
- console.error(error);
- }
- }
- //19
- const boxData10 = ref("");
- const getWebsiteModelArticles10 = async () => {
- try {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[4].cid}&level=${3}&pagesize=${4}`);
- console.log('boxData10', response.data);
- boxData10.value = response.data;
- } catch (error) {
- console.error(error);
- }
- }
- //22
- const boxData11 = ref("");
- const getWebsiteModelArticles11 = async () => {
- try {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[5].cid}&level=${3}&pagesize=${4}`);
- console.log('boxData11', response.data);
- boxData11.value = response.data;
- } catch (error) {
- console.error(error);
- }
- }
- //21
- const boxData12 = ref("");
- const getWebsiteModelArticles12 = async () => {
- try {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[6].cid}&level=${1}&pagesize=${5}`);
- console.log('boxData12', response.data);
- boxData12.value = response.data;
- } catch (error) {
- console.error(error);
- }
- }
- const boxData13 = ref("");
- const getWebsiteModelArticles13 = async () => {
- try {
- const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[6].cid}&level=${3}&pagesize=${2}`);
- console.log('boxData13', response.data);
- boxData13.value = response.data;
- } catch (error) {
- console.error(error);
- }
- }
- onMounted(() => {
- navigateList();
- })
- // 跳转更多
- // const goMore = (id) => {
- // console.log(id);
- // navigateTo({
- // path: '/primaryNavigation/newsList',
- // query: {
- // id: id // 传递id
- // }
- // })
- // }
- </script>
- <style lang="less" scoped>
- // 农民工
- .farming {
- width: 100%;
- height: 616px;
- .farmerLeft,
- .farmerRight {
- float: left;
- }
- // 左侧
- .farmerLeft {
- width: 790px;
- height: 616px;
- margin-right: 21px;
- .farmer {
- width: 790px;
- height: 330px;
- >h3 {
- height: 36px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: bold;
- font-size: 24px;
- color: #000000;
- line-height: 28px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- border-bottom: 1px solid #139602;
- >a {
- float: right;
- width: 56px;
- height: 20px;
- line-height: 24px;
- font-weight: 400;
- font-size: 14px;
- color: #999999;
- font-style: normal;
- text-transform: none;
- }
- }
- >ul {
- margin-top: 20px;
- >li {
- float: left;
- width: 362px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- height: 22px;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 21px;
- text-align: left;
- margin-bottom: 32px;
- margin-right: 27px;
- >em {
- display: inline-block;
- width: 8px;
- height: 8px;
- background-color: #d9d9d9;
- border-radius: 4px;
- margin: 5px 8px 6px;
- vertical-align: middle;
- }
- a {
- color: #333333;
- }
- a:hover {
- color: #139602;
- }
- }
- >li:hover {
- color: #139602;
- }
- }
- }
- .farmerbottom {
- width: 790px;
- height: 280px;
- img {
- width: 498px;
- height: 280px;
- }
- >.leftList {
- width: 290px;
- height: 280px;
- background-color: #f6f6f6;
- padding: 11px 26px 6px 20px;
- box-sizing: border-box;
- >li {
- width: 296px;
- height: 32px;
- color: #666666;
- font-size: 14px;
- margin-bottom: 14px;
- h4 {
- width: 249px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-family: Source Han Sans, Source Han Sans;
- height: 27px;
- line-height: 21px;
- font-size: 18px;
- color: #333333;
- font-weight: 400;
- em {
- display: inline-block;
- width: 8px;
- height: 8px;
- background-color: #333333;
- border-radius: 8px;
- }
- }
- p {
- width: 249px;
- height: 48px;
- // line-height: 24px;
- padding-left: 14px;
- // color: #333333;
- }
- a {
- color: #333333;
- }
- a:hover {
- color: #139602;
- }
- }
- >li:hover,
- >li:hover>a>h4 {
- color: #088f04;
- }
- >li:hover>a>h4>em {
- background-color: #088f04;
- }
- }
- }
- }
- // 右侧
- .farmerRight {
- width: 380px;
- height: 600px;
- .rich,
- .inquire {
- width: 100%;
- height: 309px;
- // 标题部分
- >h3 {
- height: 36px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: bold;
- font-size: 24px;
- color: #000000;
- line-height: 28px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- border-bottom: 1px solid #139602;
- >a,
- >span {
- float: right;
- width: 56px;
- height: 20px;
- line-height: 24px;
- font-weight: 400;
- font-size: 14px;
- color: #999999;
- font-style: normal;
- text-transform: none;
- }
- }
- // 图片部分
- .photo {
- height: 104px;
- margin-top: 23px;
- >.photoL:first-child {
- margin-right: 10px;
- }
- }
- .photoL {
- display: inline-block;
- width: 185px;
- height: 104px;
- border-radius: 6px;
- position: relative;
- a {
- width: 185px;
- height: 104px;
- }
- img {
- width: 185px;
- height: 104px;
- border-radius: 6px;
- }
- span {
- position: absolute;
- bottom: 0;
- left: 0;
- display: inline-block;
- padding-left: 7px;
- box-sizing: border-box;
- width: 185px;
- height: 22px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- background-color: rgba(0, 0, 0, 0.5);
- font-weight: 500px;
- font-size: 14px;
- color: #FFFFFF;
- line-height: 22px;
- // border-radius: 6px 6px 0px 0px;
- }
- }
- .photoList {
- display: inline-block;
- width: 185px;
- height: 104px;
- position: relative;
- img {
- width: 185px;
- height: 104px;
- }
- span {
- position: absolute;
- bottom: 0;
- left: 0;
- display: inline-block;
- width: 185px;
- height: 30px;
- font-weight: 500;
- color: #FFFFFF;
- padding-top: 7px;
- padding-left: 6px;
- box-sizing: border-box;
- }
- }
- // .photoL {
- // margin-right: 10px;
- // }
- // 文字部分
- ul {
- height: 220px;
- margin-bottom: 10px;
- >li {
- height: 25px;
- padding-top: 16px;
- >em {
- display: inline-block;
- width: 8px;
- height: 8px;
- background-color: #d9d9d9;
- border-radius: 4px;
- margin: 5px 8px 6px 5px;
- margin-left: 5px;
- vertical-align: middle;
- }
- >a,
- >span {
- display: inline-block;
- width: 340px;
- height: 25px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 21px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- padding-left: 10px;
- vertical-align: middle;
- }
- >a:hover,
- >span:hover {
- color: #139609;
- }
- }
- }
- }
- .rich {
- .photoL {
- display: inline-block;
- width: 185px;
- height: 104px;
- position: relative;
- border-radius: 6px;
- img {
- width: 185px;
- height: 104px;
- border-radius: 6px;
- }
- span {
- position: absolute;
- bottom: 0;
- left: 0;
- display: inline-block;
- padding-left: 7px;
- box-sizing: border-box;
- width: 185px;
- height: 22px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- background-color: rgba(0, 0, 0, 0.5);
- font-weight: 500px;
- font-size: 14px;
- color: #FFFFFF;
- line-height: 22px;
- border-radius: 0px 0px 6px 6px;
- }
- }
- }
- // 三农调查
- .inquire {
- width: 380px;
- height: 280px;
- margin-top: 20px;
- background: #FFFFFF;
- box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.1);
- border-radius: 6px 6px 6px 6px;
- padding: 4px 6px;
- box-sizing: border-box;
- p {
- width: 328px;
- height: 69px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 21px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- padding: 12px 20px 0 32px;
- }
- .radio {
- /deep/.el-radio {
- --el-radio-input-border-color-hover: #27881a;
- }
- /deep/.el-radio-group {
- align-items: center;
- display: inline-flex;
- flex-wrap: wrap;
- font-size: 0;
- padding-left: 35px;
- }
- /deep/.el-radio.el-radio--large {
- height: 29px;
- }
- /deep/.el-radio.el-radio--large .el-radio__label {
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 16px;
- color: #333333;
- }
- /deep/.el-radio.el-radio--large .el-radio__inner {
- height: 16px;
- width: 16px;
- }
- /deep/.el-radio__input.is-checked+.el-radio__label {
- color: #27881a;
- }
- /deep/.el-radio__input.is-checked .el-radio__inner {
- background: #33b023;
- border-color: #27881a;
- }
- }
- .btn {
- width: 188px;
- height: 32px;
- margin: 20px auto;
- button {
- width: 70px;
- height: 32px;
- line-height: 32px;
- border-radius: 6px;
- border: none;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 16px;
- color: #999999;
- }
- .voting {
- background-color: #33b023;
- color: #fff;
- margin-right: 44px;
- }
- }
- }
- }
- }
- //三农科教
- .scienceEducation {
- height: 590px;
- .scienceLeft,
- .scienceRight {
- float: left;
- }
- // 左侧
- .scienceLeft {
- width: 790px;
- height: 616px;
- margin-right: 21px;
- }
- // 右侧
- .scienceRight {
- width: 380px;
- height: 600px;
- // 标题部分
- >h3 {
- height: 36px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: bold;
- font-size: 24px;
- color: #000000;
- line-height: 28px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- border-bottom: 1px solid #139602;
- >a {
- float: right;
- width: 56px;
- height: 20px;
- line-height: 24px;
- font-weight: 400;
- font-size: 14px;
- color: #999999;
- font-style: normal;
- text-transform: none;
- }
- }
- // 轮播图
- .banner {
- width: 380px;
- height: 214px;
- margin-top: 20px;
- }
- .banner_b_img {
- // 图片部分
- .photo {
- height: 104px;
- margin-top: 23px;
- >.photoL:first-child {
- margin-right: 10px;
- }
- }
- .photoL {
- display: inline-block;
- width: 185px;
- height: 104px;
- position: relative;
- border-radius: 2px;
- img {
- width: 185px;
- height: 104px;
- border-radius: 2px;
- }
- span {
- position: absolute;
- top: 0;
- left: 0;
- display: inline-block;
- padding-left: 7px;
- box-sizing: border-box;
- width: 185px;
- height: 22px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- background-color: rgba(0, 0, 0, 0.5);
- font-weight: 500px;
- font-size: 14px;
- color: #FFFFFF;
- line-height: 22px;
- border-radius: 2px 2px 0px 0px;
- }
- }
- // .photoL {
- // margin-right: 5px;
- // }
- ul {
- width: 380px;
- height: 186px;
- >li {
- height: 22px;
- padding-top: 16px;
- >strong {
- display: inline-block;
- width: 24px;
- height: 24px;
- line-height: 24px;
- background-color: #cecece;
- padding-left: 6px;
- box-sizing: border-box;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: 500;
- font-size: 18px;
- color: #FFFFFF;
- font-style: normal;
- text-transform: none;
- }
- >em {
- display: inline-block;
- width: 6px;
- height: 6px;
- border-radius: 10px;
- border: 2px solid #8CBA86;
- vertical-align: 5px;
- }
- a,
- span {
- display: inline-block;
- width: 350px;
- height: 22px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 21px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- padding-left: 9px;
- }
- >a:hover,
- >span:hover {
- color: #139609;
- }
- }
- }
- }
- }
- }
- //打假维权 动态
- .dynamic {
- height: 610px;
- .inner {
- height: 610px;
- }
- .innerLeft {
- .title {
- >h3 {
- height: 36px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: bold;
- font-size: 24px;
- color: #000000;
- line-height: 28px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- border-bottom: 1px solid #139602;
- >a {
- float: right;
- width: 56px;
- height: 20px;
- line-height: 24px;
- font-weight: 400;
- font-size: 14px;
- color: #999999;
- font-style: normal;
- text-transform: none;
- }
- }
- }
- .protectRights {
- float: left;
- margin-top: 26px;
- // 右侧的图片
- .photoList {
- float: left;
- width: 387px;
- margin-right: 40px;
- >.top {
- width: 387px;
- height: 320px;
- position: relative;
- img {
- width: 387px;
- height: 320px;
- border-radius: 6px;
- }
- span {
- position: absolute;
- bottom: 0;
- left: 0;
- display: inline-block;
- width: 387px;
- height: 68px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- padding: 33px 33px 8px 13px;
- box-sizing: border-box;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #FFFFFF;
- line-height: 21px;
- }
- }
- >.bottom {
- width: 387px;
- height: 202px;
- margin-top: 15px;
- >li {
- width: 185px;
- height: 210px;
- float: left;
- margin-right: 17px;
- background-color: #f5f5f5;
- img {
- width: 185px;
- height: 139px;
- border-radius: 6px;
- }
- p {
- width: 175px;
- height: 63px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 30px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- margin-left: 5px;
- }
- }
- >li:nth-child(2) {
- margin-right: 0;
- }
- }
- }
- // 右侧的文字
- .textList {
- float: left;
- width: 340px;
- height: 545px;
- >li {
- width: 340px;
- height: 27px;
- margin-bottom: 19px;
- h4 {
- width: 282px;
- height: 25px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 18px;
- color: #333333;
- line-height: 21px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- // padding-left: 14px;
- em {
- display: inline-block;
- width: 8px;
- height: 8px;
- margin-right: 6px;
- border-radius: 4px;
- background-color: #333333;
- }
- }
- p {
- padding-left: 14px;
- width: 249px;
- height: 48px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #666666;
- line-height: 24px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- }
- a {
- color: #333333;
- }
- a:hover {
- color: #139602;
- }
- >li:hover>a>h4,
- >li:hover>a>p {
- color: #139602;
- }
- >li:hover>a>h4>em {
- background-color: #139602;
- }
- }
- }
- }
- .innerRight {
- .title {
- >h3 {
- height: 36px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: bold;
- font-size: 24px;
- color: #000000;
- line-height: 28px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- border-bottom: 1px solid #139602;
- >a {
- float: right;
- width: 56px;
- height: 20px;
- line-height: 24px;
- font-weight: 400;
- font-size: 14px;
- color: #999999;
- font-style: normal;
- text-transform: none;
- }
- }
- }
- .dynamicList {
- width: 380px;
- margin-top: 26px;
- >li {
- width: 380px;
- height: 120px;
- margin-bottom: 21px;
- img {
- float: left;
- width: 160px;
- height: 120px;
- }
- .text {
- float: left;
- width: 220px;
- height: 120px;
- padding-left: 15px;
- box-sizing: border-box;
- >h5 {
- width: 199px;
- height: 52px;
- margin-bottom: 40px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- padding-top: 6px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 18px;
- color: #333333;
- line-height: 26px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- >p {
- width: 198px;
- height: 70px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 3;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- margin-top: 10px;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #666666;
- line-height: 24px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- }
- }
- li:hover {
- .text {
- box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
- background-color: #fff;
- h5,
- p {
- color: #139602;
- }
- }
- }
- }
- }
- }
- // 政策法规
- .policy {
- height: 678px;
- .inner {
- height: 678px;
- .innerLeft {
- width: 790px;
- height: 621px;
- .title {
- >h3 {
- height: 36px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: bold;
- font-size: 24px;
- color: #000000;
- line-height: 28px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- border-bottom: 1px solid #139602;
- >a {
- float: right;
- width: 56px;
- height: 20px;
- line-height: 24px;
- font-weight: 400;
- font-size: 14px;
- color: #999999;
- font-style: normal;
- text-transform: none;
- }
- }
- }
- .policyList {
- width: 790px;
- margin-top: 20px;
- >li {
- width: 790px;
- height: 121px;
- margin-bottom: 20px;
- img,
- .text {
- float: left;
- }
- img {
- width: 224px;
- height: 121px;
- }
- .text {
- width: 566px;
- height: 121px;
- padding-left: 20px;
- box-sizing: border-box;
- >h5 {
- padding: 13px 0 6px;
- width: 536px;
- height: 25px;
- margin-bottom: 45px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-family: PingFang SC, PingFang SC;
- font-weight: 600;
- font-size: 18px;
- color: #333333;
- line-height: 21px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- p {
- width: 536px;
- height: 30px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 3;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 14px;
- color: #666666;
- line-height: 24px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- >span:first-child {
- margin-right: 20px;
- }
- }
- }
- }
- li:hover {
- .text {
- box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
- background-color: #fff;
- h5,
- p {
- color: #139602;
- }
- }
- }
- }
- }
- .innerRight {
- .title {
- h3 {
- height: 36px;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: bold;
- font-size: 24px;
- color: #000000;
- line-height: 28px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- border-bottom: 1px solid #139602;
- a {
- float: right;
- width: 56px;
- height: 20px;
- line-height: 24px;
- font-weight: 400;
- font-size: 14px;
- color: #999999;
- font-style: normal;
- text-transform: none;
- }
- }
- }
- // 轮播图
- .banner {
- width: 380px;
- height: 214px;
- margin-top: 20px;
- }
- .banner_b_img {
- // 图片部分
- .photo {
- height: 104px;
- margin-top: 23px;
- }
- .photoL {
- display: inline-block;
- width: 185px;
- height: 104px;
- position: relative;
- img {
- width: 185px;
- height: 104px;
- border-radius: 2px;
- }
- // a,
- span {
- position: absolute;
- top: 0;
- left: 0;
- display: inline-block;
- padding-left: 7px;
- box-sizing: border-box;
- width: 185px;
- height: 22px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- background-color: rgba(0, 0, 0, 0.5);
- font-weight: 500px;
- font-size: 14px;
- color: #FFFFFF;
- line-height: 22px;
- }
- }
- .photoL {
- margin-right: 10px;
- }
- ul {
- width: 380px;
- height: 186px;
- >li {
- height: 22px;
- padding-top: 16px;
- >strong {
- display: inline-block;
- width: 24px;
- height: 24px;
- line-height: 24px;
- background-color: #cecece;
- padding-left: 6px;
- box-sizing: border-box;
- font-family: Source Han Sans, Source Han Sans;
- font-weight: 500;
- font-size: 18px;
- color: #FFFFFF;
- font-style: normal;
- text-transform: none;
- }
- >em {
- display: inline-block;
- width: 6px;
- height: 6px;
- border-radius: 10px;
- border: 2px solid #8CBA86;
- vertical-align: middle;
- }
- a,
- >span {
- display: inline-block;
- width: 350px;
- height: 22px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- line-height: 21px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- padding-left: 9px;
- vertical-align: middle;
- }
- a:hover,
- >span:hover {
- color: #139609;
- }
- }
- }
- }
- }
- }
- }
- </style>
|