김서연

휴무일 여부 추가 & 시간 전처리

...@@ -78,10 +78,9 @@ app.post('/',function(req,res,next){ ...@@ -78,10 +78,9 @@ app.post('/',function(req,res,next){
78 eachtime.push(''); 78 eachtime.push('');
79 else 79 else
80 eachtime.push(searchList[i].endTm.substr(2,2)); 80 eachtime.push(searchList[i].endTm.substr(2,2));
81 - if(eachtime == null) 81 +
82 - eachtime.push(''); 82 + timeList.push(eachtime);
83 - else 83 +
84 - timeList.push(eachtime);
85 } 84 }
86 res.render('index', {result:JSON.stringify(searchList),info:searchList ,timeList:timeList}); 85 res.render('index', {result:JSON.stringify(searchList),info:searchList ,timeList:timeList});
87 86
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 - <title>여러개 마커에 이벤트 등록하기1</title> 5 + <title>코로나 백신 의료기관 조회</title>
6 6
7 <!-- <link rel="stylesheet" href="/css/master.css"> --> 7 <!-- <link rel="stylesheet" href="/css/master.css"> -->
8 8
...@@ -30,9 +30,20 @@ ...@@ -30,9 +30,20 @@
30 <% for(i=0; i<info.length; i++){%> 30 <% for(i=0; i<info.length; i++){%>
31 <li class="item"> 31 <li class="item">
32 <div class="info"> 32 <div class="info">
33 - <span><strong><%= info[i].orgnm%></strong></span><br> 33 + <span><strong><%= info[i].orgnm%></strong></span>
34 - <span>점심시간 : <%=timeList[i][0]%>:<%=timeList[i][1]%>~<%=timeList[i][2]%>:<%=timeList[i][3] %></span><br> 34 + <%if(info[i].hldyYn=='N') {%>
35 - <span>진료시간 : <%=timeList[i][4]%>:<%=timeList[i][5]%>~<%=timeList[i][6]%>:<%=timeList[i][7] %></span><br> 35 + <span style="color:red"> (당일 휴무) </span>
36 + <%}else { %>
37 + <span style="color:green"> (정상운영) </span>
38 + <%}%>
39 +
40 + <br>
41 + <% if(timeList[i][0]!="" && timeList[i][1]!="" && timeList[i][2]!="" && timeList[i][3]!=""){%>
42 + <span>점심시간 : <%=timeList[i][0]%>:<%=timeList[i][1]%>~<%=timeList[i][2]%>:<%=timeList[i][3] %></span><br>
43 + <%}%>
44 + <% if(timeList[i][4]!="" && timeList[i][5]!="" && timeList[i][6]!="" && timeList[i][7]!=""){%>
45 + <span>진료시간 : <%=timeList[i][4]%>:<%=timeList[i][5]%>~<%=timeList[i][6]%>:<%=timeList[i][7] %></span><br>
46 + <%}%>
36 <span style="color:gray" class="jibun gray"><%=info[i].orgZipaddr%></span><br> 47 <span style="color:gray" class="jibun gray"><%=info[i].orgZipaddr%></span><br>
37 <span style="color:blue" class="tel"><%=info[i].orgTlno%></span><br> 48 <span style="color:blue" class="tel"><%=info[i].orgTlno%></span><br>
38 </div> 49 </div>
......