d1e1798b by 任超

Merge branch 'master' of yun.pashanhoo.com:renchao/portalStaticPage

2 parents 2d482f94 1b23dd3c
...@@ -11,4 +11,25 @@ $(function(){ ...@@ -11,4 +11,25 @@ $(function(){
11 $('#phone').text(getCookie().phone) 11 $('#phone').text(getCookie().phone)
12 $('#zjhm').text(getCookie().zjhm) 12 $('#zjhm').text(getCookie().zjhm)
13 $('#recordtime').text(getCookie().recordtime) 13 $('#recordtime').text(getCookie().recordtime)
14 $('#hellotime').text(getTimeState())
14 }) 15 })
16 function getTimeState(){
17 // 获取当前时间
18 let timeNow = new Date();
19 // 获取当前小时
20 let hours = timeNow.getHours();
21 // 设置默认文字
22 let text = '';
23 // 判断当前时间段
24 if (hours >= 0 && hours <= 10) {
25 text = '早上好:';
26 } else if (hours > 10 && hours <= 14) {
27 text = '中午好:';
28 } else if (hours > 14 && hours <= 18) {
29 text = '下午好:';
30 } else if (hours > 18 && hours <= 24) {
31 text = `晚上好:`;
32 }
33 // 返回当前时间段对应的状态
34 return text;
35 };
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -26,7 +26,9 @@ $(function () { ...@@ -26,7 +26,9 @@ $(function () {
26 dataRendering(dataList.list) 26 dataRendering(dataList.list)
27 } 27 }
28 }) 28 })
29 29 $(function() {
30 $('#hellotime').text(getTimeState())
31 })
30 $(document).on("click", ".appintmentList li .handle", function () { 32 $(document).on("click", ".appintmentList li .handle", function () {
31 let businessNo = $(this).attr('data-businessNo'); 33 let businessNo = $(this).attr('data-businessNo');
32 let slsqBsm = $(this).attr('data-slsqBsm'); 34 let slsqBsm = $(this).attr('data-slsqBsm');
...@@ -254,6 +256,26 @@ function dataRendering() { ...@@ -254,6 +256,26 @@ function dataRendering() {
254 $('.appintmentList').append(li) 256 $('.appintmentList').append(li)
255 } 257 }
256 } 258 }
259 function getTimeState(){
260 // 获取当前时间
261 let timeNow = new Date();
262 // 获取当前小时
263 let hours = timeNow.getHours();
264 // 设置默认文字
265 let text = '';
266 // 判断当前时间段
267 if (hours >= 0 && hours <= 10) {
268 text = '早上好:';
269 } else if (hours > 10 && hours <= 14) {
270 text = '中午好:';
271 } else if (hours > 14 && hours <= 18) {
272 text = '下午好:';
273 } else if (hours > 18 && hours <= 24) {
274 text = `晚上好:`;
275 }
276 // 返回当前时间段对应的状态
277 return text;
278 };
257 279
258 var dataList = { 280 var dataList = {
259 "list": [], 281 "list": [],
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
28 <img src="../staticImages/person.png" alt=""> 28 <img src="../staticImages/person.png" alt="">
29 <ul> 29 <ul>
30 <li> 30 <li>
31 <span>上午好:</span> 31 <span id='hellotime'>上午好:</span>
32 <p id="username"></p> 32 <p id="username"></p>
33 </li> 33 </li>
34 <li> 34 <li>
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
29 <img src="../staticImages/person.png" alt=""> 29 <img src="../staticImages/person.png" alt="">
30 <ul> 30 <ul>
31 <li> 31 <li>
32 <span>上午好:</span> 32 <span id='hellotime'>上午好:</span>
33 <p id="username"></p> 33 <p id="username"></p>
34 </li> 34 </li>
35 <li> 35 <li>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
43 <li class="applyBusinessRecord"> 43 <li class="applyBusinessRecord">
44 <a data-id='1' class="itemTitleActive"> 44 <a data-id='1' class="itemTitleActive">
45 <p> 45 <p>
46 <span>5</span> 46 <span>0</span>
47 <b></b> 47 <b></b>
48 </p> 48 </p>
49 <p>办理合计</p> 49 <p>办理合计</p>
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
52 <li class="to_be_submitted"> 52 <li class="to_be_submitted">
53 <a data-id='2'> 53 <a data-id='2'>
54 <p> 54 <p>
55 <span>1</span> 55 <span>0</span>
56 <b></b> 56 <b></b>
57 </p> 57 </p>
58 <p>待提交</p> 58 <p>待提交</p>
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
61 <li class="applyBusinessIn"> 61 <li class="applyBusinessIn">
62 <a data-id='3'> 62 <a data-id='3'>
63 <p> 63 <p>
64 <span>5</span> 64 <span>0</span>
65 <b></b> 65 <b></b>
66 </p> 66 </p>
67 <p>办理中</p> 67 <p>办理中</p>
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
70 <li class="applyBusinessEnd"> 70 <li class="applyBusinessEnd">
71 <a data-id='6'> 71 <a data-id='6'>
72 <p> 72 <p>
73 <span>5</span> 73 <span>0</span>
74 <b></b> 74 <b></b>
75 </p> 75 </p>
76 <p>已办结</p> 76 <p>已办结</p>
......