indexsyyg.html 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Document</title>
  7. <!-- 引入 Vue -->
  8. <script src="https://unpkg.com/vue@2.6.14/dist/vue.min.js"></script>
  9. <!-- 引入样式 -->
  10. <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
  11. <!-- 引入组件库 -->
  12. <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  13. <!-- jquery-->
  14. <script src="js/jquery-3.5.1.min.js"></script>
  15. <style>
  16. * {
  17. padding: 0;
  18. margin: 0;
  19. }
  20. ul {
  21. list-style-type: none;
  22. }
  23. li {
  24. list-style: none;
  25. }
  26. body {
  27. min-width: 1370px;
  28. margin: 0;
  29. overflow: hidden;
  30. /* 确保视频覆盖整个页面 */
  31. }
  32. video {
  33. position: absolute;
  34. top: 0;
  35. left: 0;
  36. width: 100%;
  37. height: 100%;
  38. object-fit: cover;
  39. /* 确保视频按比例填充整个页面 */
  40. z-index: -1;
  41. /* 将视频置于所有内容之下 */
  42. }
  43. .indexcot {
  44. height: 100vh;
  45. /* background-image: url(images/indexsyyg.png); */
  46. /* background-size: 100% 100%; */
  47. font-family: Microsoft YaHei;
  48. color: #FFFFFF;
  49. padding-top: 1.875rem;
  50. box-sizing: border-box;
  51. }
  52. .indexcot .top {
  53. width: 69%;
  54. display: flex;
  55. margin: auto;
  56. justify-content: space-between;
  57. }
  58. .indexcot .logo {
  59. display: flex;
  60. align-items: center;
  61. font-size: 1.25rem;
  62. margin-right: 10%;
  63. white-space: nowrap;
  64. cursor: pointer;
  65. }
  66. .indexcot .logo img {
  67. width: 3.5rem;
  68. height: 3.5rem;
  69. }
  70. .indexcot .menu {
  71. width: 60%;
  72. max-width: 620px;
  73. font-size: 1rem;
  74. display: flex;
  75. justify-content: space-evenly;
  76. align-items: center;
  77. }
  78. .indexcot .menu li {
  79. cursor: pointer;
  80. white-space: nowrap;
  81. }
  82. .indexcot .menu .active {
  83. font-size: 1.25rem;
  84. padding-bottom: 0.3125rem;
  85. box-sizing: border-box;
  86. border-bottom: 1px solid #fff;
  87. }
  88. .indexcot .title {
  89. display: flex;
  90. width: 69%;
  91. margin: auto;
  92. align-items: center;
  93. justify-content: center;
  94. margin-top: 25vh;
  95. }
  96. .indexcot .title .left {
  97. font-size: 2.375rem;
  98. color: #FFFFFF;
  99. display: flex;
  100. flex-direction: column;
  101. white-space: nowrap;
  102. }
  103. .indexcot .right {
  104. font-size: 5rem;
  105. color: #FFFFFF;
  106. white-space: nowrap;
  107. }
  108. #titleTabs {
  109. width: 80%;
  110. max-width: 1500px;
  111. margin: 0 auto;
  112. font-size: 1.25rem;
  113. display: flex;
  114. justify-content: center;
  115. margin-top: 3.125rem;
  116. }
  117. #titleTabs .tab {
  118. width: 100%;
  119. display: flex;
  120. justify-content: space-between;
  121. }
  122. #titleTabs .tab-contents {
  123. display: none;
  124. }
  125. #titleTabs .active .tab-contents {
  126. display: flex;
  127. flex-direction: column;
  128. justify-content: space-evenly;
  129. height: 22vh;
  130. background: rgb(116 175 244 / 40%);
  131. }
  132. .tab-items {
  133. /* width: 16%; */
  134. width: 14.25rem;
  135. height: 4.1875rem;
  136. cursor: pointer;
  137. }
  138. .tab-items>.name {
  139. height: 4.1875rem;
  140. background: #5598E7;
  141. margin-left: 0.9375rem;
  142. display: flex;
  143. align-items: center;
  144. justify-content: center;
  145. white-space: nowrap;
  146. padding: 0 0.625rem;
  147. }
  148. .tab-items.active>.name {
  149. background: #206AC2;
  150. font-size: 1.375rem;
  151. }
  152. .tab-contents {
  153. margin-left: 0.9375rem;
  154. }
  155. .tab-contents li {
  156. display: flex;
  157. align-items: center;
  158. height: 2.5rem;
  159. padding-left: 1.25rem;
  160. box-sizing: border-box;
  161. }
  162. .tab-contents li img {
  163. margin-right: 0.9375rem;
  164. }
  165. .tab-contents li.more {
  166. padding-left: 2.6875rem;
  167. font-size: 0.875rem;
  168. color: #FFFFFF;
  169. line-height: 3rem;
  170. text-decoration-line: underline;
  171. cursor: pointer;
  172. }
  173. @media screen and (max-width:1600px) {
  174. html,
  175. body {
  176. font-size: 14px;
  177. }
  178. }
  179. @media screen and (max-width:1300px) {
  180. html,
  181. body {
  182. font-size: 10px;
  183. }
  184. }
  185. </style>
  186. </head>
  187. <body>
  188. <div class="indexcot">
  189. <video autoplay loop muted playsinline>
  190. <source src="media/业.ecabc222.mp4" type="video/mp4">
  191. Your browser does not support the video tag.
  192. </video>
  193. <div class="top">
  194. <div class="logo">
  195. <img src="images/nalogo.png" alt="">
  196. <span>重庆市南岸区人民政府</span>
  197. </div>
  198. <ul class="menu">
  199. <li class="active">首页</li>
  200. <li>园区概况</li>
  201. <li>产业布局</li>
  202. <li>政策计算</li>
  203. <li>特色服务</li>
  204. <li>载体出让</li>
  205. <li>党群服务</li>
  206. </ul>
  207. </div>
  208. <div class="title">
  209. <div class="left">
  210. <span>重庆市南岸区</span>
  211. <span style="letter-spacing: 10px;">重庆经开区</span>
  212. </div>
  213. <div class="right">
  214. 园区服务平台
  215. </div>
  216. </div>
  217. <div id="titleTabs">
  218. <div class="tab">
  219. <div class="tab-items" :class="{ active: currentTab === tab.id }"
  220. v-for="(tab, index) in this.titleList" :key="index" @mouseenter="currentTab = tab.id"
  221. @mouseleave="currentTab = -1">
  222. <div class="name" @click="tsmore(tab.id)">
  223. {{tab.title}}
  224. </div>
  225. <ul class="tab-contents">
  226. <li v-for="(tabl, indexl) in tab.subtitleList" :key="indexl">
  227. <img src="images/listlogo.png" alt="" />
  228. <div class="name">{{tabl}}</div>
  229. </li>
  230. <li class="more" @click="tsmore(tab.id)" v-if="tab.subtitleList.length">
  231. 探索更多>>
  232. </li>
  233. </ul>
  234. </div>
  235. </div>
  236. </div>
  237. </div>
  238. </div>
  239. </body>
  240. <script>
  241. // 初始化Vue实例
  242. new Vue({
  243. el: '#titleTabs',
  244. data: function () {
  245. return {
  246. currentTab: -1,
  247. titleList: [
  248. ],
  249. // parkData: {
  250. // id:[],
  251. // title:[],
  252. // subtitle:[]
  253. // },
  254. };
  255. },
  256. methods: {
  257. tsmore(id) {
  258. window.location.href = "indexcygyy.html?id=" + this.currentTab;
  259. },
  260. getParkData() {
  261. let that = this;
  262. $.ajax({
  263. url: "http://172.16.99.105:8082/parkData/",
  264. type: "get",
  265. dataType: "json",
  266. success: function (data) {
  267. data.forEach(function (item) {
  268. item.subtitleList = item.subtitle ? item.subtitle.split(",") : [];
  269. })
  270. that.titleList = data;
  271. console.log(data);
  272. }
  273. })
  274. }
  275. },
  276. mounted() {
  277. this.getParkData();
  278. }
  279. });
  280. </script>
  281. </html>