pageNavigation.vue 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151
  1. <template>
  2. <div class="headerNavBox">
  3. <NuxtLink to="/list-renyuanchaxun.html">人员查询</NuxtLink>
  4. <NuxtLink to="/list-cheliangchaxun.html">车辆查询</NuxtLink>
  5. <NuxtLink to="/list-dishizhongxin.html">地市中心</NuxtLink>
  6. <NuxtLink to="/list-diaoyanxuanti.html">调研选题</NuxtLink>
  7. <NuxtLink to="/list-jieshaoxinchaxun.html">介绍信查询</NuxtLink>
  8. </div>
  9. <div class="headerNav-pc">
  10. <!-- <div class="headerNavMainBox" :class="{'headerNavMainBox_fixed':isFixed}" ref="navRef"> -->
  11. <div class="headerNavMainBox" >
  12. <div class="headerNavTop">
  13. <div class="first"><NuxtLink to="/" class="inner-link">首页</NuxtLink></div>
  14. <ul>
  15. <li><NuxtLink to="/sannongkejiao/nongcunjiaoyu/list-1.html">法制资讯</NuxtLink></li>
  16. <li><NuxtLink to="/sannongzixunzhifuxinxi/list-1.html">政策法规</NuxtLink></li>
  17. <li><NuxtLink to="/">各地动态</NuxtLink></li>
  18. <li><NuxtLink to="/">廉政时讯</NuxtLink></li>
  19. <li><NuxtLink to="/">政策解读</NuxtLink></li>
  20. <li><NuxtLink to="/">百家争鸣</NuxtLink></li>
  21. <li><NuxtLink to="/">经济与法</NuxtLink></li>
  22. <li><NuxtLink to="/">法治建设</NuxtLink></li>
  23. <li><NuxtLink to="/">法纪通报</NuxtLink></li>
  24. <li><NuxtLink to="/">社会调研</NuxtLink></li>
  25. <li><NuxtLink to="/">法制文化</NuxtLink></li>
  26. <li><NuxtLink to="/">特别关注</NuxtLink></li>
  27. <li><NuxtLink to="/">媒体视点</NuxtLink></li>
  28. <li><NuxtLink to="/">重点播报</NuxtLink></li>
  29. <li><NuxtLink to="/">今日说法</NuxtLink></li>
  30. <li><NuxtLink to="/">法制技术</NuxtLink></li>
  31. <li><NuxtLink to="/">执法在线</NuxtLink></li>
  32. <li><NuxtLink to="/">举报投诉</NuxtLink></li>
  33. <li><NuxtLink to="/">法制观察</NuxtLink></li>
  34. <li><NuxtLink to="/">典型案例</NuxtLink></li>
  35. <li><NuxtLink to="/">百姓话题</NuxtLink></li>
  36. <li><NuxtLink to="/">法制活动</NuxtLink></li>
  37. <li><NuxtLink to="/">百姓话题</NuxtLink></li>
  38. <li><NuxtLink to="/">法制活动</NuxtLink></li>
  39. </ul>
  40. </div>
  41. <div class="headerNavCenter">
  42. <div class="first"><NuxtLink to="/">互动</NuxtLink></div>
  43. <ul>
  44. <li><NuxtLink to="http://zwptfz.znxyw.org.cn/?s=ldxx&amp;web_name=全国法制资讯发布中心&amp;web_url=fzxfb.org.cn" target="_blank">领导信箱</NuxtLink></li>
  45. <li><NuxtLink to="http://zwptfz.znxyw.org.cn/?s=jbts&amp;web_name=全国法制资讯发布中心&amp;web_url=fzxfb.org.cn" target="_blank">投诉举报</NuxtLink></li>
  46. <li><NuxtLink to="http://zwptfz.znxyw.org.cn/?s=wszw&amp;web_name=全国法制资讯发布中心&amp;web_url=fzxfb.org.cn" target="_blank">网上政务</NuxtLink></li>
  47. <li><NuxtLink to="/">志愿服务</NuxtLink></li>
  48. <li><NuxtLink to="/">公益活动</NuxtLink></li>
  49. <li><NuxtLink to="/">在线服务</NuxtLink></li>
  50. <li><NuxtLink to="/">网民留言</NuxtLink></li>
  51. <li><NuxtLink to="/">法制知识</NuxtLink></li>
  52. <li><NuxtLink to="/">法律咨询</NuxtLink></li>
  53. <li><NuxtLink to="/">通知公告</NuxtLink></li>
  54. <li><NuxtLink to="/">官网导航</NuxtLink></li>
  55. <li><NuxtLink to="/">法律咨询</NuxtLink></li>
  56. <li><NuxtLink to="/">通知公告</NuxtLink></li>
  57. <li><NuxtLink to="/">官网导航</NuxtLink></li>
  58. </ul>
  59. </div>
  60. <div class="headerNavBottom">
  61. <div class="first"><NuxtLink to="/">查询</NuxtLink></div>
  62. <ul>
  63. <li><NuxtLink to="/">人员查询</NuxtLink></li>
  64. <li><NuxtLink to="/">车辆查询</NuxtLink></li>
  65. <li><NuxtLink to="/">地市中心</NuxtLink></li>
  66. <li><NuxtLink to="/">调研选题</NuxtLink></li>
  67. <li><NuxtLink to="/">介绍信查询</NuxtLink></li>
  68. <li><NuxtLink to="/">核心网站</NuxtLink></li>
  69. <li><NuxtLink to="/">政务百网</NuxtLink></li>
  70. <li><NuxtLink to="/">行业百网</NuxtLink></li>
  71. <li><NuxtLink to="/">规章制度</NuxtLink></li>
  72. <li><NuxtLink to="/">申请加入</NuxtLink></li>
  73. <li><NuxtLink to="/">项目官网</NuxtLink></li>
  74. <li><NuxtLink to="/">项目官网</NuxtLink></li>
  75. </ul>
  76. </div>
  77. </div>
  78. </div>
  79. <div class="headerNavBox-mobile">
  80. <div class="headerNavBox-mobile-welcome">
  81. 欢迎来到全国法制资讯发布中心!
  82. </div>
  83. <div class="headerNavBox-mobile-btn">
  84. 首页
  85. <img src="@/public/index/btn.png" alt="" @click="openTopMenu = 2">
  86. </div>
  87. <div v-if="openTopMenu == 2" class="headerNavBox-mobile-menu">
  88. <div>
  89. <div class="headerNavBox-mobile-menu-list">
  90. <NuxtLink to="/" target="_blank">用户登录</NuxtLink>
  91. </div>
  92. <div class="headerNavBox-mobile-menu-list">
  93. <NuxtLink to="/sannongkejiao/nongcunjiaoyu/list-1.html">法制资讯</NuxtLink>
  94. <NuxtLink to="/sannongzixunzhifuxinxi/list-1.html">政策法规</NuxtLink>
  95. <NuxtLink to="/">各地动态</NuxtLink>
  96. <NuxtLink to="/">廉政时讯</NuxtLink>
  97. <NuxtLink to="/">政策解读</NuxtLink>
  98. <NuxtLink to="/">百家争鸣</NuxtLink>
  99. <NuxtLink to="/">经济与法</NuxtLink>
  100. <NuxtLink to="/">法治建设</NuxtLink>
  101. <NuxtLink to="/">法纪通报</NuxtLink>
  102. <NuxtLink to="/">社会调研</NuxtLink>
  103. <NuxtLink to="/">法制文化</NuxtLink>
  104. <NuxtLink to="/">特别关注</NuxtLink>
  105. <NuxtLink to="/">媒体视点</NuxtLink>
  106. <NuxtLink to="/">重点播报</NuxtLink>
  107. <NuxtLink to="/">今日说法</NuxtLink>
  108. <NuxtLink to="/">法制技术</NuxtLink>
  109. <NuxtLink to="/">执法在线</NuxtLink>
  110. <NuxtLink to="/">举报投诉</NuxtLink>
  111. <NuxtLink to="/">法制观察</NuxtLink>
  112. <NuxtLink to="/">典型案例</NuxtLink>
  113. <NuxtLink to="/">百姓话题</NuxtLink>
  114. <NuxtLink to="/">法制活动</NuxtLink>
  115. </div>
  116. <div class="headerNavBox-mobile-menu-list">
  117. <NuxtLink to="http://zwptfz.znxyw.org.cn/?s=ldxx&amp;web_name=全国法制资讯发布中心&amp;web_url=fzxfb.org.cn" target="_blank">领导信箱</NuxtLink>
  118. <NuxtLink to="http://zwptfz.znxyw.org.cn/?s=jbts&amp;web_name=全国法制资讯发布中心&amp;web_url=fzxfb.org.cn" target="_blank">投诉举报</NuxtLink>
  119. <NuxtLink to="http://zwptfz.znxyw.org.cn/?s=wszw&amp;web_name=全国法制资讯发布中心&amp;web_url=fzxfb.org.cn" target="_blank">网上政务</NuxtLink>
  120. <NuxtLink to="/">志愿服务</NuxtLink>
  121. <NuxtLink to="/">公益活动</NuxtLink>
  122. <NuxtLink to="/">在线服务</NuxtLink>
  123. <NuxtLink to="/">网民留言</NuxtLink>
  124. <NuxtLink to="/">法制知识</NuxtLink>
  125. <NuxtLink to="/">法律咨询</NuxtLink>
  126. <NuxtLink to="/">通知公告</NuxtLink>
  127. <NuxtLink to="/">官网导航</NuxtLink>
  128. </div>
  129. <div class="headerNavBox-mobile-menu-list">
  130. <NuxtLink to="/">人员查询</NuxtLink>
  131. <NuxtLink to="/">车辆查询</NuxtLink>
  132. <NuxtLink to="/">地市中心</NuxtLink>
  133. <NuxtLink to="/">调研选题</NuxtLink>
  134. <NuxtLink to="/">介绍信查询</NuxtLink>
  135. <NuxtLink to="/">核心网站</NuxtLink>
  136. <NuxtLink to="/">政务百网</NuxtLink>
  137. <NuxtLink to="/">行业百网</NuxtLink>
  138. <NuxtLink to="/">规章制度</NuxtLink>
  139. <NuxtLink to="/">申请加入</NuxtLink>
  140. <NuxtLink to="/">项目官网</NuxtLink>
  141. </div>
  142. </div>
  143. <div class="headerNavBox-mobile-menu-button">
  144. <img src="@/public/index/no.png" alt="" @click="openTopMenu = 1">
  145. </div>
  146. </div>
  147. </div>
  148. </template>
  149. <script setup>
  150. //1.加载依赖 start ---------------------------------------->
  151. import { ElMessage } from 'element-plus'
  152. import { ref, onMounted } from 'vue';
  153. import { ElSelect, ElOption } from 'element-plus'
  154. import { useRoute } from 'vue-router';
  155. const showZonePanel = ref(false)
  156. const nuxtApp = useNuxtApp();
  157. const axios = nuxtApp.$axios;
  158. const route = useRoute();
  159. const routeId = route.params.id; //获得该页面的id
  160. //1.加载依赖 end ---------------------------------------->
  161. //1.导航滚动 start ---------------------------------------->
  162. // const isFixed=ref(false);
  163. // const navRef=ref(null);
  164. // let navOffsetTop=0;
  165. // const handleScroll=()=>{
  166. // isFixed.value=window.scrollY>=navOffsetTop
  167. // };
  168. // onMounted(()=>{
  169. // navOffsetTop=navRef.value.navOffsetTop;
  170. // window.addEventListener('scroll',handleScroll)
  171. // });
  172. // onUnmounted(()=>{
  173. // window.removeEventListener('scroll',handleScroll)
  174. // });
  175. //1.导航滚动 end ---------------------------------------->
  176. //2.加载模块数据 start ---------------------------------------->
  177. // const navigation1 = ref("");
  178. const navigation1 = useState('globalNavData', () => ([]))
  179. async function getPageData2() {
  180. const mkdata = await requestDataPromise('/web/getWebsiteModelCategory', {
  181. method: 'GET',
  182. query: {
  183. 'placeid': 1,
  184. 'pid': 0,
  185. 'num': 35
  186. },
  187. });
  188. navigation1.value = mkdata.data;
  189. }
  190. getPageData2();
  191. const getLinkPath = (item) => {
  192. if (item.is_url == 1) {
  193. return `${item.web_url}`;
  194. } else if (item.children_count == 0) {
  195. return `/${item.aLIas_pinyin}/list-1.html`;
  196. } else {
  197. return `/${item.aLIas_pinyin}/index.html`;
  198. }
  199. }
  200. //2.加载模块数据 end ---------------------------------------->
  201. //3.职能部门 start ---------------------------------------->
  202. let department = ref("")
  203. const depValue = ref("")
  204. const typeValue = ref("")
  205. //3.职能部门 end ---------------------------------------->
  206. //4.展示行政区划 start ---------------------------------------->
  207. //let areaList = ref("")
  208. //4.1 省
  209. let province = ref("")
  210. let provinceid = ref("")
  211. let provinceList = ref("")
  212. //4.2 市
  213. let city = ref("")
  214. let cityid = ref("")
  215. let cityList = ref("")
  216. //4.3 县
  217. let region = ref("")
  218. let regionid = ref("")
  219. let regionList = ref("")
  220. //选择市
  221. let change = async (id) => {
  222. provinceid.value = id;
  223. const shengData = await requestDataPromise('/web/selectWebsiteArea', {
  224. method: 'GET',
  225. query: {
  226. 'pid': id,
  227. },
  228. });
  229. cityList.value = shengData.data;
  230. regionList.value = [];// 清空县
  231. }
  232. //选择县
  233. let change1 = async (id) => {
  234. cityid.value = id;
  235. const xianData = await requestDataPromise('/web/selectWebsiteArea', {
  236. method: 'GET',
  237. query: {
  238. 'pid': id,
  239. },
  240. });
  241. regionList.value = xianData.data;
  242. }
  243. let change2 = async (id) => {
  244. regionid.value = id;
  245. }
  246. //4.展示行政区划 end ---------------------------------------->
  247. //5.执行搜索 start ---------------------------------------->
  248. const getcityid = ref("")
  249. //获得cityid和11
  250. let goToPrimary = async () => {
  251. if (province.value != "") { getcityid.value = province.value }
  252. if (city.value != "") { getcityid.value = city.value }
  253. if (region.value != "") { getcityid.value = region.value }
  254. console.log("getcityid.value=======",getcityid.value)
  255. if (province.value == "" && city.value == "" && region.value == "" && depValue.value == "") {
  256. ElMessage.error('请选择行政区划或者职能部门!')
  257. } else {
  258. const route = `/search/search?catids=${getcityid.value}&department_id=${depValue.value}`;
  259. window.location.href = route;
  260. }
  261. }
  262. const close_panel_fun = () => {
  263. foot_btn_clear_fun();
  264. showZonePanel.value = false;
  265. }
  266. const foot_btn_clear_fun = () => {
  267. regionList.value = [];// 清空县
  268. region.value = "";// 清空县 名称
  269. city.value = "";// 清空市 名称
  270. cityList.value = [];// 清空市
  271. province.value = "";// 清空省 名称
  272. provinceid.value = "";// 清空省 id
  273. }
  274. let shake_bool = true // 声明在组件作用域顶部==防抖
  275. const nav_department_drop_a_fun = (departmentId) => {
  276. if(shake_bool===true){//第1次点击
  277. shake_bool = false;
  278. depValue.value = departmentId;
  279. goToPrimary();
  280. // 行政职能查询
  281. ElMessage({
  282. message: '页面跳转中请稍等',
  283. type: 'success'
  284. });
  285. nav_department_drop_a_fun.timer = setTimeout(() => {
  286. shake_bool = true;
  287. }, 3333);
  288. }else{
  289. ElMessage({
  290. message: '请勿重复点击',
  291. type: 'warning'
  292. });
  293. }
  294. }
  295. //5.执行搜索 end ---------------------------------------->
  296. onMounted(async () => {
  297. //从客户端获取行政职能部门 加快打开速度
  298. try {
  299. const { $webUrl, $CwebUrl } = useNuxtApp();
  300. const response = await fetch($webUrl + '/web/selectWebsiteDepartment', {
  301. headers: {
  302. 'Content-Type': 'application/json',
  303. 'Userurl': $CwebUrl,
  304. 'Origin': $CwebUrl
  305. }
  306. });
  307. const result = await response.json();
  308. department.value = result.data;
  309. } catch (error) {
  310. console.error('获取部门数据失败:', error);
  311. }
  312. //从客户端获取行政区划
  313. try {
  314. const { $webUrl, $CwebUrl } = useNuxtApp();
  315. const response2 = await fetch($webUrl + '/web/selectWebsiteArea', {
  316. headers: {
  317. 'Content-Type': 'application/json',
  318. 'Userurl': $CwebUrl,
  319. 'Origin': $CwebUrl
  320. }
  321. });
  322. const result2 = await response2.json();
  323. provinceList.value = result2.data;
  324. } catch (error) {
  325. console.error('获取行政区划数据失败:', error);
  326. }
  327. const targetElement = document.querySelector('.pc_none li .router-link-exact-active');
  328. const parentElement = document.querySelector('.nav_in');
  329. if (targetElement && parentElement) {
  330. const targetRect = targetElement.getBoundingClientRect();
  331. const parentRect = parentElement.getBoundingClientRect();
  332. const distanceToParentLeft = targetRect.left - parentRect.left;
  333. const navigationElement = document.querySelector('.partOne .navigationOne');
  334. if (navigationElement) {
  335. navigationElement.scrollLeft = distanceToParentLeft - 66;
  336. }
  337. }
  338. })
  339. //打开顶部菜单 start ---------------------------------------->
  340. const openTopMenu = ref(1)
  341. //打开顶部菜单 end ---------------------------------------->
  342. </script>
  343. <style lang="less" scoped>
  344. //自适应 start ---------------------------------------->
  345. @media screen and (min-width: 1401px) {
  346. .headerNavBox-mobile {
  347. display: none;
  348. }
  349. .headerNav-pc {
  350. position: sticky;
  351. top: 0;
  352. z-index: 1000;
  353. width: 100%;
  354. // background-color: #fff;
  355. }
  356. .headerNavBox {
  357. text-align: center;
  358. a{
  359. display: inline-block;
  360. overflow: hidden;
  361. width: 100PX !important;
  362. margin: 0 10PX !important;
  363. height: 40PX;
  364. line-height: 40PX !important;
  365. background: url(public/image/navBox.png);
  366. background-size: 100% 100%;
  367. text-align: center;
  368. font-size: 18PX !important;
  369. color: #fff;
  370. }
  371. /*a {
  372. width: 100PX !important;
  373. margin: 0 10PX !important;
  374. display: inline-block;
  375. height: 40PX !important;
  376. line-height: 40PX !important;
  377. background: #158d91;
  378. text-align: center;
  379. font-size: 18PX !important;
  380. color: #fff;
  381. }*/
  382. }
  383. .headerNavMainBox {
  384. max-width: 1401PX !important;
  385. width: 100%;
  386. overflow: hidden;
  387. margin: 20px auto 0;
  388. background-color: transparent;
  389. // background: #fff;
  390. .headerNavTop {
  391. width: 100%;
  392. overflow: hidden;
  393. background-color: transparent;
  394. //background: #158d91;
  395. display: flex;
  396. align-items: center;
  397. justify-content: space-between;
  398. .first {
  399. padding: 0px;
  400. background: #DEB887;
  401. width: 2%;
  402. height: 70PX !important;
  403. line-height: 34PX !important;
  404. overflow: hidden;
  405. float: left;
  406. text-align: center;
  407. a {
  408. display:block;
  409. width:100%;
  410. height:100%;
  411. font-size: 16PX !important;
  412. color: #fff;
  413. font-weight: normal;
  414. }
  415. a:hover {
  416. background: rgb(90, 128, 30);
  417. }
  418. }
  419. ul {
  420. width: 96.5%;
  421. height:80PX;
  422. background: #f1d5d5;
  423. display: flex;
  424. flex-wrap: wrap;
  425. flex-direction: column;
  426. //margin:10px 0;
  427. li {
  428. width: 96.5PX !important;
  429. height: 40PX !important;
  430. line-height: 35PX !important;
  431. text-align: center;
  432. display: flex;
  433. background: #f1d5d5;
  434. a {
  435. width: 100%;
  436. height: 20px;
  437. line-height: 20px;
  438. overflow: hidden;
  439. text-align: center;
  440. color: #c9010c;
  441. font-size: 16PX !important;
  442. font-weight: normal;
  443. }
  444. a:hover {
  445. background: rgb(243, 124, 124);
  446. color: #fff;
  447. }
  448. }
  449. }
  450. }
  451. .headerNavCenter {
  452. width: 100%;
  453. height:40PX;
  454. margin-top: 10PX !important;
  455. display: flex;
  456. align-items: center;
  457. justify-content: space-between;
  458. .first {
  459. width: 5.5%;
  460. height: 40PX !important;
  461. float: left;
  462. background: #0e6ebe;
  463. a {
  464. display:block;
  465. width:100%;
  466. height:100%;
  467. font-size: 16PX !important;
  468. color: #fff;
  469. font-weight: normal;
  470. text-align: center;
  471. line-height: 40PX !important;
  472. }
  473. }
  474. ul {
  475. width: 95.5%;
  476. display: flex;
  477. justify-content: space-between;
  478. background:#4F94CD;
  479. li {
  480. background:#4F94CD;
  481. width: 80PX !important;
  482. height: 40PX !important;
  483. line-height: 40PX !important;
  484. //overflow: hidden;
  485. float: left;
  486. text-align: center;
  487. a {
  488. display:block;
  489. width:100%;
  490. height:100%;
  491. font-size: 16PX !important;
  492. color: #fff;
  493. font-weight: normal;
  494. }
  495. a:hover {
  496. background: rgb(185, 8, 8);
  497. }
  498. }
  499. }
  500. }
  501. .headerNavBottom {
  502. width: 100%;
  503. height:40PX;
  504. //overflow: hidden;
  505. margin-top: 10PX !important;
  506. display: flex;
  507. align-items: center;
  508. justify-content: space-between;
  509. .first {
  510. width: 5.5%;
  511. height: 40PX !important;
  512. float: left;
  513. background: #CD3700;
  514. a {
  515. display:block;
  516. width:100%;
  517. height:100%;
  518. font-size: 16PX !important;
  519. color: #fff;
  520. font-weight: normal;
  521. text-align: center;
  522. line-height: 40PX !important;
  523. }
  524. }
  525. ul {
  526. width: 95.5%;
  527. display: flex;
  528. //flex-wrap: wrap;
  529. justify-content: space-between;
  530. background: #8a2100;
  531. li {
  532. background:#8a2100;
  533. width: 80PX !important;
  534. height: 40PX !important;
  535. line-height: 40PX !important;
  536. //overflow: hidden;
  537. float: left;
  538. text-align: center;
  539. a {
  540. display:block;
  541. width:100%;
  542. height:100%;
  543. font-size: 16PX !important;
  544. color: #fff;
  545. font-weight: normal;
  546. }
  547. a:hover {
  548. background: rgb(214, 45, 45);
  549. }
  550. }
  551. }
  552. }
  553. }
  554. }
  555. @media screen and (min-width: 801px) and (max-width: 1400px) {
  556. .headerNavBox-mobile {
  557. display: none;
  558. }
  559. .headerNav-pc {
  560. position: sticky;
  561. top: 0;
  562. z-index: 1000;
  563. width: 100%;
  564. // background-color: #fff;
  565. }
  566. .headerNavBox {
  567. text-align: center;
  568. a{
  569. display: inline-block;
  570. overflow: hidden;
  571. width: 100PX !important;
  572. margin: 0 10PX !important;
  573. height: 40PX;
  574. line-height: 40PX !important;
  575. background: url(public/image/navBox.png);
  576. background-size: 100% 100%;
  577. text-align: center;
  578. font-size: 18PX !important;
  579. color: #fff;
  580. }
  581. }
  582. .headerNavMainBox {
  583. min-width: 801px !important;
  584. max-width: 1400PX !important;
  585. width: 100%;
  586. overflow: hidden;
  587. margin: 20px auto 0;
  588. background-color: transparent;
  589. // background: #fff;
  590. .headerNavTop {
  591. width: 100%;
  592. overflow: hidden;
  593. background-color: transparent;
  594. //background: #158d91;
  595. display: flex;
  596. align-items: center;
  597. justify-content: space-between;
  598. .first {
  599. padding: 0px;
  600. background: #DEB887;
  601. width: 2%;
  602. height: 80PX !important;
  603. line-height: 40PX !important;
  604. overflow: hidden;
  605. float: left;
  606. text-align: center;
  607. a {
  608. display:block;
  609. width:100%;
  610. height:100%;
  611. font-size: 16PX !important;
  612. color: #fff;
  613. font-weight: normal;
  614. }
  615. a:hover {
  616. background: rgb(90, 128, 30);
  617. }
  618. }
  619. ul {
  620. width: 96.5%;
  621. height:80PX;
  622. background: #f1d5d5;
  623. display: flex;
  624. flex-wrap: wrap;
  625. flex-direction: column;
  626. overflow: hidden;
  627. //margin:10px 0;
  628. li {
  629. width: 80PX !important;
  630. min-width: 80PX !important;
  631. max-width:80PX !important;
  632. height: 40PX !important;
  633. line-height: 35PX !important;
  634. text-align: center;
  635. display: flex;
  636. background: #f1d5d5;
  637. overflow: hidden;
  638. a {
  639. display: block;
  640. width: 100%;
  641. // height: 20px;
  642. // line-height: 20px;
  643. overflow: hidden;
  644. text-align: center;
  645. color: #c9010c;
  646. font-size: 16PX !important;
  647. /* 字符间距收紧 */
  648. letter-spacing: 0;
  649. /* 字号略缩小,进一步节省空间 */
  650. font-size: 16px;
  651. // padding: 0 12px; /* 内边距缩小 */
  652. // background: blue;
  653. font-weight: normal;
  654. }
  655. a:hover {
  656. background: rgb(243, 124, 124);
  657. color: #fff;
  658. }
  659. }
  660. }
  661. }
  662. .headerNavCenter {
  663. width: 100%;
  664. height:40PX;
  665. margin-top: 10PX !important;
  666. display: flex;
  667. align-items: center;
  668. justify-content: space-between;
  669. .first {
  670. width: 5.5%;
  671. height: 40PX !important;
  672. float: left;
  673. background: #0e6ebe;
  674. a {
  675. display:block;
  676. width:100%;
  677. height:100%;
  678. font-size: 16PX !important;
  679. color: #fff;
  680. font-weight: normal;
  681. text-align: center;
  682. line-height: 40PX !important;
  683. }
  684. }
  685. ul {
  686. width: 95.5%;
  687. display: flex;
  688. justify-content: space-between;
  689. background:#4F94CD;
  690. li {
  691. background:#4F94CD;
  692. width: 80PX !important;
  693. height: 40PX !important;
  694. line-height: 40PX !important;
  695. //overflow: hidden;
  696. float: left;
  697. text-align: center;
  698. a {
  699. display:block;
  700. width:100%;
  701. height:100%;
  702. font-size: 16PX !important;
  703. color: #fff;
  704. font-weight: normal;
  705. }
  706. a:hover {
  707. background: rgb(185, 8, 8);
  708. }
  709. }
  710. }
  711. }
  712. .headerNavBottom {
  713. width: 100%;
  714. height:40PX;
  715. //overflow: hidden;
  716. margin-top: 10PX !important;
  717. display: flex;
  718. align-items: center;
  719. justify-content: space-between;
  720. .first {
  721. width: 5.5%;
  722. height: 40PX !important;
  723. float: left;
  724. background: #CD3700;
  725. a {
  726. display:block;
  727. width:100%;
  728. height:100%;
  729. font-size: 16PX !important;
  730. color: #fff;
  731. font-weight: normal;
  732. text-align: center;
  733. line-height: 40PX !important;
  734. }
  735. }
  736. ul {
  737. width: 95.5%;
  738. display: flex;
  739. //flex-wrap: wrap;
  740. justify-content: space-between;
  741. background: #8a2100;
  742. li {
  743. background:#8a2100;
  744. width: 80PX !important;
  745. height: 40PX !important;
  746. line-height: 40PX !important;
  747. //overflow: hidden;
  748. float: left;
  749. text-align: center;
  750. a {
  751. display:block;
  752. width:100%;
  753. height:100%;
  754. font-size: 16PX !important;
  755. color: #fff;
  756. font-weight: normal;
  757. }
  758. a:hover {
  759. background: rgb(214, 45, 45);
  760. }
  761. }
  762. }
  763. }
  764. }
  765. }
  766. @media screen and (max-width: 800px) {
  767. .headerNav-pc {
  768. position: sticky;
  769. top: 0;
  770. z-index: 1000;
  771. width: 100%;
  772. // background-color: #fff;
  773. }
  774. .headerNavBox {
  775. text-align: center;
  776. a{
  777. // display: block;
  778. overflow: hidden;
  779. width: 14% !important;
  780. margin: 0 5PX !important;
  781. height: 30PX;
  782. line-height: 30PX !important;
  783. padding: 5PX 7PX;
  784. background: url(public/image/navBox.png);
  785. background-size: 100% 100%;
  786. text-align: center;
  787. font-size: 12PX !important;
  788. color: #fff;
  789. }
  790. }
  791. .headerNavMainBox {
  792. display: none !important;
  793. max-width: 800px !important;
  794. width: 100%;
  795. overflow: hidden;
  796. margin: 20px auto 0;
  797. background-color: transparent;
  798. // background: red;
  799. .headerNavTop {
  800. // display: none !important;
  801. width: 100%;
  802. overflow: hidden;
  803. background-color: transparent;
  804. //background: #158d91;
  805. display: flex;
  806. align-items: center;
  807. justify-content: space-between;
  808. .first {
  809. padding: 0px;
  810. background: #DEB887;
  811. width: 2%;
  812. height: 70PX !important;
  813. line-height: 34PX !important;
  814. overflow: hidden;
  815. float: left;
  816. text-align: center;
  817. a {
  818. display:block;
  819. width:100%;
  820. height:100%;
  821. font-size: 16PX !important;
  822. color: #fff;
  823. font-weight: normal;
  824. }
  825. a:hover {
  826. background: rgb(90, 128, 30);
  827. }
  828. }
  829. ul {
  830. width: 96.5%;
  831. height:80PX;
  832. background: #f1d5d5;
  833. display: flex;
  834. flex-wrap: wrap;
  835. flex-direction: column;
  836. //margin:10px 0;
  837. li {
  838. width: 96.5PX !important;
  839. height: 40PX !important;
  840. line-height: 35PX !important;
  841. text-align: center;
  842. display: flex;
  843. background: #f1d5d5;
  844. a {
  845. width: 100%;
  846. height: 20px;
  847. line-height: 20px;
  848. overflow: hidden;
  849. text-align: center;
  850. color: #c9010c;
  851. font-size: 16PX !important;
  852. font-weight: normal;
  853. }
  854. a:hover {
  855. background: rgb(243, 124, 124);
  856. color: #fff;
  857. }
  858. }
  859. }
  860. }
  861. .headerNavCenter {
  862. display: none !important;
  863. width: 100%;
  864. height:40PX;
  865. margin-top: 10PX !important;
  866. display: flex;
  867. align-items: center;
  868. justify-content: space-between;
  869. .first {
  870. width: 5.5%;
  871. height: 40PX !important;
  872. float: left;
  873. background: #0e6ebe;
  874. a {
  875. display:block;
  876. width:100%;
  877. height:100%;
  878. font-size: 16PX !important;
  879. color: #fff;
  880. font-weight: normal;
  881. text-align: center;
  882. line-height: 40PX !important;
  883. }
  884. }
  885. ul {
  886. width: 95.5%;
  887. display: flex;
  888. justify-content: space-between;
  889. background:#4F94CD;
  890. li {
  891. background:#4F94CD;
  892. width: 80PX !important;
  893. height: 40PX !important;
  894. line-height: 40PX !important;
  895. //overflow: hidden;
  896. float: left;
  897. text-align: center;
  898. a {
  899. display:block;
  900. width:100%;
  901. height:100%;
  902. font-size: 16PX !important;
  903. color: #fff;
  904. font-weight: normal;
  905. }
  906. a:hover {
  907. background: rgb(185, 8, 8);
  908. }
  909. }
  910. }
  911. }
  912. .headerNavBottom {
  913. display: none !important;
  914. width: 100%;
  915. height:40PX;
  916. //overflow: hidden;
  917. margin-top: 10PX !important;
  918. display: flex;
  919. align-items: center;
  920. justify-content: space-between;
  921. .first {
  922. width: 5.5%;
  923. height: 40PX !important;
  924. float: left;
  925. background: #CD3700;
  926. a {
  927. display:block;
  928. width:100%;
  929. height:100%;
  930. font-size: 16PX !important;
  931. color: #fff;
  932. font-weight: normal;
  933. text-align: center;
  934. line-height: 40PX !important;
  935. }
  936. }
  937. ul {
  938. width: 95.5%;
  939. display: flex;
  940. //flex-wrap: wrap;
  941. justify-content: space-between;
  942. background: #8a2100;
  943. li {
  944. background:#8a2100;
  945. width: 80PX !important;
  946. height: 40PX !important;
  947. line-height: 40PX !important;
  948. //overflow: hidden;
  949. float: left;
  950. text-align: center;
  951. a {
  952. display:block;
  953. width:100%;
  954. height:100%;
  955. font-size: 16PX !important;
  956. color: #fff;
  957. font-weight: normal;
  958. }
  959. a:hover {
  960. background: rgb(214, 45, 45);
  961. }
  962. }
  963. }
  964. }
  965. }
  966. .headerNavBox-mobile {
  967. position: fixed;
  968. top: 0;
  969. width: 100%;
  970. height: 80px;
  971. background: #f1f1f1;
  972. border-bottom: 1px solid #ccc;
  973. padding: 0 20px;
  974. position: fixed;
  975. top: 0;
  976. left: 0;
  977. z-index: 999;
  978. display: flex;
  979. align-items: center;
  980. justify-content: space-between;
  981. box-sizing: border-box;
  982. .headerNavBox-mobile-welcome {
  983. font-size: 15PX;
  984. }
  985. .headerNavBox-mobile-btn {
  986. font-size: 15PX;
  987. display: flex;
  988. align-items: center;
  989. justify-content: space-between;
  990. img {
  991. display: inline-block;
  992. width: 16PX;
  993. height: 16PX;
  994. margin-left: 10PX;
  995. // background: red;
  996. }
  997. }
  998. }
  999. .headerNavBox-mobile-menu {
  1000. // position: fixed;
  1001. top: 30px;
  1002. // left: 0;
  1003. // width: 100%;
  1004. // background: #999;
  1005. box-sizing: border-box;
  1006. padding: 20px;
  1007. width: 100%;
  1008. height: auto;
  1009. overflow: hidden;
  1010. position: absolute;
  1011. right: 0;
  1012. // top: .9rem;
  1013. background: #999;
  1014. padding: 20px;
  1015. // display: none;
  1016. z-index: 999;
  1017. a {
  1018. // font-size: 10PX;
  1019. // color: #fff;
  1020. // margin: 0 10px;
  1021. // white-space: nowrap;
  1022. font-size: 17PX;
  1023. color: #fff;
  1024. display: block;
  1025. // float: left;
  1026. text-align: center;
  1027. height: 15PX;
  1028. line-height: 15PX;
  1029. margin: 0 5PX;
  1030. }
  1031. .headerNavBox-mobile-menu-list {
  1032. display: flex;
  1033. flex-wrap: wrap;
  1034. align-items: center;
  1035. justify-content: flex-start;
  1036. // background: blue;
  1037. margin-bottom: 10px;
  1038. height: auto;
  1039. // border-bottom: 1px solid red;
  1040. border-bottom: 1px solid #c1c1c1;
  1041. padding: 5PX 0;
  1042. a{
  1043. margin-bottom: 10px;
  1044. display: inline-block;
  1045. width: auto;
  1046. // background: yellow;
  1047. // overflow: hidden;
  1048. writing-mode: horizontal-tb; /* 强制横向排版(默认值,覆盖竖排设置) */
  1049. white-space: nowrap; /* 禁止文字换行(如果是换行导致的竖排) */
  1050. width: auto; /* 宽度自适应内容,取消固定窄宽度 */
  1051. }
  1052. }
  1053. .headerNavBox-mobile-menu-button {
  1054. padding: 10px 0;
  1055. img {
  1056. width: 30px;
  1057. height: 30px;
  1058. display: block;
  1059. margin: 0 auto;
  1060. }
  1061. }
  1062. }
  1063. }
  1064. //自适应 end ---------------------------------------->
  1065. </style>