pageNavigation.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  1. <template>
  2. <div class="navigate">
  3. <!-- 导航 -->
  4. <div class="partOne">
  5. <div class="inner">
  6. <!-- 导航一 -->
  7. <ul class="navigationOne">
  8. <li v-for="(item,index) in data" :key="index">
  9. <NuxtLink to="/primaryNavigation/1">{{item.name }}</NuxtLink>
  10. </li>
  11. </ul>
  12. </div>
  13. </div>
  14. <div class="partTwo">
  15. <div class="inner">
  16. <ul class="navigationTwo">
  17. <li>写作大全</li>
  18. <li>招工招聘</li>
  19. <li>农资购销</li>
  20. <li>农产购销</li>
  21. <li>致富信息</li>
  22. <li>书刊信息</li>
  23. <li>农业导航</li>
  24. <li>打假维权</li>
  25. <li>三农服务</li>
  26. <li>三农调差</li>
  27. <li>三农内参</li>
  28. <li>贴身宝贝</li>
  29. </ul>
  30. </div>
  31. </div>
  32. <div class="partThree">
  33. <!-- 地方频道 -->
  34. <div class="inner">
  35. <!-- channel 频道 -->
  36. <h5 class="channel">地方频道</h5>
  37. <p class="areaChannel">
  38. <span v-for="(item, index) in areaList" :key="index">
  39. <a href="#">{{ item }}</a>
  40. </span>
  41. </p>
  42. </div>
  43. </div>
  44. <!-- 导航栏下的大图 -->
  45. <div class="logo">
  46. <div class="inner">
  47. <img src="../../static/images/banner 1.png" alt="">
  48. </div>
  49. </div>
  50. <!-- 行政查询 (未完成) -->
  51. <div class="select">
  52. <div class="inner">
  53. <ul class="role left">
  54. <li class="title">行政职能查询</li>
  55. <li class="searchRole">
  56. <em></em>
  57. <input type="text" placeholder="输入关键词">
  58. <i></i>
  59. <span>职能部门</span>
  60. <!-- <select>
  61. <option value="1">北京</option>
  62. <option value="1">天津</option>
  63. <option value="1">上海</option>
  64. <option value="1">广州</option>
  65. </select> -->
  66. </li>
  67. </ul>
  68. <ul class="region left">
  69. <li class="title">行政区划查询</li>
  70. <li class="searchRole">
  71. <em></em>
  72. <i></i>
  73. <span>请选择省</span>
  74. <i></i>
  75. <span>请选择市</span>
  76. <i></i>
  77. <span>请选择区/县</span>
  78. </li>
  79. </ul>
  80. </div>
  81. </div>
  82. </div>
  83. </template>
  84. <script setup>
  85. import { ref, onMounted } from 'vue';
  86. const nuxtApp = useNuxtApp();
  87. const axios = nuxtApp.$axios;
  88. const data = ref("");
  89. onMounted(async () => {
  90. try {
  91. const response = await axios.get('/web/getWebsiteCategory');
  92. console.log(response.data.data);
  93. data.value = response.data.data;
  94. } catch (error) {
  95. console.error(error);
  96. }
  97. })
  98. let areaList = ['北京', '天津', '河北', '山西', '内蒙古', '辽宁', '吉林', '黑龙江', '江苏', '浙江', '安徽', '福建', '江西', '山东', '河南', '湖北', '湖南', '广东', '广西', '贵州', '云南', '西藏', '陕西', '甘肃', '青海', '宁夏', '新疆', '香港', '澳门', '台湾']
  99. </script>
  100. <style lang="less" scoped>
  101. // 导航部分
  102. .partOne .navigationOne,
  103. .partOne .navigationOne>li,
  104. .partTwo .navigationTwo,
  105. .partTwo .navigationTwo>li {
  106. float: left;
  107. }
  108. .partOne {
  109. width: 100%;
  110. height: 66px;
  111. line-height: 66px;
  112. background-color: #fff;
  113. font-size: 20px;
  114. font-family: PingFang SC-Semibold;
  115. .navigationOne {
  116. color: #333;
  117. li {
  118. font-family: PingFang SC;
  119. font-weight: 600;
  120. font-size: 20px;
  121. text-align: left;
  122. font-style: normal;
  123. text-transform: none;
  124. margin-right: 14px;
  125. &:nth-last-child(1) {
  126. margin-right: 0px;
  127. }
  128. a {
  129. color: #333;
  130. }
  131. }
  132. >li:hover a{
  133. color: #139602;
  134. }
  135. }
  136. }
  137. .partTwo {
  138. width: 100%;
  139. height: 57px;
  140. line-height: 57px;
  141. border-bottom: 1px solid #e3e3e3;
  142. .navigationTwo {
  143. width: 1207px;
  144. height: 57px;
  145. color: #333333;
  146. border-bottom: 1px solid #e3e3e3;
  147. li {
  148. font-weight: 600;
  149. font-size: 20px;
  150. height: 56px;
  151. margin-right: 21px;
  152. &:nth-last-child(1) {
  153. margin-right: 0px;
  154. }
  155. }
  156. li:hover {
  157. color: #139602;
  158. border-bottom: 2px solid #139602;
  159. }
  160. }
  161. }
  162. .partThree {
  163. width: 100%;
  164. height: 75px;
  165. .inner {
  166. margin-bottom: 5px;
  167. }
  168. .channel,
  169. .areaChannel {
  170. float: left;
  171. margin-top: 17px;
  172. }
  173. .channel {
  174. width: 56px;
  175. height: 20px;
  176. font-family: PingFang SC, PingFang SC;
  177. font-weight: 600;
  178. font-size: 14px;
  179. color: #666666;
  180. line-height: 16px;
  181. text-align: left;
  182. font-style: normal;
  183. text-transform: none;
  184. }
  185. .areaChannel {
  186. width: 1122px;
  187. margin-left: 14px;
  188. >span {
  189. display: inline-block;
  190. width: 49px;
  191. height: 16px;
  192. line-height: 16px;
  193. margin-bottom: 10px;
  194. text-align: center;
  195. font-family: PingFang SC, PingFang SC;
  196. font-weight: 400;
  197. font-size: 14px;
  198. text-align: center;
  199. font-style: normal;
  200. text-transform: none;
  201. margin-right: 5px;
  202. border-right: 1px solid #e6e6e6;
  203. a {
  204. display: inline-block;
  205. width: 49px;
  206. height: 16px;
  207. color: #868686;
  208. }
  209. a:hover {
  210. color: #868686;
  211. }
  212. }
  213. >span:last-child,
  214. >span:nth-child(20) {
  215. border-right: none;
  216. }
  217. >span:hover a{
  218. color: #139602;
  219. }
  220. }
  221. }
  222. .logo {
  223. margin-top: 5px;
  224. height: 90px;
  225. img{
  226. width: 1200px;
  227. height: 90px;
  228. }
  229. }
  230. // 行政查询(未完成)
  231. .select {
  232. width: 100%;
  233. height: 62px;
  234. line-height: 62px;
  235. .inner {
  236. // width: 1200px;
  237. height: 62px;
  238. margin-top: 10px;
  239. background-color: #fafafa;
  240. }
  241. .role,
  242. .region {
  243. float: left;
  244. height: 62px;
  245. >.title {
  246. width: 120px;
  247. font-family: PingFang SC, PingFang SC;
  248. font-weight: 600;
  249. font-size: 20px;
  250. color: #666666;
  251. text-align: left;
  252. font-style: normal;
  253. text-transform: none;
  254. }
  255. li {
  256. float: left;
  257. }
  258. }
  259. .role {
  260. padding-left: 16px;
  261. .searchRole {
  262. width: 440px;
  263. height: 40px;
  264. line-height: 40px;
  265. background-color: #fff;
  266. border: 1px solid #ededed;
  267. margin: 10px 20px 12px 22px;
  268. border-radius: 25px;
  269. em {
  270. display: inline-block;
  271. width: 29px;
  272. height: 29px;
  273. margin: 4px 21px 4px 22px;
  274. vertical-align: middle;
  275. background: url('../../static/images/Iconly/Broken/Search.png');
  276. }
  277. input {
  278. width: 243px;
  279. font-family: PingFang SC, PingFang SC;
  280. font-weight: 600;
  281. font-size: 14px;
  282. color: #999999;
  283. line-height: 16px;
  284. text-align: left;
  285. font-style: normal;
  286. text-transform: none;
  287. border: none;
  288. outline: none;
  289. }
  290. i {
  291. display: inline-block;
  292. width: 24px;
  293. height: 24px;
  294. margin-right: 19px;
  295. vertical-align: middle;
  296. background: url("../../static/images/Iconly/Two-tone/Arrow - Down 3.png");
  297. }
  298. span {
  299. color: #999999;
  300. }
  301. }
  302. }
  303. .region {
  304. .searchRole {
  305. width: 440px;
  306. height: 40px;
  307. line-height: 40px;
  308. background-color: #fff;
  309. border: 1px solid #ededed;
  310. margin: 10px 0px 12px 16px;
  311. border-radius: 25px;
  312. }
  313. em {
  314. display: inline-block;
  315. width: 29px;
  316. height: 29px;
  317. margin: 4px 21px 4px 22px;
  318. vertical-align: middle;
  319. background: url('../../static/images/Iconly/Broken/Search.png');
  320. }
  321. i {
  322. display: inline-block;
  323. width: 24px;
  324. height: 24px;
  325. margin-right: 11px;
  326. vertical-align: middle;
  327. background: url("../../static/images/Iconly/Two-tone/Arrow - Down 3.png");
  328. }
  329. span {
  330. color: #999999;
  331. margin-right: 22px;
  332. }
  333. }
  334. }
  335. </style>