tsfw.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  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>特色服务</title>
  7. <!-- 引入 Vue -->
  8. <script src="js/vue.min.js"></script>
  9. <!-- 引入样式 -->
  10. <link rel="stylesheet" href="css/index.css">
  11. <!-- 引入组件库 -->
  12. <script src="js/index.js"></script>
  13. <!-- jquery-->
  14. <script src="js/jquery-3.5.1.min.js"></script>
  15. <script src="js/urljson.js"></script>
  16. <style>
  17. * {
  18. padding: 0;
  19. margin: 0;
  20. }
  21. html,
  22. body {
  23. margin: 0;
  24. padding: 0;
  25. font-family: Microsoft YaHei;
  26. height: 100%;
  27. background: #EDF5FF;
  28. }
  29. @font-face {
  30. font-family: 'DOUYU';
  31. src: url('fonts/DOUYUFONT-2.OTF');
  32. font-weight: normal;
  33. font-style: normal;
  34. }
  35. .tsfw>.top {
  36. display: flex;
  37. justify-content: space-between;
  38. align-items: center;
  39. border-bottom: 1px solid #B7C7DC;
  40. background: #FFFFFF;
  41. }
  42. .toplogo {
  43. display: flex;
  44. align-items: center;
  45. font-family: DOUYU;
  46. font-weight: normal;
  47. font-size: 30px;
  48. color: #186FF0;
  49. height: 66px;
  50. cursor: pointer;
  51. }
  52. .toplogo img {
  53. margin: 0 20px;
  54. margin-bottom: 17px;
  55. }
  56. .backbutton {
  57. width: 117px;
  58. height: 42px;
  59. background: #DEEDFF;
  60. border-radius: 10px;
  61. font-family: Microsoft YaHei;
  62. font-weight: 400;
  63. font-size: 16px;
  64. color: #2474F1;
  65. display: flex;
  66. align-items: center;
  67. justify-content: center;
  68. margin-right: 10px;
  69. cursor: pointer;
  70. }
  71. .backbutton img {
  72. margin-right: 10px;
  73. }
  74. .tsfw>.container {
  75. width: 100%;
  76. background-image: url(images/bg-tsfw.png);
  77. background-size: 100% 100%;
  78. padding: 10px 20px;
  79. box-sizing: border-box;
  80. display: flex;
  81. flex-direction: column;
  82. justify-content: center;
  83. min-width: 380px;
  84. }
  85. .tsfw .top {
  86. display: flex;
  87. justify-content: space-between;
  88. }
  89. .top .tlist {
  90. width: 31.5%;
  91. height: 155px;
  92. font-size: 26px;
  93. color: #194D8C;
  94. background: rgb(255 255 255 / 30%);
  95. border-radius: 10px;
  96. display: flex;
  97. align-items: center;
  98. padding-left: 50px;
  99. padding-right: 20px;
  100. box-sizing: border-box;
  101. }
  102. .tlist img {
  103. margin-right: 20px;
  104. }
  105. .tlist .right {
  106. display: flex;
  107. flex-direction: column;
  108. }
  109. .tlist .right span:last-child {
  110. margin-top: 10px;
  111. }
  112. .bottom {
  113. display: flex;
  114. flex-wrap: wrap;
  115. }
  116. .bottom .list {
  117. width: 32.8%;
  118. height: 323px;
  119. font-size: 20px;
  120. background: rgb(255 255 255 / 40%);
  121. font-size: 20px;
  122. color: #194D8C;
  123. padding-left: 30px;
  124. padding-bottom: 10px;
  125. box-sizing: border-box;
  126. position: relative;
  127. padding-top: 100px;
  128. margin-top: 35px;
  129. margin-right: calc(1.6%/2);
  130. }
  131. .bottom .list:nth-child(3n) {
  132. margin-right: 0;
  133. }
  134. .bottom .list .title {
  135. position: absolute;
  136. top: -10px;
  137. font-weight: bold;
  138. font-size: 30px;
  139. color: #FFFFFF;
  140. text-align: center;
  141. width: 379px;
  142. height: 65px;
  143. line-height: 65px;
  144. background-image: url(images/bglt.png);
  145. background-size: 100% 100%;
  146. left: calc((100% - 379px)/2);
  147. }
  148. .bottom .list .content {
  149. line-height: 36px;
  150. }
  151. </style>
  152. </head>
  153. <body>
  154. <div style="width:100%;height:570px" class="header"></div>
  155. <div class="tsfw" id="tsfw">
  156. <div class="top">
  157. <div class="toplogo">
  158. <img src="images/gyylogo.png" alt="">
  159. <span>{{currentTitle}}特色服务</span>
  160. </div>
  161. <div class="backbutton" @click="window.history.go(-1)">
  162. <img src="images/back1.png" alt="">
  163. <span>返回</span>
  164. </div>
  165. </div>
  166. <div class="container">
  167. <!-- <div class="left">
  168. <div class="list" v-for="(item, index) in leftList" :key="index">
  169. <div class="title">
  170. <img src="images/bg-tsfw.png" alt="" style="width: 100%;height: 100%;">
  171. <p>{{item.parkForm}}</p>
  172. </div>
  173. <div class="content">
  174. <div v-for="(tabl, indexl) in item.children" :key="indexl">
  175. {{indexl+1}}.{{tabl.information}}
  176. </div>
  177. </div>
  178. </div>
  179. <div class="list" v-if="!leftList.length">
  180. <div class="title">
  181. <img :src="'images/bg-tsfw1.png'" alt="" style="width: 100%;height: 100%;">
  182. <p>- </p>
  183. </div>
  184. <div class="content">
  185. </div>
  186. </div>
  187. </div>
  188. <div class="right">
  189. <div class="rlist">
  190. <p>联系人:</p>
  191. <p>{{person?person:'-'}}</p>
  192. </div>
  193. <div class="rlist">
  194. <p>电话:</p>
  195. <p>{{telphone?telphone:'-'}}</p>
  196. </div>
  197. <div class="rlist">
  198. <p>地址:</p>
  199. <p>{{address?address:'-'}}</p>
  200. </div>
  201. </div> -->
  202. <div class="top">
  203. <div class="tlist">
  204. <img src="images/tslxr.png" alt="">
  205. <div class="right">
  206. <span>联系人:</span>
  207. <span>{{person?person:'-'}}</span>
  208. </div>
  209. </div>
  210. <div class="tlist">
  211. <img src="images/tsdh.png" alt="">
  212. <div class="right">
  213. <span>电话:</span>
  214. <span>{{telphone?telphone:'-'}}</span>
  215. </div>
  216. </div>
  217. <div class="tlist">
  218. <img src="images/tsdz.png" alt="">
  219. <div class="right">
  220. <span>地址:</span>
  221. <span>{{address?address:'-'}}</span>
  222. </div>
  223. </div>
  224. </div>
  225. <div class="bottom">
  226. <div class="list" v-for="(item, index) in leftList" :key="index">
  227. <div class="title">{{item.parkForm}}</div>
  228. <div class="content">
  229. <div v-for="(tabl, indexl) in item.children" :key="indexl">
  230. {{indexl+1}}.{{tabl.information}}
  231. </div>
  232. </div>
  233. </div>
  234. </div>
  235. </div>
  236. </div>
  237. <div style="width:100%;" class="footer"></div>
  238. </body>
  239. <script>
  240. $(function () {
  241. /*公共部分
  242. * 导航栏
  243. * footer CopyRight
  244. */
  245. $(".header").load('https://www.cqna.gov.cn/ggbf_search/top/top_style.html');
  246. $(".footer").load('https://www.cqna.gov.cn/ggbf_search/ggyr/2022foot/bottomBlack.html');
  247. });
  248. </script>
  249. <script>
  250. // 初始化Vue实例
  251. new Vue({
  252. el: '#tsfw',
  253. data: function () {
  254. return {
  255. reqPtah: '',
  256. // reqPtah: 'http://172.16.99.105:8082',
  257. leftList: [],
  258. person: '',
  259. telphone: '',
  260. address: '',
  261. currentTitle: ''
  262. };
  263. },
  264. methods: {
  265. getDetailData(id) {
  266. let that = this;
  267. $.ajax({
  268. url: conpath + "/parkData/" + id,
  269. type: "get",
  270. dataType: "json",
  271. success: function (data) {
  272. that.currentTitle = data.title;
  273. }
  274. })
  275. },
  276. getParkData(id) {
  277. let that = this;
  278. $.ajax({
  279. url: conpath + "/specialService/list/" + id,
  280. type: "get",
  281. dataType: "json",
  282. success: function (data) {
  283. var parkData = data.data[0];
  284. that.person = parkData.contacts;
  285. that.telphone = parkData.contactsPhone;
  286. that.address = parkData.contactsAddr;
  287. let value = data.data;
  288. let newList = []
  289. value.forEach(item => {
  290. let status = newList.find(el => el.parkForm === item.parkForm) // 判断第一层级,用name属性来判断
  291. if (status) {
  292. status.children.push({ ...item }) // 将数据插入到第二层级中
  293. } else {
  294. let obj = { ...item, children: [{ ...item }] }
  295. newList.push(obj)
  296. }
  297. })
  298. that.leftList = newList;
  299. }
  300. })
  301. }
  302. },
  303. mounted() {
  304. const url = new URL(window.location.href);
  305. const id = url.searchParams.get('id');
  306. this.getParkData(id);
  307. this.getDetailData(id);
  308. }
  309. });
  310. </script>
  311. </html>