주석추가
This commit is contained in:
parent
d40393dca2
commit
b26585b225
@ -19,6 +19,7 @@ import { isEmpty } from '@/common/utils';
|
||||
const key1 = 'vrkIY7jUy82WRHIozbBtz4n2L89jAqNDY%2B4DmNpmasTex%2FNDySN7FDYwBqPj1p%2BxXLg13BzYfgHPt6eipWhH8Q%3D%3D';
|
||||
const key2 = 'vrkIY7jUy82WRHIozbBtz4n2L89jAqNDY+4DmNpmasTex/NDySN7FDYwBqPj1p+xXLg13BzYfgHPt6eipWhH8Q==';
|
||||
const dayjs = inject('dayjs');
|
||||
const fullCalendarRef = ref(null);
|
||||
|
||||
const fetchData = () => {
|
||||
const date = fullCalendarRef.value?.getApi().currentData.viewTitle;
|
||||
@ -53,13 +54,17 @@ const fetchData = () => {
|
||||
callApi(yearArr, monthArr);
|
||||
};
|
||||
|
||||
//이 통신은 key 노출 땜 시 backserver로 옮겨야할듯
|
||||
//실제 개발 할 때 back으로 옮김
|
||||
const callApi = (yearArr, monthArr) => {
|
||||
const callUrl = 'http://apis.data.go.kr/B090041/openapi/service/SpcdeInfoService/getRestDeInfo';
|
||||
|
||||
for (let i = 0; i < yearArr.length; i++) {
|
||||
axios.get('http://apis.data.go.kr/B090041/openapi/service/SpcdeInfoService/getRestDeInfo', {
|
||||
axios.get(callUrl , {
|
||||
params: {
|
||||
serviceKey: key2,
|
||||
solYear: String(yearArr[i]),
|
||||
solMonth: String(monthArr[i]),
|
||||
serviceKey: key1,
|
||||
},
|
||||
})
|
||||
.then(data => {
|
||||
@ -92,8 +97,6 @@ const dateFormat = (locdate) => {
|
||||
}
|
||||
}
|
||||
|
||||
const fullCalendarRef = ref(null);
|
||||
|
||||
const handleDateClick = arg => {
|
||||
console.log(arg.dateStr);
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user