Showing
3 changed files
with
15 additions
and
15 deletions
... | @@ -9,8 +9,8 @@ require('dotenv').config(); | ... | @@ -9,8 +9,8 @@ require('dotenv').config(); |
9 | router.post('/', function(req, res) { | 9 | router.post('/', function(req, res) { |
10 | console.log(req.body); | 10 | console.log(req.body); |
11 | let userSi = req.body.si | 11 | let userSi = req.body.si |
12 | - let userKu = req.body.ku; | 12 | + let userDong = req.body.dong; |
13 | - let userLocation = `${userSi} ${userKu}`; | 13 | + let userLocation = `${userSi} ${userDong}`; |
14 | let xyList = []; | 14 | let xyList = []; |
15 | console.log(userLocation); | 15 | console.log(userLocation); |
16 | let YOUR_API_KEY = process.env.KAKAO_APIKEY; | 16 | let YOUR_API_KEY = process.env.KAKAO_APIKEY; |
... | @@ -34,7 +34,7 @@ router.post('/', function(req, res) { | ... | @@ -34,7 +34,7 @@ router.post('/', function(req, res) { |
34 | console.log(xyList); | 34 | console.log(xyList); |
35 | } | 35 | } |
36 | }) | 36 | }) |
37 | - res.render('select', { 'si': req.body.si, 'ku': req.body.ku }); | 37 | + res.render('select', { 'si': req.body.si, 'dong': req.body.dong }); |
38 | }); | 38 | }); |
39 | 39 | ||
40 | module.exports = router; | 40 | module.exports = router; |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -17,20 +17,20 @@ html | ... | @@ -17,20 +17,20 @@ html |
17 | if (this.readyState == 4) { | 17 | if (this.readyState == 4) { |
18 | 18 | ||
19 | var result = JSON.parse(this.responseText); | 19 | var result = JSON.parse(this.responseText); |
20 | - var d = []; | 20 | + var dong_name = []; |
21 | - var c = []; | 21 | + var dong_code = []; |
22 | for(var i=0; i<result["admVOList"]["admVOList"].length; i++){ | 22 | for(var i=0; i<result["admVOList"]["admVOList"].length; i++){ |
23 | - d.push(result["admVOList"]["admVOList"][i].lowestAdmCodeNm); | 23 | + dong_name.push(result["admVOList"]["admVOList"][i].lowestAdmCodeNm); |
24 | - c.push(result["admVOList"]["admVOList"][i].admCode); | 24 | + dong_code.push(result["admVOList"]["admVOList"][i].admCode); |
25 | } | 25 | } |
26 | - console.log(c); | 26 | + console.log(dong_code); |
27 | - var target = document.getElementById("ku"); | 27 | + var target = document.getElementById("dong"); |
28 | target.options.length = 0; | 28 | target.options.length = 0; |
29 | 29 | ||
30 | - for (x in d) { | 30 | + for (x in dong_name) { |
31 | var opt = document.createElement("option"); | 31 | var opt = document.createElement("option"); |
32 | - opt.value = c[x]; | 32 | + opt.value = dong_code[x]; |
33 | - opt.innerHTML = d[x]; | 33 | + opt.innerHTML = dong_name[x]; |
34 | target.appendChild(opt); | 34 | target.appendChild(opt); |
35 | } | 35 | } |
36 | 36 | ||
... | @@ -99,8 +99,8 @@ html | ... | @@ -99,8 +99,8 @@ html |
99 | </select> | 99 | </select> |
100 | </div> | 100 | </div> |
101 | <div class="form-group col-sm-4"> | 101 | <div class="form-group col-sm-4"> |
102 | - <label for="ku">동</label> | 102 | + <label for="dong">동</label> |
103 | - <select class="form-control" id="ku" name="ku"> | 103 | + <select class="form-control" id="dong" name="dong"> |
104 | <option>선택해주세요.</option> | 104 | <option>선택해주세요.</option> |
105 | </select> | 105 | </select> |
106 | </div> | 106 | </div> | ... | ... |
... | @@ -5,7 +5,7 @@ html | ... | @@ -5,7 +5,7 @@ html |
5 | button k | 5 | button k |
6 | body | 6 | body |
7 | block content | 7 | block content |
8 | - h1 당신의 동네 : #{si} #{ku} | 8 | + h1 당신의 동네 : #{si} #{dong} |
9 | .row | 9 | .row |
10 | .col.s12.m7 | 10 | .col.s12.m7 |
11 | .card(style='background-color: skyblue; display: inline-block;') | 11 | .card(style='background-color: skyblue; display: inline-block;') | ... | ... |
-
Please register or login to post a comment