Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김민규
/
rest_stop_list
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
지창언
2022-06-02 11:19:57 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f40b11a43d2c1bfb34110e3df99ee543cfb59025
f40b11a4
1 parent
67d19137
error definition..
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
app/views/weather.html
app/views/weather.html
View file @
f40b11a
...
...
@@ -365,13 +365,14 @@
}
//fetch
// 아래 fetch 상황 0602일 11:19 분 기준, 데이터 가져올 수 없음..
fetch
(
'http://data.ex.co.kr/openapi/restinfo/restWeatherList?key=6806352377&type=json&sdate='
+
date1
+
'&stdHour='
+
(
'0'
+
String
(
time1
)).
slice
(
-
2
)).
then
(
function
(
response
){
//testing
//fetch('http://data.ex.co.kr/openapi/restinfo/restWeatherList?key=test&type=json&sdate='+ "20220316" +'&stdHour='+ ('0'+ String(16)).slice(-2)).then(function(response){
method
:
'GET'
;
body
:
JSON
.
stringify
(
this
.
obj
)
response
.
text
().
then
(
function
(
text
){
console
.
log
(
text
)
//불필요한 데이터들을 정리하고 split을 이용하여 text data를 array data로 변환
//{}로 구성된 한 세트의 데이터가 어레이의 원소 하나가 되도록 split을 사용
index1
=
text
.
indexOf
(
'['
)
...
...
Please
register
or
login
to post a comment