pageNavigation.vue 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  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. }
  133. }
  134. .partTwo {
  135. width: 100%;
  136. height: 57px;
  137. line-height: 57px;
  138. border-bottom: 1px solid #e3e3e3;
  139. .navigationTwo {
  140. width: 1207px;
  141. height: 57px;
  142. color: #333333;
  143. border-bottom: 1px solid #e3e3e3;
  144. li {
  145. font-weight: 600;
  146. font-size: 20px;
  147. height: 56px;
  148. margin-right: 21px;
  149. &:nth-last-child(1) {
  150. margin-right: 0px;
  151. }
  152. }
  153. li:hover {
  154. color: #139602;
  155. border-bottom: 2px solid #139602;
  156. }
  157. }
  158. }
  159. .partThree {
  160. width: 100%;
  161. height: 75px;
  162. .inner {
  163. margin-bottom: 5px;
  164. }
  165. .channel,
  166. .areaChannel {
  167. float: left;
  168. margin-top: 17px;
  169. }
  170. .channel {
  171. width: 56px;
  172. height: 20px;
  173. font-family: PingFang SC, PingFang SC;
  174. font-weight: 600;
  175. font-size: 14px;
  176. color: #666666;
  177. line-height: 16px;
  178. text-align: left;
  179. font-style: normal;
  180. text-transform: none;
  181. }
  182. .areaChannel {
  183. width: 1122px;
  184. margin-left: 14px
  185. }
  186. .areaChannel {
  187. >span {
  188. display: inline-block;
  189. width: 49px;
  190. height: 16px;
  191. line-height: 16px;
  192. margin-bottom: 10px;
  193. text-align: center;
  194. font-family: PingFang SC, PingFang SC;
  195. font-weight: 400;
  196. font-size: 14px;
  197. text-align: center;
  198. font-style: normal;
  199. text-transform: none;
  200. margin-right: 5px;
  201. border-right: 1px solid #e6e6e6;
  202. a {
  203. display: inline-block;
  204. width: 49px;
  205. height: 16px;
  206. color: #868686;
  207. }
  208. a:hover {
  209. color: #868686;
  210. }
  211. }
  212. >span:last-child,
  213. >span:nth-child(20) {
  214. border-right: none;
  215. }
  216. }
  217. }
  218. .logo {
  219. margin-top: 5px;
  220. height: 90px;
  221. img{
  222. width: 1200px;
  223. height: 90px;
  224. }
  225. }
  226. // 行政查询(未完成)
  227. .select {
  228. width: 100%;
  229. height: 62px;
  230. line-height: 62px;
  231. .inner {
  232. // width: 1200px;
  233. height: 62px;
  234. margin-top: 10px;
  235. background-color: #fafafa;
  236. }
  237. .role,
  238. .region {
  239. float: left;
  240. height: 62px;
  241. >.title {
  242. width: 120px;
  243. font-family: PingFang SC, PingFang SC;
  244. font-weight: 600;
  245. font-size: 20px;
  246. color: #666666;
  247. text-align: left;
  248. font-style: normal;
  249. text-transform: none;
  250. }
  251. li {
  252. float: left;
  253. }
  254. }
  255. .role {
  256. padding-left: 16px;
  257. .searchRole {
  258. width: 440px;
  259. height: 40px;
  260. line-height: 40px;
  261. background-color: #fff;
  262. border: 1px solid #ededed;
  263. margin: 10px 20px 12px 22px;
  264. border-radius: 25px;
  265. em {
  266. display: inline-block;
  267. width: 29px;
  268. height: 29px;
  269. margin: 4px 21px 4px 22px;
  270. vertical-align: middle;
  271. background: url('../../static/images/Iconly/Broken/Search.png');
  272. }
  273. input {
  274. width: 243px;
  275. font-family: PingFang SC, PingFang SC;
  276. font-weight: 600;
  277. font-size: 14px;
  278. color: #999999;
  279. line-height: 16px;
  280. text-align: left;
  281. font-style: normal;
  282. text-transform: none;
  283. border: none;
  284. outline: none;
  285. }
  286. i {
  287. display: inline-block;
  288. width: 24px;
  289. height: 24px;
  290. margin-right: 19px;
  291. vertical-align: middle;
  292. background: url("../../static/images/Iconly/Two-tone/Arrow - Down 3.png");
  293. }
  294. span {
  295. color: #999999;
  296. }
  297. }
  298. }
  299. .region {
  300. .searchRole {
  301. width: 440px;
  302. height: 40px;
  303. line-height: 40px;
  304. background-color: #fff;
  305. border: 1px solid #ededed;
  306. margin: 10px 0px 12px 16px;
  307. border-radius: 25px;
  308. }
  309. em {
  310. display: inline-block;
  311. width: 29px;
  312. height: 29px;
  313. margin: 4px 21px 4px 22px;
  314. vertical-align: middle;
  315. background: url('../../static/images/Iconly/Broken/Search.png');
  316. }
  317. i {
  318. display: inline-block;
  319. width: 24px;
  320. height: 24px;
  321. margin-right: 11px;
  322. vertical-align: middle;
  323. background: url("../../static/images/Iconly/Two-tone/Arrow - Down 3.png");
  324. }
  325. span {
  326. color: #999999;
  327. margin-right: 22px;
  328. }
  329. }
  330. }
  331. </style>