
--- Global.js
+++ Global.js
... | ... | @@ -4,8 +4,9 @@ |
4 | 4 |
const LOG_BASE_DIR = `${__dirname}/server/logs`; |
5 | 5 |
const SERVICE_STATUS = process.env.NODE_ENV;//development, production |
6 | 6 |
const PORT = 80; |
7 |
-const SYSTEM_VIEW_TYPE = 'admin';//admin, government, agency, guardian |
|
8 | 7 |
const API_SERVER_HOST = 'localhost:8080' |
8 |
+//const JUSO_API_KEY = 'U01TX0FVVEgyMDIzMDQxNzE2MTgyNzExMzY5MzU=='//실사용 Key |
|
9 |
+const JUSO_API_KEY = 'U01TX0FVVEgyMDIyMTEyMTE3NDE1NzExMzI0MjU=';//실사용 Key 사용가능하면, 제거 |
|
9 | 10 |
|
10 | 11 |
module.exports = { |
11 | 12 |
PROJECT_NAME, |
... | ... | @@ -15,4 +16,5 @@ |
15 | 16 |
SERVICE_STATUS, |
16 | 17 |
PORT, |
17 | 18 |
API_SERVER_HOST, |
19 |
+ JUSO_API_KEY |
|
18 | 20 |
}(파일 끝에 줄바꿈 문자 없음) |
--- client/views/component/Modal_SeniorInsert.jsx
+++ client/views/component/Modal_SeniorInsert.jsx
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 |
import SubTitle from "./SubTitle.jsx"; |
4 | 4 |
|
5 | 5 |
import CommonUtil from "../../resources/js/CommonUtil.js"; |
6 |
+import {JUSO_API_KEY} from "../../../Global.js"; |
|
6 | 7 |
|
7 | 8 |
export default function Modal({ open, close, seniorInsertCallback, defaultAgentId, defaultAgencyId, defaultGovernmentId }) { |
8 | 9 |
|
... | ... | @@ -243,6 +244,27 @@ |
243 | 244 |
} |
244 | 245 |
|
245 | 246 |
|
247 |
+ //주소 검색 |
|
248 |
+ const jusoSearch = (currentPage) => { |
|
249 |
+ // console.log("check done"); |
|
250 |
+ const vm = this; |
|
251 |
+ let url = `https://business.juso.go.kr/addrlink/addrLinkApi.do |
|
252 |
+ ?currentPage=${CommonUtil.isEmpty(currentPage) ? 1 : currentPage} |
|
253 |
+ &countPerPage=10 |
|
254 |
+ &resultType=json |
|
255 |
+ &keyword=${senior['user_address']} |
|
256 |
+ &confmKey=${JUSO_API_KEY} |
|
257 |
+ `; |
|
258 |
+ fetch(url, { |
|
259 |
+ method: "GET", |
|
260 |
+ }).then((response) => response.json()).then((data) => { |
|
261 |
+ console.log("시니어 등록 결과(건수) : ", data); |
|
262 |
+ }).catch((error) => { |
|
263 |
+ console.log('jusoSearch() : ', error); |
|
264 |
+ }); |
|
265 |
+}, |
|
266 |
+ |
|
267 |
+ |
|
246 | 268 |
|
247 | 269 |
//Mounted |
248 | 270 |
React.useEffect(() => { |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?