| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376 |
- <template>
- <div>
- <HomePageHead></HomePageHead>
- <HomePageNavigation></HomePageNavigation>
- <HomeSecondaryHeading :titleData="pageData" :pinyinid="routeId"></HomeSecondaryHeading>
- <!-- 频道页 -->
- <main class="index_main">
- <section class="channel_1 clearfix">
- <div class="channel_1_box clearfix">
- <div class="roll_1_box clearfix">
- <HomeSwiperNzgx :imgData="pageData[0].data"></HomeSwiperNzgx>
- </div>
- </div>
- <div class="channel_2_box clearfix phone_none">
- <div class="channel_ul_1 clearfix">
- <NuxtLink class="channel_ul_1_a dot1" :href="getLinkPathDetail(item)" :title="item.title"
- v-for="item in pageData[0].data2" :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- {{ item.title }}
- </NuxtLink>
- </div>
- </div>
- </section>
- <!-- 广告 1-->
- <HomeAdvertising :imgurl="adImg1"></HomeAdvertising>
- <section class="channel_2 clearfix phone_none">
- <div class="channel_1_box" v-if="pageData.length > 1">
- <div class="channel_head_box clearfix">
- <div class="channel_head_box_left">
- <div class="channel_head_left_a_btn">
- <NuxtLink class="channel_head_left_a channel_head_left_a_only"
- :href="getLinkPath(pageData[1])" v-if="pageData[1]" :title="pageData[1].alias">
- {{ pageData[1].alias }}
- </NuxtLink>
- </div>
- </div>
- </div>
- <div class=" clearfix">
- <div class="channel_3_box clearfix">
- <div class="channel_ul_2 clearfix" v-if="pageData[1]">
- <NuxtLink class="channel_ul_2_a dot1" :href="getLinkPathDetail(item)"
- :title="item.title" v-for="item in pageData[1].data3" :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- {{ item.title }}
- </NuxtLink>
- </div>
- </div>
- <div class="channel_4_box clearfix">
- <div class="channel_img_ul_1">
- <div class="channel_img_ul_1_li" v-if="pageData[1]">
- <NuxtLink class="channel_img_ul_1_li_a" :href="getLinkPathDetail(item)"
- :title="item.title" v-for="item in pageData[1].data" :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <img class="channel_img_ul_1_li_img" :src="item.imgurl" alt="item.imgurl">
- <div class="channel_img_ul_1_li_dot2 dot2">
- {{ item.title }}
- </div>
- </NuxtLink>
- </div>
- </div>
- <div class="channel_img_ul_even_1 clearfix" v-if="pageData[1]">
- <div class="channel_img_ul_even_1_li" v-for="item in pageData[1].data2">
- <NuxtLink class="channel_img_ul_even_1_li_a" :href="getLinkPathDetail(item)"
- :title="item.title" :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <img class="channel_img_ul_even_1_li_img" :src="item.imgurl" alt="item.imgurl">
- <div class="channel_img_ul_even_1_li_dot2 dot2">
- {{ item.title }}
- </div>
- </NuxtLink>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="channel_2_box" v-if="pageData.length > 2">
- <div class="channel_head_box clearfix">
- <div class="channel_head_box_left">
- <div class="channel_head_left_a_btn">
- <NuxtLink class="channel_head_left_a channel_head_left_a_only"
- :href="getLinkPath(pageData[2])" v-if="pageData[2]" :title="pageData[2].alias">
- {{ pageData[2].alias }}
- </NuxtLink>
- </div>
- </div>
- <div class="channel_head_box_right">
- <!-- <NuxtLink class="channel_head_box_right_1_a" :href="getLinkPath(pageData[2])"
- v-if="pageData[2]" :title="pageData[2].alias">
- 栏目简介
- </NuxtLink> -->
- </div>
- </div>
- <div class=" clearfix">
- <div class="channel_even_img_ul_2 clearfix" v-if="pageData[2]">
- <div class="channel_even_img_ul_2_li" v-for="item in pageData[2].data">
- <NuxtLink class="channel_even_img_ul_2_a" :href="getLinkPathDetail(item)"
- :title="item.title" :key="item.id" :target="item.islink == 1 ? '_blank' : '_self'">
- <img class="channel_even_img_ul_2_li_img" :src="item.imgurl" alt="item.title">
- <div class="channel_even_img_ul_2_dot1 dot1">{{ item.title }}</div>
- </NuxtLink>
- </div>
- </div>
- <div class="channel_ul_3 clearfix" v-if="pageData[2]">
- <NuxtLink class="channel_ul_3_a dot1" :href="getLinkPathDetail(item)" :title="item.title"
- v-for="item in pageData[2].data2" :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- {{ item.title }}
- </NuxtLink>
- </div>
- </div>
- </div>
- </section>
-
- <div class="phone_box_1 pc_none">
- <div class="phone_box_1_ul">
- <div class="" >
- <NuxtLink
- :href="getLinkPathDetail(item)"
- v-for="item in pageData[0].data2"
- :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- {{ item.title }}
- </NuxtLink>
- </div>
- </div>
- </div>
- <!-- 惠农工程 phone-->
- <div class="phone_box_2 pc_none" v-if="pageData.length > 1">
- <div class="phone_box_2_head">
- <NuxtLink class=""
- :href="getLinkPath(pageData[1])"
- v-if="pageData[1]">
- {{ pageData[1].alias }}
- </NuxtLink>
- </div>
- <div class="phone_box_2_img_ul">
- <div class="" v-if="pageData[1]">
- <NuxtLink class=""
- :href="getLinkPathDetail(item)"
- v-for="item in pageData[1].data"
- :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <img class=""
- :src="item.imgurl"
- alt="item.imgurl">
- <span class="">
- {{ item.title }}
- </span>
- </NuxtLink>
- </div>
- </div>
- <div class="phone_box_2_ul">
- <div class="" v-if="pageData[1]">
- <NuxtLink class=""
- :href="getLinkPathDetail(item)"
- :title="item.title"
- v-for="item in pageData[1].data3"
- :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- {{ item.title }}
- </NuxtLink>
- </div>
- </div>
- </div>
- <!-- 公告启事 phone -->
- <div class="phone_box_3 pc_none" v-if="pageData.length > 2">
- <div class="phone_box_3_head">
- <NuxtLink class=""
- :href="getLinkPath(pageData[2])"
- v-if="pageData[2]">
- {{ pageData[2].alias }}
- </NuxtLink>
- </div>
- <div class="phone_box_3_img_ul">
- <div class="" v-if="pageData[2]">
- <NuxtLink class=""
- v-for="item in pageData[2].data"
- :href="getLinkPathDetail(item)"
- :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <img class=""
- :src="item.imgurl"
- alt="item.title">
- <span class="">{{ item.title }}</span>
- </NuxtLink>
- </div>
- </div>
- <div class="phone_box_3_ul">
- <div class="" v-if="pageData[2]">
- <NuxtLink class=""
- v-for="item in pageData[2].data2"
- :key="item.id"
- :href="getLinkPathDetail(item)"
- :target="item.islink == 1 ? '_blank' : '_self'">
- {{ item.title }}
- </NuxtLink>
- </div>
- </div>
- </div>
- <section class="channel_3 clearfix phone_none">
- <div class="channel_1_box" v-if="pageData.length > 3">
- <div class="channel_head_box clearfix">
- <div class="channel_head_box_left">
- <div class="channel_head_left_a_btn">
- <NuxtLink class="channel_head_left_a channel_head_left_a_only"
- :href="getLinkPath(pageData[3])" v-if="pageData[3]" :title="pageData[3].alias">
- {{ pageData[3].alias }}
- </NuxtLink>
- </div>
- </div>
- <div class="channel_head_box_right">
- <!-- <NuxtLink class="channel_head_box_right_1_a" :href="getLinkPath(pageData[3])"
- v-if="pageData[3]" :title="pageData[3].alias">
- 栏目简介
- </NuxtLink> -->
- </div>
- </div>
- <div class=" clearfix">
- <div class="channel_ul_4 clearfix" v-if="pageData[3]">
- <NuxtLink class="channel_ul_4_a dot1" :href="getLinkPathDetail(item)" :title="item.title"
- v-for="item in pageData[3].data2" :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- {{ item.title }}
- </NuxtLink>
- </div>
- </div>
- </div>
- <div class="channel_2_box" v-if="pageData.length > 4">
- <div class="channel_head_box clearfix">
- <div class="channel_head_box_left">
- <div class="channel_head_left_a_btn">
- <NuxtLink class="channel_head_left_a channel_head_left_a_only"
- :href="getLinkPath(pageData[4])" v-if="pageData[4]" :title="pageData[4].alias">
- {{ pageData[4].alias }}
- </NuxtLink>
- </div>
- </div>
- <div class="channel_head_box_right">
- <!-- <NuxtLink class="channel_head_box_right_1_a" :href="getLinkPath(pageData[4])"
- v-if="pageData[4]" :title="pageData[4].alias">
- 栏目简介
- </NuxtLink> -->
- </div>
- </div>
- <div class="channel_img_ul_2">
- <div class="channel_img_ul_2_li" v-if="pageData[4]">
- <NuxtLink class="channel_img_ul_2_li_a" :href="getLinkPathDetail(item)" :title="item.title"
- v-for="item in pageData[4].data" :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <img class="channel_img_ul_2_li_img" :src="item.imgurl" alt="item.imgurl">
- <div class="channel_img_ul_2_li_dot2 dot2">{{ item.title }}</div>
- </NuxtLink>
- </div>
- </div>
- </div>
- </section>
- <!-- 法律咨询 phone-->
- <div class="phone_box_4 pc_none" v-if="pageData.length > 3" >
- <div class="phone_box_4_head">
- <NuxtLink class=" "
- :href="getLinkPath(pageData[3])"
- v-if="pageData[3]" >
- {{ pageData[3].alias }}
- </NuxtLink>
- </div>
- <div class="phone_box_4_ul">
- <div class="" v-if="pageData[3]">
- <NuxtLink class=""
- :href="getLinkPathDetail(item)"
- v-for="item in pageData[3].data2"
- :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- {{ item.title }}
- </NuxtLink>
- </div>
- </div>
- </div>
- <!-- 行业标准 phone-->
- <div class="phone_box_5 pc_none" v-if="pageData.length > 4">
- <div class="phone_box_5_head">
- <NuxtLink class=""
- :href="getLinkPath(pageData[4])"
- v-if="pageData[4]">
- {{ pageData[4].alias }}
- </NuxtLink>
- </div>
- <div class="phone_box_5_img_ul">
- <div class="" v-if="pageData[4]">
- <NuxtLink class=""
- v-for="item in pageData[4].data" :key="item.id"
- :href="getLinkPathDetail(item)"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <img class="" :src="item.imgurl" alt="item.imgurl">
- <span class="">{{ item.title }}</span>
- </NuxtLink>
- </div>
- </div>
- </div>
- <!-- 广告 2-->
- <HomeAdvertising :imgurl="adImg2"></HomeAdvertising>
- <section class="channel_4 clearfix phone_none">
- <div class="channel_1_box">
- <div class="channel_head_box clearfix" v-if="pageData.length > 5">
- <div class="channel_head_box_left">
- <div class="channel_head_left_a_btn">
- <NuxtLink class="channel_head_left_a channel_head_left_a_only"
- :href="getLinkPath(pageData[5])" v-if="pageData[5]" :title="pageData[5].alias">
- {{ pageData[5].alias }}
- </NuxtLink>
- </div>
- </div>
- <div class="channel_head_box_right">
- <!-- <NuxtLink class="channel_head_box_right_1_a" :href="getLinkPath(pageData[5])"
- v-if="pageData[5]" :title="pageData[5].alias">
- 栏目简介
- </NuxtLink> -->
- </div>
- </div>
- <div class=" clearfix" v-if="pageData.length > 5">
- <div class="channel_3_box clearfix">
- <div class="channel_img_ul_3_ul boxheight2">
- <div class="channel_img_ul_3_li" v-if="pageData[5]">
- <NuxtLink class="channel_img_ul_3_li_a" :href="getLinkPathDetail(item)"
- :title="item.title" v-for="item in pageData[5].data" :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <img class="channel_img_ul_3_li_img" :src="item.imgurl" alt="item.title">
- <div class="channel_img_ul_3_li_dot1 dot1">
- {{ item.title }}
- </div>
- </NuxtLink>
- </div>
- </div>
- </div>
- <div class="channel_4_box clearfix">
- <div class="channel_ul_5 clearfix" v-if="pageData[5]">
- <NuxtLink class="channel_ul_5_a dot1" :href="getLinkPathDetail(item)"
- :title="item.title" v-for="item in pageData[5].data2" :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- {{ item.title }}
- </NuxtLink>
- </div>
- </div>
- </div>
- <div class="channel_head_box clearfix channel_head_box_2" v-if="pageData.length > 6">
- <div class="channel_head_box_left">
- <div class="channel_head_left_a_btn">
- <NuxtLink class="channel_head_left_a channel_head_left_a_only"
- :href="getLinkPath(pageData[6])" v-if="pageData[6]" :title="pageData[6].alias">
- {{ pageData[6].alias }}
- </NuxtLink>
- </div>
- </div>
- <div class="channel_head_box_right">
- <!-- <NuxtLink class="channel_head_box_right_1_a" :href="getLinkPath(pageData[6])"
- v-if="pageData[6]" :title="pageData[6].alias">
- 栏目简介
- </NuxtLink> -->
- </div>
- </div>
- <div class=" clearfix" v-if="pageData.length > 6">
-
- <div class="channel_3_box clearfix">
- <div class="channel_img_ul_4_ul">
- <div class="channel_img_ul_4_li" v-if="pageData[6]">
- <NuxtLink class="channel_img_ul_4_li_a" :href="getLinkPathDetail(item)"
- :title="item.title" v-for="item in pageData[6].data" :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <img class="channel_img_ul_4_li_img" :src="item.imgurl" alt="item.title">
- <div class="channel_img_ul_4_li_dot1 dot1">
- {{ item.title }}
- </div>
- </NuxtLink>
- </div>
- </div>
- </div>
- <div class="channel_4_box clearfix">
- <div class="channel_ul_6 clearfix" v-if="pageData[6]">
- <NuxtLink class="channel_ul_6_a dot1" :href="getLinkPathDetail(item)"
- :title="item.title" v-for="item in pageData[6].data2" :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- {{ item.title }}
- </NuxtLink>
- </div>
- </div>
- </div>
- </div>
- <div class="channel_2_box" v-if="pageData.length > 7">
- <div class="channel_head_box clearfix">
- <div class="channel_head_box_left">
- <div class="channel_head_left_a_btn">
- <NuxtLink class="channel_head_left_a channel_head_left_a_only"
- :href="getLinkPath(pageData[7])" v-if="pageData[7]" :title="pageData[7].alias">
- {{ pageData[7].alias }}
- </NuxtLink>
- </div>
- </div>
- <div class="channel_head_box_right">
- <!-- <NuxtLink class="channel_head_box_right_1_a" :href="getLinkPath(pageData[7])"
- v-if="pageData[7]" :title="pageData[7].alias">
- 栏目简介
- </NuxtLink> -->
- </div>
- </div>
- <div class="boxheight1 clearfix">
- <div class="channel_img_ul_5_ul">
- <div class="channel_img_ul_5_li" v-if="pageData[7]">
- <NuxtLink class="channel_img_ul_5_li_a" :href="getLinkPathDetail(item)"
- :title="item.title" v-for="item in pageData[7].data" :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <img class="channel_img_ul_5_li_img" :src="item.imgurl" alt="item.title">
- <div class="channel_img_ul_5_li_dot1 dot1">{{ item.title }}</div>
- </NuxtLink>
- </div>
- </div>
- <div class="index_ul_7 clearfix" v-if="pageData[7]">
- <NuxtLink class="index_ul_7_a dot1" :href="getLinkPathDetail(item)" :title="item.title"
- v-for="item in pageData[7].data2" :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- {{ item.title }}
- </NuxtLink>
- </div>
- </div>
- </div>
- </section>
-
- <!-- 11地方法规 phone-->
- <div class="phone_box_6 pc_none" v-if="pageData.length > 5">
- <div class="phone_box_6_head" v-if="pageData.length > 5">
- <NuxtLink class=""
- :href="getLinkPath(pageData[5])"
- v-if="pageData[5]">
- {{ pageData[5].alias }}
- </NuxtLink>
- </div>
- <div class="phone_box_6_img_ul">
- <div class="" v-if="pageData[5]">
- <NuxtLink class=""
- :href="getLinkPathDetail(item)"
- v-for="item in pageData[5].data"
- :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <img class="" :src="item.imgurl" alt="item.title">
- <span class="">
- {{ item.title }}
- </span>
- </NuxtLink>
- </div>
- </div>
- <div class="phone_box_6_ul">
- <div class="" v-if="pageData[5]">
- <NuxtLink class=""
- :href="getLinkPathDetail(item)"
- v-for="item in pageData[5].data2"
- :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- {{ item.title }}
-
- </NuxtLink>
- </div>
- </div>
- </div>
- <!-- 部委资讯 phone-->
- <div class="phone_box_7 pc_none" v-if="pageData.length > 6">
- <div class="phone_box_7_head">
- <NuxtLink class=""
- :href="getLinkPath(pageData[6])"
- v-if="pageData[6]" >
- {{ pageData[6].alias }}
- </NuxtLink>
- </div>
- <div class="phone_box_7_img_ul">
- <div class="" v-if="pageData[6]">
- <NuxtLink class=""
- :href="getLinkPathDetail(item)"
- v-for="item in pageData[6].data"
- :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <img class="" :src="item.imgurl" alt="item.title">
- <span class="">
- {{ item.title }}
- </span>
- </NuxtLink>
- </div>
- </div>
- <div class="phone_box_7_ul">
- <div class="" v-if="pageData[6]">
- <NuxtLink class=""
- :href="getLinkPathDetail(item)"
- v-for="item in pageData[6].data2"
- :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- {{ item.title }}
- </NuxtLink>
- </div>
- </div>
- </div>
- <!-- 法律法规 phone-->
- <div class="phone_box_8 pc_none" v-if="pageData.length > 7">
- <div class="phone_box_8_head">
- <NuxtLink class=""
- :href="getLinkPath(pageData[7])"
- v-if="pageData[7]" >
- {{ pageData[7].alias }}
- </NuxtLink>
- </div>
- <div class="phone_box_8_img_ul">
- <div class="" v-if="pageData[7]">
- <NuxtLink class=""
- :href="getLinkPathDetail(item)"
- v-for="item in pageData[7].data"
- :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- <img class="" :src="item.imgurl" alt="item.title">
- <span class="">{{ item.title }}</span>
- </NuxtLink>
- </div>
- </div>
- <div class="phone_box_8_ul">
- <div class="" v-if="pageData[7]">
- <NuxtLink class=""
- :href="getLinkPathDetail(item)"
- v-for="item in pageData[7].data2"
- :key="item.id"
- :target="item.islink == 1 ? '_blank' : '_self'">
- {{ item.title }}
- </NuxtLink>
- </div>
- </div>
- </div>
- </main>
- <!-- 页脚部分 -->
- <HomeFoot1></HomeFoot1>
- </div>
- </template>
- <script setup>
- //0.加载页面依赖 start ---------------------------------------->
- import { ref, onMounted } from 'vue';
- import { ElMessage } from 'element-plus';
- //0.加载页面依赖 end ---------------------------------------->
- //1.获得路由id start ---------------------------------------->
- const targetSegment = getRoutePath(1);
- //1.1 获得当前的路由id
- let routeId;
- //通过导航路径反向查询导航id
- const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
- method: 'GET',
- query: {
- 'pinyin': targetSegment,
- },
- });
- console.log('mkdataRouteId', getRouteId);
- if (getRouteId.code == 200) {
- routeId = getRouteId.data.category_id
- console.log('mkdataRouteId1111', routeId);
- } else {
- console.log("获得路由id出错!", getRouteId.message)
- }
- //1.获得路由id end ---------------------------------------->
- //2.选项卡 start ---------------------------------------->
- let showTabs = ref(1)
- let qhtabs = function (number) {
- console.log(number)
- showTabs.value = number
- }
- //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=nzgxw_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=nzgxw_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=nzgxw_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=nzgxw_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];
- })
- //3.广告 end ---------------------------------------->
- //4.页面数据 start ---------------------------------------->
- const pageData = ref([
- //示例:
- // {
- // id: 1,
- // title: "", //该导航的标题
- // data: [], //数据1
- // data1: [], //数据2
- // data2: [], //数据3
- // data3: [], //数据4
- // data4: [], //数据5
- // category_id1: "", //子导航id1
- // category_id2: "",
- // category_id3: "",
- // category_id4: "",
- // title1: "", //子导航标题1
- // title2: "",
- // title3: "",
- // title4: "",
- // cid: "" //该导航的id
- // },
- ])
- //4.1 获取所有导航
- try {
- const navigateData = await requestDataPromise('/web/getWebsiteModelCategory', {
- method: 'GET',
- query: {
- 'placeid': 1,
- 'pid': routeId,
- 'num': 20
- },
- });
- 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: ""
- };
- if (navigateData.data[index].is_url == 1) {
- // 处理 URL 的逻辑
- } else {
- //每个页面最多8个模块
- pageData.value.push(data);
- }
- }
- console.log("mkdata导航池加载完毕", pageData.value);
- //导航池加载完毕,开始申请模块数据
- let getJson = [
- // { "parent": routeId + ",0,0", "child": pageData.value[0].cid + ",4,9" },//模块1 顶部没有标题的那个
- // { "parent": routeId + ",0,0", "child": pageData.value[1].cid + ",3,11" },//模块2
- // { "parent": routeId + ",0,0", "child": pageData.value[2].cid + ",2,7" },//模块3
- // { "parent": routeId + ",0,0", "child": pageData.value[3].cid + ",0,8" },//模块4
- // { "parent": routeId + ",0,0", "child": pageData.value[4].cid + ",1,0" },//模块5
- // { "parent": routeId + ",0,0", "child": pageData.value[5].cid + ",1,6" },//模块6
- // { "parent": routeId + ",0,0", "child": pageData.value[6].cid + ",1,6" },//模块7
- // { "parent": routeId + ",0,0", "child": pageData.value[7].cid + ",1,7" },//模块8
- ]
- for (let i = 0; i < pageData.value.length; i++) {
- if (i == 0) {
- getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[i].cid + ",4,9" });//模块1
- } else if (i == 1) {
- getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[i].cid + ",3,11" });//模块2
- } else if (i == 2) {
- getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[i].cid + ",2,7" });//模块3
- } else if (i == 3) {
- getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[i].cid + ",0,8" });//模块4
- } else if (i == 4) {
- getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[i].cid + ",1,0" });//模块5
- } else if (i == 5) {
- getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[i].cid + ",1,6" });//模块6
- } else if (i == 6) {
- getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[i].cid + ",1,6" });//模块7
- } else if (i == 7) {
- getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[i].cid + ",1,7" });//模块8
- }
- }
- let jsonString = JSON.stringify(getJson);
- console.log('mkdatajsonString', jsonString);
- getPageAllData(jsonString);
- } else {
- console.log("错误:渲染8个模块环节出错,请检查是否存在没有数据的模块!")
- }
- } catch (error) {
- console.log("错误:导航池渲染执行接口出错!请检查频道页渲染的模块数据是否完整!")
- }
- async function getPageAllData(jsonString) {
- const mkdata = await requestDataPromise('/web/getWebsiteAllArticle', {
- method: 'GET',
- query: {
- 'id': jsonString
- },
- });
- console.log('mkdata', mkdata.data);
- if (mkdata.code == 200) {
- if (mkdata.data.length > 0) {
- //模块1 顶部大图和列表
- pageData.value[0].data = mkdata.data[0].child.imgnum;
- pageData.value[0].data2 = mkdata.data[0].child.textnum;
- }
- if (mkdata.data.length > 1) {
- //模块2
- pageData.value[1].data3 = mkdata.data[1].child.textnum;
- for (let index in mkdata.data[1].child.imgnum) {
- if (index < 1) {
- pageData.value[1].data.push(mkdata.data[1].child.imgnum[index]);
- } else {
- pageData.value[1].data2.push(mkdata.data[1].child.imgnum[index]);
- }
- }
- }
- if (mkdata.data.length > 2) {
- //模块3
- pageData.value[2].data = mkdata.data[2].child.imgnum;
- pageData.value[2].data2 = mkdata.data[2].child.textnum;
- }
- if (mkdata.data.length > 3) {
- //模块4
- pageData.value[3].data = mkdata.data[3].child.imgnum;
- pageData.value[3].data2 = mkdata.data[3].child.textnum;
- }
- if (mkdata.data.length > 4) {
- //模块5
- pageData.value[4].data = mkdata.data[4].child.imgnum;
- }
- if (mkdata.data.length > 5) {
- //模块6
- pageData.value[5].data = mkdata.data[5].child.imgnum;
- pageData.value[5].data2 = mkdata.data[5].child.textnum;
- }
- if (mkdata.data.length > 6) {
- //模块7
- pageData.value[6].data = mkdata.data[6].child.imgnum;
- pageData.value[6].data2 = mkdata.data[6].child.textnum;
- }
- if (mkdata.data.length > 7) {
- //模块8
- pageData.value[7].data = mkdata.data[7].child.imgnum;
- pageData.value[7].data2 = mkdata.data[7].child.textnum;
- }
- } else {
- ElMessage.error(mkdata.message)
- }
- }
- //4.页面数据 end ---------------------------------------->
- //5.设置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: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
- { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
- { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no',tagPriority: 10 }
- ]
- });
- } else {
- console.log("设置频道页SEO出错!", setData.message)
- }
- //5.设置seo信息 end---------------------------------------->
- </script>
- <style lang="less" scoped>
- @import '@/assets/css/class.less';
- </style>
- <style lang="less" scoped>
-
- @media screen and (min-width:801px){/*pc*/
-
-
- .pc_none{display:none;}
- }
- @media screen and (max-width:800px){/*ipad_phone*/
- .index_main{width:100%;}
- .index_main:nth-of-type(2){margin-bottom:29px;}
- .channel_1_box{width:100%;overflow:hidden;float:none;}
- .channel_1{margin-top:0px;}
-
- .phone_box_1{
- width:92%;margin:0px auto 0px;
-
- .phone_box_1_ul{
- overflow:hidden;height:123px;margin-top:15px;
- >div{width:100%;height:100%;}
- a{
- width:100%!important;display:block;height:40px;line-height:40px;
- border-bottom:1px solid #E6E6E6;display:block;position:relative;
- word-break: keep-all; white-space: nowrap;overflow:hidden;text-overflow:ellipsis;
- font-size:16px;color:#333;text-indent:18px;
- }
- a::after{
- content: '';display: block;
- position:absolute;left:0px;top:18px;background:#E6E6E6;
- width:6px;height:6px;
- }
- a:nth-of-type(n+4){display:none;}
- }
- }
-
- .phone_box_2{
- width:92%;margin:0px auto 0px;
- .phone_box_2_head{
- height:50px;line-height:50px;
- background:#fff;border-bottom:1px solid #E6E6E6;
- margin-top:15px;width:100%;
-
- a{
- float:left;height:50px;line-height:50px;margin:0;position:relative;
- color:#a91b33;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:15px;
- background:#a91b33;
- width:3px;height:20px;
- }
-
- }
-
- .phone_box_2_img_ul{
- height:55vw;overflow:hidden;margin-top:15px;
- div{width:100%;float:none;height:55vw;border-radius:10px;position:relative;overflow:hidden;}
- a{display:block;width:100%;height:100%;}
- img{display:block;width:100%;height:100%;}
- span{
- position:absolute;width:100%;height:66px;line-height:90px;color:#fff; font-size:16px;
- left:0px;bottom:0px;padding:0px 5%;box-sizing:border-box; display:block;
- background:linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .5));
- word-break: keep-all; white-space: nowrap;overflow:hidden;text-overflow:ellipsis;
- }
- >div:nth-of-type(n+2){display:none;}
- }
- .phone_box_2_ul{
- overflow:hidden;height:123px;margin-top:15px;
- >div{width:100%;height:100%;}
- a{
- width:100%!important;display:block;height:40px;line-height:40px;
- border-bottom:1px solid #E6E6E6;display:block;position:relative;
- word-break: keep-all; white-space: nowrap;overflow:hidden;text-overflow:ellipsis;
- font-size:16px;color:#333;text-indent:18px;
- }
- a::after{
- content: '';display: block;
- position:absolute;left:0px;top:18px;background:#E6E6E6;
- width:6px;height:6px;
- }
- a:nth-of-type(n+4){display:none;}
- }
- }
- .phone_box_3{
- width:92%;margin:0px auto 0px;
- .phone_box_3_head{
- height:50px;line-height:50px;
- background:#fff;border-bottom:1px solid #E6E6E6;
- margin-top:15px;width:100%;
-
- a{
- float:left;height:50px;line-height:50px;margin:0;position:relative;
- color:#a91b33;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:15px;
- background:#a91b33;
- width:3px;height:20px;
- }
-
- }
-
- .phone_box_3_img_ul{
- height:55vw;overflow:hidden;margin-top:15px;
- div{width:100%;float:none;height:55vw;border-radius:10px;position:relative;overflow:hidden;}
- a{display:block;width:100%;height:100%;}
- img{display:block;width:100%;height:100%;}
- span{
- position:absolute;width:100%;height:66px;line-height:90px;color:#fff; font-size:16px;
- left:0px;bottom:0px;padding:0px 5%;box-sizing:border-box; display:block;
- background:linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .5));
- word-break: keep-all; white-space: nowrap;overflow:hidden;text-overflow:ellipsis;
- }
- >div:nth-of-type(n+2){display:none;}
- }
- .phone_box_3_ul{
- overflow:hidden;height:123px;margin-top:15px;
- >div{width:100%;height:100%;}
- a{
- width:100%!important;display:block;height:40px;line-height:40px;
- border-bottom:1px solid #E6E6E6;display:block;position:relative;
- word-break: keep-all; white-space: nowrap;overflow:hidden;text-overflow:ellipsis;
- font-size:16px;color:#333;text-indent:18px;
- }
- a::after{
- content: '';display: block;
- position:absolute;left:0px;top:18px;background:#E6E6E6;
- width:6px;height:6px;
- }
- a:nth-of-type(n+4){display:none;}
- }
- }
-
- .phone_box_4{
- width:92%;margin:0px auto 0px;
- .phone_box_4_head{
- height:50px;line-height:50px;
- background:#fff;border-bottom:1px solid #E6E6E6;
- margin-top:15px;width:100%;
-
- a{
- float:left;height:50px;line-height:50px;margin:0;position:relative;
- color:#a91b33;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:15px;
- background:#a91b33;
- width:3px;height:20px;
- }
-
- }
- .phone_box_4_ul{
- overflow:hidden;height:123px;margin-top:8px;
- >div{width:100%;height:100%;}
- a{
- width:100%!important;display:block;height:40px;line-height:40px;
- border-bottom:1px solid #E6E6E6;display:block;position:relative;
- word-break: keep-all; white-space: nowrap;overflow:hidden;text-overflow:ellipsis;
- font-size:16px;color:#333;text-indent:18px;
- }
- a::after{
- content: '';display: block;
- position:absolute;left:0px;top:18px;background:#E6E6E6;
- width:6px;height:6px;
- }
- a:nth-of-type(n+4){display:none;}
- }
- }
-
- .phone_box_5{
- width:92%;margin:0px auto 0px;
- .phone_box_5_head{
- height:50px;line-height:50px;
- background:#fff;border-bottom:1px solid #E6E6E6;
- margin-top:15px;width:100%;
-
- a{
- float:left;height:50px;line-height:50px;margin:0;position:relative;
- color:#a91b33;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:15px;
- background:#a91b33;
- width:3px;height:20px;
- }
-
- }
-
- .phone_box_5_img_ul{
- height:55vw;overflow:hidden;margin-top:15px;
- div{width:100%;float:none;height:55vw;border-radius:10px;position:relative;overflow:hidden;}
- a{display:block;width:100%;height:100%;}
- img{display:block;width:100%;height:100%;}
- span{
- position:absolute;width:100%;height:66px;line-height:90px;color:#fff; font-size:16px;
- left:0px;bottom:0px;padding:0px 5%;box-sizing:border-box; display:block;
- background:linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .5));
- word-break: keep-all; white-space: nowrap;overflow:hidden;text-overflow:ellipsis;
- }
- >div:nth-of-type(n+2){display:none;}
- }
-
- }
- .phone_box_6{
- width:92%;margin:0px auto 0px;
- .phone_box_6_head{
- height:50px;line-height:50px;
- background:#fff;border-bottom:1px solid #E6E6E6;
- margin-top:15px;width:100%;
-
- a{
- float:left;height:50px;line-height:50px;margin:0;position:relative;
- color:#a91b33;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:15px;
- background:#a91b33;
- width:3px;height:20px;
- }
-
- }
-
- .phone_box_6_img_ul{
- height:55vw;overflow:hidden;margin-top:15px;
- div{width:100%;float:none;height:55vw;border-radius:10px;position:relative;overflow:hidden;}
- a{display:block;width:100%;height:100%;}
- img{display:block;width:100%;height:100%;}
- span{
- position:absolute;width:100%;height:66px;line-height:90px;color:#fff; font-size:16px;
- left:0px;bottom:0px;padding:0px 5%;box-sizing:border-box; display:block;
- background:linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .5));
- word-break: keep-all; white-space: nowrap;overflow:hidden;text-overflow:ellipsis;
- }
- >div:nth-of-type(n+2){display:none;}
- }
- .phone_box_6_ul{
- overflow:hidden;height:123px;margin-top:15px;
- >div{width:100%;height:100%;}
- a{
- width:100%!important;display:block;height:40px;line-height:40px;
- border-bottom:1px solid #E6E6E6;display:block;position:relative;
- word-break: keep-all; white-space: nowrap;overflow:hidden;text-overflow:ellipsis;
- font-size:16px;color:#333;text-indent:18px;
- }
- a::after{
- content: '';display: block;
- position:absolute;left:0px;top:18px;background:#E6E6E6;
- width:6px;height:6px;
- }
- a:nth-of-type(n+4){display:none;}
- }
- }
- .phone_box_7{
- width:92%;margin:0px auto 0px;
- .phone_box_7_head{
- height:50px;line-height:50px;
- background:#fff;border-bottom:1px solid #E6E6E6;
- margin-top:15px;width:100%;
-
- a{
- float:left;height:50px;line-height:50px;margin:0;position:relative;
- color:#a91b33;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:15px;
- background:#a91b33;
- width:3px;height:20px;
- }
-
- }
-
- .phone_box_7_img_ul{
- height:55vw;overflow:hidden;margin-top:15px;
- div{width:100%;float:none;height:55vw;border-radius:10px;position:relative;overflow:hidden;}
- a{display:block;width:100%;height:100%;}
- img{display:block;width:100%;height:100%;}
- span{
- position:absolute;width:100%;height:66px;line-height:90px;color:#fff; font-size:16px;
- left:0px;bottom:0px;padding:0px 5%;box-sizing:border-box; display:block;
- background:linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .5));
- word-break: keep-all; white-space: nowrap;overflow:hidden;text-overflow:ellipsis;
- }
- >div:nth-of-type(n+2){display:none;}
- }
- .phone_box_7_ul{
- overflow:hidden;height:123px;margin-top:15px;
- >div{width:100%;height:100%;}
- a{
- width:100%!important;display:block;height:40px;line-height:40px;
- border-bottom:1px solid #E6E6E6;display:block;position:relative;
- word-break: keep-all; white-space: nowrap;overflow:hidden;text-overflow:ellipsis;
- font-size:16px;color:#333;text-indent:18px;
- }
- a::after{
- content: '';display: block;
- position:absolute;left:0px;top:18px;background:#E6E6E6;
- width:6px;height:6px;
- }
- a:nth-of-type(n+4){display:none;}
- }
- }
- .phone_box_8{
- width:92%;margin:0px auto 0px;
- .phone_box_8_head{
- height:50px;line-height:50px;
- background:#fff;border-bottom:1px solid #E6E6E6;
- margin-top:15px;width:100%;
-
- a{
- float:left;height:50px;line-height:50px;margin:0;position:relative;
- color:#a91b33;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:15px;
- background:#a91b33;
- width:3px;height:20px;
- }
-
- }
-
- .phone_box_8_img_ul{
- height:55vw;overflow:hidden;margin-top:15px;
- div{width:100%;float:none;height:55vw;border-radius:10px;position:relative;overflow:hidden;}
- a{display:block;width:100%;height:100%;}
- img{display:block;width:100%;height:100%;}
- span{
- position:absolute;width:100%;height:66px;line-height:90px;color:#fff; font-size:16px;
- left:0px;bottom:0px;padding:0px 5%;box-sizing:border-box; display:block;
- background:linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .5));
- word-break: keep-all; white-space: nowrap;overflow:hidden;text-overflow:ellipsis;
- }
- >div:nth-of-type(n+2){display:none;}
- }
- .phone_box_8_ul{
- overflow:hidden;height:123px;margin:15px auto 0;
- >div{width:100%;height:100%;}
- a{
- width:100%!important;display:block;height:40px;line-height:40px;
- border-bottom:1px solid #E6E6E6;display:block;position:relative;
- word-break: keep-all; white-space: nowrap;overflow:hidden;text-overflow:ellipsis;
- font-size:16px;color:#333;text-indent:18px;
- }
- a::after{
- content: '';display: block;
- position:absolute;left:0px;top:18px;background:#E6E6E6;
- width:6px;height:6px;
- }
- a:nth-of-type(n+4){display:none;}
- }
- }
- .phone_none{display:none;}
- }
- </style>
|