123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>特色服务</title>
- <!-- 引入 Vue -->
- <script src="js/vue.min.js"></script>
- <!-- 引入样式 -->
- <link rel="stylesheet" href="css/index.css">
- <!-- 引入组件库 -->
- <script src="js/index.js"></script>
- <!-- jquery-->
- <script src="js/jquery-3.5.1.min.js"></script>
- <script src="js/urljson.js"></script>
- <style>
- * {
- padding: 0;
- margin: 0;
- }
- html,
- body {
- margin: 0;
- padding: 0;
- font-family: Microsoft YaHei;
- height: 100%;
- background: #EDF5FF;
- }
- @font-face {
- font-family: 'DOUYU';
- src: url('fonts/DOUYUFONT-2.OTF');
- font-weight: normal;
- font-style: normal;
- }
- .tsfw>.top {
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: 1px solid #B7C7DC;
- background: #FFFFFF;
- }
- .toplogo {
- display: flex;
- align-items: center;
- font-family: DOUYU;
- font-weight: normal;
- font-size: 30px;
- color: #186FF0;
- height: 66px;
- cursor: pointer;
- }
- .toplogo img {
- margin: 0 20px;
- margin-bottom: 17px;
- }
- .backbutton {
- width: 117px;
- height: 42px;
- background: #DEEDFF;
- border-radius: 10px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- font-size: 16px;
- color: #2474F1;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: 10px;
- cursor: pointer;
- }
- .backbutton img {
- margin-right: 10px;
- }
- .tsfw>.container {
- width: 100%;
- background-image: url(images/bg-tsfw.png);
- background-size: 100% 100%;
- padding: 10px 20px;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- justify-content: center;
- min-width: 380px;
- }
- .tsfw .top {
- display: flex;
- justify-content: space-between;
- }
- .top .tlist {
- width: 31.5%;
- height: 155px;
- font-size: 26px;
- color: #194D8C;
- background: rgb(255 255 255 / 30%);
- border-radius: 10px;
- display: flex;
- align-items: center;
- padding-left: 50px;
- padding-right: 20px;
- box-sizing: border-box;
- }
- .tlist img {
- margin-right: 20px;
- }
- .tlist .right {
- display: flex;
- flex-direction: column;
- }
- .tlist .right span:last-child {
- margin-top: 10px;
- }
- .bottom {
- display: flex;
- flex-wrap: wrap;
- }
- .bottom .list {
- width: 32.8%;
- height: 323px;
- font-size: 20px;
- background: rgb(255 255 255 / 40%);
- font-size: 20px;
- color: #194D8C;
- padding-left: 30px;
- padding-bottom: 10px;
- box-sizing: border-box;
- position: relative;
- padding-top: 100px;
- margin-top: 35px;
- margin-right: calc(1.6%/2);
- }
- .bottom .list:nth-child(3n) {
- margin-right: 0;
- }
- .bottom .list .title {
- position: absolute;
- top: -10px;
- font-weight: bold;
- font-size: 30px;
- color: #FFFFFF;
- text-align: center;
- width: 379px;
- height: 65px;
- line-height: 65px;
- background-image: url(images/bglt.png);
- background-size: 100% 100%;
- left: calc((100% - 379px)/2);
- }
- .bottom .list .content {
- line-height: 36px;
- }
- </style>
- </head>
- <body>
- <div style="width:100%;height:570px" class="header"></div>
- <div class="tsfw" id="tsfw">
- <div class="top">
- <div class="toplogo">
- <img src="images/gyylogo.png" alt="">
- <span>{{currentTitle}}特色服务</span>
- </div>
- <div class="backbutton" @click="window.history.go(-1)">
- <img src="images/back1.png" alt="">
- <span>返回</span>
- </div>
- </div>
- <div class="container">
- <!-- <div class="left">
- <div class="list" v-for="(item, index) in leftList" :key="index">
- <div class="title">
- <img src="images/bg-tsfw.png" alt="" style="width: 100%;height: 100%;">
- <p>{{item.parkForm}}</p>
- </div>
- <div class="content">
- <div v-for="(tabl, indexl) in item.children" :key="indexl">
- {{indexl+1}}.{{tabl.information}}
- </div>
- </div>
- </div>
- <div class="list" v-if="!leftList.length">
- <div class="title">
- <img :src="'images/bg-tsfw1.png'" alt="" style="width: 100%;height: 100%;">
- <p>- </p>
- </div>
- <div class="content">
- </div>
- </div>
- </div>
- <div class="right">
- <div class="rlist">
- <p>联系人:</p>
- <p>{{person?person:'-'}}</p>
- </div>
- <div class="rlist">
- <p>电话:</p>
- <p>{{telphone?telphone:'-'}}</p>
- </div>
- <div class="rlist">
- <p>地址:</p>
- <p>{{address?address:'-'}}</p>
- </div>
- </div> -->
- <div class="top">
- <div class="tlist">
- <img src="images/tslxr.png" alt="">
- <div class="right">
- <span>联系人:</span>
- <span>{{person?person:'-'}}</span>
- </div>
- </div>
- <div class="tlist">
- <img src="images/tsdh.png" alt="">
- <div class="right">
- <span>电话:</span>
- <span>{{telphone?telphone:'-'}}</span>
- </div>
- </div>
- <div class="tlist">
- <img src="images/tsdz.png" alt="">
- <div class="right">
- <span>地址:</span>
- <span>{{address?address:'-'}}</span>
- </div>
- </div>
- </div>
- <div class="bottom">
- <div class="list" v-for="(item, index) in leftList" :key="index">
- <div class="title">{{item.parkForm}}</div>
- <div class="content">
- <div v-for="(tabl, indexl) in item.children" :key="indexl">
- {{indexl+1}}.{{tabl.information}}
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div style="width:100%;" class="footer"></div>
- </body>
- <script>
- $(function () {
- /*公共部分
- * 导航栏
- * footer CopyRight
- */
- $(".header").load('https://www.cqna.gov.cn/ggbf_search/top/top_style.html');
- $(".footer").load('https://www.cqna.gov.cn/ggbf_search/ggyr/2022foot/bottomBlack.html');
- });
- </script>
- <script>
- // 初始化Vue实例
- new Vue({
- el: '#tsfw',
- data: function () {
- return {
- reqPtah: '',
- // reqPtah: 'http://172.16.99.105:8082',
- leftList: [],
- person: '',
- telphone: '',
- address: '',
- currentTitle: ''
- };
- },
- methods: {
- getDetailData(id) {
- let that = this;
- $.ajax({
- url: conpath + "/parkData/" + id,
- type: "get",
- dataType: "json",
- success: function (data) {
- that.currentTitle = data.title;
- }
- })
- },
- getParkData(id) {
- let that = this;
- $.ajax({
- url: conpath + "/specialService/list/" + id,
- type: "get",
- dataType: "json",
- success: function (data) {
- var parkData = data.data[0];
- that.person = parkData.contacts;
- that.telphone = parkData.contactsPhone;
- that.address = parkData.contactsAddr;
- let value = data.data;
- let newList = []
- value.forEach(item => {
- let status = newList.find(el => el.parkForm === item.parkForm) // 判断第一层级,用name属性来判断
- if (status) {
- status.children.push({ ...item }) // 将数据插入到第二层级中
- } else {
- let obj = { ...item, children: [{ ...item }] }
- newList.push(obj)
- }
- })
- that.leftList = newList;
- }
- })
- }
- },
- mounted() {
- const url = new URL(window.location.href);
- const id = url.searchParams.get('id');
- this.getParkData(id);
- this.getDetailData(id);
- }
- });
- </script>
- </html>
|