Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍용민
/
BusTime
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
홍용민
2021-06-09 17:01:07 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
9a43c8e26d616b264c688f193ee6855f07b1c8d8
9a43c8e2
2 parents
dc46458b
1e74c920
exports 및 오류 수정
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletions
BusInfo.js
amendment_request_model.txt
BusInfo.js
View file @
9a43c8e
...
...
@@ -104,7 +104,6 @@ function predict(){
var
gapSec
=
(
dateBusDeparture
.
getTime
()
-
date
.
getTime
())
/
1000
;
var
gapHour
=
Math
.
floor
(
gapSec
/
60
/
60
);
var
gapMin
=
Math
.
floor
((
gapSec
-
gapHour
*
3600
)
/
60
);
module
.
exports
.
data
=
{};
module
.
exports
.
data
.
remainTime
=
gapHour
+
"시간"
+
gapMin
+
"분 이상"
;
...
...
amendment_request_model.txt
0 → 100644
View file @
9a43c8e
코드 92번줄~ 수정 필요.
//기존 코드
body.remainTime = gapHour + "시간" + gapMin + "분 이상";
body.ETD_min_H = predictTime[0];
body.ETD_min_M = predictTime[1];
body.ETD_max_H = predictTime[2];
body.ETD_max_M = predictTime[3];
//수정 요청 코드
module.exports.data = {};
module.exports.data.remainTime = gapHour + "시간" + gapMin + "분 이상";
module.exports.ETD_min_H = predictTime[0];
module.exports.ETD_min_M = predictTime[1];
module.exports.ETD_max_H = predictTime[2];
module.exports.ETD_max_M = predictTime[3];
변수 명 body에 저장하면 파싱 body와 혼선될 가능성 높음.
exports로 데이터 전송 필요.
\ No newline at end of file
Please
register
or
login
to post a comment