Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source-group1
/
animal-Info
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-05-29 22:08:26 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7098960a256d90adbe0420418b6b71a5eb6c8283
7098960a
1 parent
50a49335
ignore default
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
routes/category.js
views/index.ejs
routes/category.js
View file @
7098960
...
...
@@ -14,13 +14,15 @@ let user_longitude;
let
hospital_list
=
[];
router
.
post
(
'/hospital'
,
function
(
req
,
res
){
//gu 받아오기
var
body
=
req
.
body
;
var
gu_select
=
body
.
user_gu
;
console
.
log
(
gu_select
);
//
console.log(gu_select);
// encoding for url
var
menu
=
urlencode
(
'동물병원'
);
var
gu_select_encode
=
urlencode
(
gu_select
);
console
.
log
(
gu_select_encode
);
//
console.log(gu_select_encode);
//api
let
pet_url
=
`http://api.kcisa.kr/openapi/service/rest/convergence2019/getConver03?serviceKey=
${
ANIMAL_INFO_API_KEY
}
&numOfRows=100&pageNo=1&keyword=
${
menu
}
&where=
${
gu_select_encode
}
`
;
...
...
views/index.ejs
View file @
7098960
...
...
@@ -69,7 +69,6 @@
<script>
function
sm
()
{
document
.
getElementById
(
"location"
).
submit
();
//document.location.href="/category/hospital";
}
</script>
...
...
@@ -94,7 +93,7 @@
</p>
<form
action=
"/category/hospital"
method=
"post"
name=
"location"
id=
"location"
>
<select
onchange=
"sm()"
name=
"user_gu"
id=
"user_gu_select"
>
<option
value=
"
"
>
--Please choose an option--
</option>
<option
value=
''
selected=
"true"
disabled=
"true
"
>
--Please choose an option--
</option>
<option
value=
'금천구'
>
금천구
</option>
<option
value=
'강남구'
>
강남구
</option>
</select>
...
...
Please
register
or
login
to post a comment