我的预约接口联调
Showing
10 changed files
with
131 additions
and
50 deletions
... | @@ -348,6 +348,10 @@ | ... | @@ -348,6 +348,10 @@ |
348 | text-align: center; | 348 | text-align: center; |
349 | line-height: 130px; | 349 | line-height: 130px; |
350 | } | 350 | } |
351 | .business_item{ | ||
352 | margin-bottom: 10px; | ||
353 | overflow: hidden; | ||
354 | } | ||
351 | .business_item ul { | 355 | .business_item ul { |
352 | display: inline-block; | 356 | display: inline-block; |
353 | width: 80%; | 357 | width: 80%; |
... | @@ -372,10 +376,10 @@ | ... | @@ -372,10 +376,10 @@ |
372 | width: 100%; | 376 | width: 100%; |
373 | height: 100%; | 377 | height: 100%; |
374 | } | 378 | } |
375 | .business_item ul .item_appoint:hover { | 379 | /* .business_item ul .item_appoint:hover { |
376 | background-color: #0091FF; | 380 | background-color: #0091FF; |
377 | color: #fff; | 381 | color: #fff; |
378 | } | 382 | } */ |
379 | .isAppoint { | 383 | .isAppoint { |
380 | cursor:not-allowed!important; | 384 | cursor:not-allowed!important; |
381 | } | 385 | } | ... | ... |
... | @@ -38,3 +38,23 @@ function GetQueryString(name) { | ... | @@ -38,3 +38,23 @@ function GetQueryString(name) { |
38 | var r = window.location.search.substr(1).match(reg); | 38 | var r = window.location.search.substr(1).match(reg); |
39 | if (r!=null) return (r[2]); return null; | 39 | if (r!=null) return (r[2]); return null; |
40 | } | 40 | } |
41 | // 存储cookie | ||
42 | function setCookie(resdata,duration){ | ||
43 | var date = new Date(); | ||
44 | date.setTime(date.getTime() + duration*24*3600*1000); | ||
45 | document.cookie = "myCookie=" + JSON.stringify(resdata) | ||
46 | + "; expires=" +date.toGMTString() + "; path=/"; | ||
47 | // document.cookie = " myCookie =" + JSON.stringify(resdata) + ';expires=' + date.toGMTString(); | ||
48 | }; | ||
49 | |||
50 | //获取cookie | ||
51 | function getCookie(){ | ||
52 | var str = document.cookie; | ||
53 | if(str == ''){ | ||
54 | return false | ||
55 | }else{ | ||
56 | $('.PersonLogin').css('pointer-events', 'none') | ||
57 | var arr = str.replace(/(\s)+/g,'').split('='); | ||
58 | return JSON.parse(arr[1]); | ||
59 | } | ||
60 | }; | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -74,4 +74,5 @@ document.writeln("</body>"); | ... | @@ -74,4 +74,5 @@ document.writeln("</body>"); |
74 | document.writeln(""); | 74 | document.writeln(""); |
75 | document.writeln("</html>"); | 75 | document.writeln("</html>"); |
76 | document.writeln("<script type='text/javascript' src=\'" + localhostPaht + "/staticLib/layui/layui.js\'></script>"); | 76 | document.writeln("<script type='text/javascript' src=\'" + localhostPaht + "/staticLib/layui/layui.js\'></script>"); |
77 | document.writeln("<script src=\'https://at.alicdn.com/t/font_2174584_1j8kvwarwge.js\'></script>"); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
77 | document.writeln("<script src=\'https://at.alicdn.com/t/font_2174584_1j8kvwarwge.js\'></script>"); | ||
78 | |||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -32,8 +32,11 @@ $(document).on('click', '#loginButton', function(){ | ... | @@ -32,8 +32,11 @@ $(document).on('click', '#loginButton', function(){ |
32 | userLoginRequest.username = username | 32 | userLoginRequest.username = username |
33 | userLoginRequest.password = password | 33 | userLoginRequest.password = password |
34 | clicklogin(userLoginRequest) | 34 | clicklogin(userLoginRequest) |
35 | // layer.closeAll() | 35 | layer.closeAll() |
36 | }); | 36 | }); |
37 | $(function(){ | ||
38 | $('.PersonLogin').html(getCookie().username) | ||
39 | }) | ||
37 | // 点击注册的时候 | 40 | // 点击注册的时候 |
38 | $(document).on('click', '#registerButton', function(){ | 41 | $(document).on('click', '#registerButton', function(){ |
39 | // layer.closeAll() | 42 | // layer.closeAll() |
... | @@ -49,11 +52,16 @@ function clicklogin(data){ | ... | @@ -49,11 +52,16 @@ function clicklogin(data){ |
49 | dataType: "json", | 52 | dataType: "json", |
50 | data:JSON.stringify(data),//***关键****** | 53 | data:JSON.stringify(data),//***关键****** |
51 | success: function (result) {//返回数据根据结果进行相应的处理 | 54 | success: function (result) {//返回数据根据结果进行相应的处理 |
52 | if (result.code == 200 && result.data != null) { | 55 | console.log(222,result) |
53 | console.log(232323,result) | 56 | if(result.code ==200 && result.data!==null){ |
54 | } | 57 | setCookie(result.data) |
58 | $('.PersonLogin').html(getCookie().username) | ||
59 | }else if(result.code ==500){ | ||
60 | window.open(`${localhostPaht}/staticViews/register.html`,'_self') | ||
61 | } | ||
55 | } | 62 | } |
56 | }); | 63 | }); |
57 | } | 64 | } |
65 | |||
58 | 66 | ||
59 | 67 | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -3,7 +3,7 @@ $(function () { | ... | @@ -3,7 +3,7 @@ $(function () { |
3 | var province = undefined | 3 | var province = undefined |
4 | var city = undefined | 4 | var city = undefined |
5 | // 办事大厅 | 5 | // 办事大厅 |
6 | var halloffice = '不夜城' | 6 | var jgid = '不夜城' |
7 | $('.area_list li').click(function () { | 7 | $('.area_list li').click(function () { |
8 | $(".area_list li").removeClass("activeRegion") | 8 | $(".area_list li").removeClass("activeRegion") |
9 | $(this).addClass("activeRegion"); | 9 | $(this).addClass("activeRegion"); |
... | @@ -137,6 +137,8 @@ $(function () { | ... | @@ -137,6 +137,8 @@ $(function () { |
137 | $(this).addClass("active2"); | 137 | $(this).addClass("active2"); |
138 | var index = $(this).index(); | 138 | var index = $(this).index(); |
139 | console.log(4444,index) | 139 | console.log(4444,index) |
140 | jgid = $(this).data('id') | ||
141 | console.log(jgid) | ||
140 | }) | 142 | }) |
141 | infoWindow.addEventListener('close', function (type, target, point) { | 143 | infoWindow.addEventListener('close', function (type, target, point) { |
142 | $('.office_halls li').eq(0).removeClass('hallActive') | 144 | $('.office_halls li').eq(0).removeClass('hallActive') |
... | @@ -153,7 +155,7 @@ $(function () { | ... | @@ -153,7 +155,7 @@ $(function () { |
153 | _initData() | 155 | _initData() |
154 | // 下一步 | 156 | // 下一步 |
155 | $('.nextButton').click(function(){ | 157 | $('.nextButton').click(function(){ |
156 | window.open("./yysj.html?halloffice="+halloffice+"","_self") | 158 | window.open("./yysj.html?jgid="+jgid+"","_self") |
157 | }) | 159 | }) |
158 | }) | 160 | }) |
159 | function _initData() { | 161 | function _initData() { | ... | ... |
1 | $(function () { | 1 | $(function () { |
2 | var latitude =undefined | ||
3 | var longitude =undefined | ||
4 | var orgname = undefined | ||
2 | layui.use('element', function () { | 5 | layui.use('element', function () { |
3 | let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块 | 6 | let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块 |
4 | //监听导航点击 | 7 | //监听导航点击 |
... | @@ -8,7 +11,7 @@ $(function () { | ... | @@ -8,7 +11,7 @@ $(function () { |
8 | }); | 11 | }); |
9 | // 地图 | 12 | // 地图 |
10 | var map = new BMap.Map('container'); | 13 | var map = new BMap.Map('container'); |
11 | var point = new BMap.Point(108.95346, 34.265725); | 14 | var point = new BMap.Point(longitude, latitude); |
12 | map.centerAndZoom(point, 15); | 15 | map.centerAndZoom(point, 15); |
13 | // 创建点标记 | 16 | // 创建点标记 |
14 | var marker = new BMap.Marker(point); | 17 | var marker = new BMap.Marker(point); |
... | @@ -17,13 +20,73 @@ $(function () { | ... | @@ -17,13 +20,73 @@ $(function () { |
17 | var opts = { | 20 | var opts = { |
18 | width: 200, | 21 | width: 200, |
19 | height: 100, | 22 | height: 100, |
20 | title: '不夜城' | 23 | title: orgname |
21 | }; | 24 | }; |
22 | var infoWindow = new BMap.InfoWindow('大唐不夜城', opts); | 25 | var infoWindow = new BMap.InfoWindow( orgname, opts); |
23 | // 点标记添加点击事件 | 26 | // 点标记添加点击事件 |
24 | map.openInfoWindow(infoWindow, point); // 开启信息窗口 | 27 | map.openInfoWindow(infoWindow, point); // 开启信息窗口 |
25 | marker.addEventListener('click', function () { | 28 | marker.addEventListener('click', function () { |
26 | map.openInfoWindow(infoWindow, point); // 开启信息窗口 | 29 | map.openInfoWindow(infoWindow, point); // 开启信息窗口 |
27 | }); | 30 | }); |
28 | map.enableScrollWheelZoom(); | 31 | map.enableScrollWheelZoom(); |
29 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
32 | getAppointmentDetail() | ||
33 | }); | ||
34 | // GET 根据预约信息标识码appointmentId查看预约详情 | ||
35 | function getAppointmentDetail(){ | ||
36 | $.ajax({ | ||
37 | type: "get", //提交方式 | ||
38 | url: | ||
39 | portal.api_url + "/portal/appointmentmh/getAppointmentDetail", | ||
40 | data: { | ||
41 | appointmentId: GetRequest(), | ||
42 | }, | ||
43 | dataType: "json", | ||
44 | //数据,这里使用的是Json格式进行传输 | ||
45 | success: function (result) { | ||
46 | //返回数据根据结果进行相应的处理 | ||
47 | if (result.code == 200) { | ||
48 | var renegeCounttotal =undefined | ||
49 | console.log('ff',result) | ||
50 | $('#username').text(result.data.username) | ||
51 | $('#zjhm').text(result.data.zjhm) | ||
52 | $('#orgName').text(result.data.orgName) | ||
53 | $('#hbShortname').text(result.data.hbShortname) | ||
54 | $('#reservationNumber').text(result.data.reservationNumber) | ||
55 | console.log(result.data.bookingDate.substr(0,4)) | ||
56 | var year = result.data.bookingDate.substr(0,4) + '年' | ||
57 | var month = result.data.bookingDate.substr(4,2) + '月' | ||
58 | var day= result.data.bookingDate.substr(6,2) + '日' | ||
59 | var startTime= result.data.startTime + '至' | ||
60 | var endTime= result.data.endTime | ||
61 | var yysjtotal = year + month + day + startTime + endTime | ||
62 | $('#yysj').text(yysjtotal) | ||
63 | if(result.data.renegeCount == null){ | ||
64 | renegeCounttotal = 0 | ||
65 | }else{ | ||
66 | renegeCounttotal = result.data.renegeCount | ||
67 | } | ||
68 | $('#renegeCount').html(renegeCounttotal) | ||
69 | $('#renegeCount').css('color','red') | ||
70 | |||
71 | longitude= result.data.longitude | ||
72 | latitude= result.data.latitude | ||
73 | orgname= result.data.orgName | ||
74 | } | ||
75 | }, | ||
76 | }); | ||
77 | } | ||
78 | function GetRequest() { | ||
79 | var url = location.search; //获取url中"?"符后的字串 | ||
80 | var theRequest = new Object(); | ||
81 | if (url.indexOf("?") != -1) { | ||
82 | var str = url.substr(1); | ||
83 | strs = str.split("?"); | ||
84 | for (var i = 0; i < strs.length; i++) { | ||
85 | theRequest[strs[i].split("=")[0]] = decodeURIComponent( | ||
86 | strs[i].split("=")[1] | ||
87 | ); | ||
88 | } | ||
89 | } | ||
90 | return theRequest.appointmentId; | ||
91 | } | ||
92 | |||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
This diff is collapsed.
Click to expand it.
... | @@ -90,7 +90,7 @@ | ... | @@ -90,7 +90,7 @@ |
90 | </div> | 90 | </div> |
91 | <div class="footer_button"> | 91 | <div class="footer_button"> |
92 | <button type="button" class="layui-btn layui-btn-normal"> | 92 | <button type="button" class="layui-btn layui-btn-normal"> |
93 | <a href="../yyxz/index.html" title="上一步"> | 93 | <a href="./yyxz.html" title="上一步"> |
94 | 上一步 | 94 | 上一步 |
95 | </a> | 95 | </a> |
96 | </button> | 96 | </button> | ... | ... |
... | @@ -67,12 +67,12 @@ | ... | @@ -67,12 +67,12 @@ |
67 | <div class="title"> | 67 | <div class="title"> |
68 | <h3> | 68 | <h3> |
69 | 预约成功!您的预约号: | 69 | 预约成功!您的预约号: |
70 | <span>952567654</span> | 70 | <span id='reservationNumber'></span> |
71 | </h3> | 71 | </h3> |
72 | <p>请记录下您的预约号,以便后续的预约服务。</p> | 72 | <p>请记录下您的预约号,以便后续的预约服务。</p> |
73 | </div> | 73 | </div> |
74 | <ul> | 74 | <ul> |
75 | <li>1.您曾经失约(0)次,请留意您本次的预约时间和业务类型,切勿迟到或失约。</li> | 75 | <li>1.您曾经失约<span id='renegeCount'></span>次,请留意您本次的预约时间和业务类型,切勿迟到或失约。</li> |
76 | <li>2.如确需取消预约,请提前1天登陆系统办理</li> | 76 | <li>2.如确需取消预约,请提前1天登陆系统办理</li> |
77 | <li>3.请凭预约号及相关证件,按预约时间提前10分钟到选定的不动产登记中心办理业务</li> | 77 | <li>3.请凭预约号及相关证件,按预约时间提前10分钟到选定的不动产登记中心办理业务</li> |
78 | </ul> | 78 | </ul> |
... | @@ -83,23 +83,23 @@ | ... | @@ -83,23 +83,23 @@ |
83 | <ul> | 83 | <ul> |
84 | <li> | 84 | <li> |
85 | <span>姓名:</span> | 85 | <span>姓名:</span> |
86 | <p>任超</p> | 86 | <p id="username"></p> |
87 | </li> | 87 | </li> |
88 | <li> | 88 | <li> |
89 | <span>身份证号:</span> | 89 | <span>身份证号:</span> |
90 | <p>6101245646546</p> | 90 | <p id='zjhm'></p> |
91 | </li> | 91 | </li> |
92 | <li> | 92 | <li> |
93 | <span>办事大厅:</span> | 93 | <span>办事大厅:</span> |
94 | <p>碑林区办事大厅</p> | 94 | <p id="orgName"></p> |
95 | </li> | 95 | </li> |
96 | <li> | 96 | <li> |
97 | <span>预约业务:</span> | 97 | <span>预约业务:</span> |
98 | <p>二手房过户</p> | 98 | <p id="hbShortname"></p> |
99 | </li> | 99 | </li> |
100 | <li> | 100 | <li> |
101 | <span>预约时间:</span> | 101 | <span>预约时间:</span> |
102 | <p>2020年10月16日上午 11:00</p> | 102 | <p id="yysj">2020年10月16日上午 11:00</p> |
103 | </li> | 103 | </li> |
104 | </ul> | 104 | </ul> |
105 | </div> | 105 | </div> | ... | ... |
... | @@ -89,7 +89,10 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD | ... | @@ -89,7 +89,10 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD |
89 | 89 | ||
90 | <div class="next_button"> | 90 | <div class="next_button"> |
91 | <button type="button" class="layui-btn layui-btn-normal"> | 91 | <button type="button" class="layui-btn layui-btn-normal"> |
92 | <a href="./yyxz.html" title="上一步"> | 92 | <!-- <a href="./yyxz.html" title="上一步"> |
93 | 上一步 | ||
94 | </a> --> | ||
95 | <a href="./xzqy.html" title="上一步"> | ||
93 | 上一步 | 96 | 上一步 |
94 | </a> | 97 | </a> |
95 | </button> | 98 | </button> |
... | @@ -109,13 +112,13 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD | ... | @@ -109,13 +112,13 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD |
109 | {{# if(item.isSelect){ }} | 112 | {{# if(item.isSelect){ }} |
110 | <ul class="swiper-slide layui-bg-gray active1"> | 113 | <ul class="swiper-slide layui-bg-gray active1"> |
111 | <li>{{item.week}}</li> | 114 | <li>{{item.week}}</li> |
112 | <li>{{item.date}}</li> | 115 | <li>{{item.jyjh}}</li> |
113 | </ul> | 116 | </ul> |
114 | {{# } }} | 117 | {{# } }} |
115 | {{# if(!item.isSelect){ }} | 118 | {{# if(!item.isSelect){ }} |
116 | <ul class="swiper-slide layui-bg-gray"> | 119 | <ul class="swiper-slide layui-bg-gray"> |
117 | <li>{{item.week}}</li> | 120 | <li>{{item.week}}</li> |
118 | <li>{{item.date}}</li> | 121 | <li>{{item.jyjh}}</li> |
119 | </ul> | 122 | </ul> |
120 | {{# } }} | 123 | {{# } }} |
121 | {{# }); }} | 124 | {{# }); }} |
... | @@ -130,35 +133,15 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD | ... | @@ -130,35 +133,15 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD |
130 | <span>-</span> | 133 | <span>-</span> |
131 | <span>{{item.endTime}}</span> | 134 | <span>{{item.endTime}}</span> |
132 | </div> | 135 | </div> |
133 | <ul> | 136 | <ul > |
134 | {{# layui.each(item.orgBusinessList, function(index1, item1){ }} | 137 | {{# layui.each(item.orgBusinessList, function(index1, item1){ }} |
135 | {{# if(item1.isyy==0){ }} | 138 | <li class="item_appoint" data-id='{{item1.periodRulesId}}'> |
136 | <li class="item_appoint"> | ||
137 | <h3> | ||
138 | {{item1.shortName}} | ||
139 | </h3> | ||
140 | {{# if(item1.isyy==1){ }} | ||
141 | <p style="color:#FF5722">({{item1.residueNumber}})</p> | ||
142 | {{# } }} | ||
143 | {{# if(item1.isyy==0){ }} | ||
144 | <p style="color:#5FB878">({{item1.residueNumber}})</p> | ||
145 | {{# } }} | ||
146 | </li> | ||
147 | {{# } }} | ||
148 | {{# if(item1.isyy==1){ }} | ||
149 | <li class="isAppoint"> | ||
150 | <h3> | 139 | <h3> |
151 | {{item1.shortName}} | 140 | {{item1.shortName}} |
152 | </h3> | 141 | </h3> |
153 | {{# if(item1.isyy==1){ }} | 142 | <p style="color:#5FB878">(剩{{item1.residueNumber}}票)</p> |
154 | <p style="color:#FF5722">({{item1.residueNumber}})</p> | ||
155 | {{# } }} | ||
156 | {{# if(item1.isyy==0){ }} | ||
157 | <p style="color:#5FB878">({{item1.residueNumber}})</p> | ||
158 | {{# } }} | ||
159 | </li> | 143 | </li> |
160 | {{# } }} | 144 | {{# }) }} |
161 | {{# }); }} | ||
162 | </ul> | 145 | </ul> |
163 | </div> | 146 | </div> |
164 | {{# }); }} | 147 | {{# }); }} | ... | ... |
-
Please register or sign in to post a comment