주석추가

This commit is contained in:
ckx6954 2024-12-18 20:25:54 +09:00
parent d40393dca2
commit b26585b225

View File

@ -19,6 +19,7 @@ import { isEmpty } from '@/common/utils';
const key1 = 'vrkIY7jUy82WRHIozbBtz4n2L89jAqNDY%2B4DmNpmasTex%2FNDySN7FDYwBqPj1p%2BxXLg13BzYfgHPt6eipWhH8Q%3D%3D'; const key1 = 'vrkIY7jUy82WRHIozbBtz4n2L89jAqNDY%2B4DmNpmasTex%2FNDySN7FDYwBqPj1p%2BxXLg13BzYfgHPt6eipWhH8Q%3D%3D';
const key2 = 'vrkIY7jUy82WRHIozbBtz4n2L89jAqNDY+4DmNpmasTex/NDySN7FDYwBqPj1p+xXLg13BzYfgHPt6eipWhH8Q=='; const key2 = 'vrkIY7jUy82WRHIozbBtz4n2L89jAqNDY+4DmNpmasTex/NDySN7FDYwBqPj1p+xXLg13BzYfgHPt6eipWhH8Q==';
const dayjs = inject('dayjs'); const dayjs = inject('dayjs');
const fullCalendarRef = ref(null);
const fetchData = () => { const fetchData = () => {
const date = fullCalendarRef.value?.getApi().currentData.viewTitle; const date = fullCalendarRef.value?.getApi().currentData.viewTitle;
@ -53,13 +54,17 @@ const fetchData = () => {
callApi(yearArr, monthArr); callApi(yearArr, monthArr);
}; };
// key backserver
// back
const callApi = (yearArr, monthArr) => { const callApi = (yearArr, monthArr) => {
const callUrl = 'http://apis.data.go.kr/B090041/openapi/service/SpcdeInfoService/getRestDeInfo';
for (let i = 0; i < yearArr.length; i++) { for (let i = 0; i < yearArr.length; i++) {
axios.get('http://apis.data.go.kr/B090041/openapi/service/SpcdeInfoService/getRestDeInfo', { axios.get(callUrl , {
params: { params: {
serviceKey: key2,
solYear: String(yearArr[i]), solYear: String(yearArr[i]),
solMonth: String(monthArr[i]), solMonth: String(monthArr[i]),
serviceKey: key1,
}, },
}) })
.then(data => { .then(data => {
@ -92,8 +97,6 @@ const dateFormat = (locdate) => {
} }
} }
const fullCalendarRef = ref(null);
const handleDateClick = arg => { const handleDateClick = arg => {
console.log(arg.dateStr); console.log(arg.dateStr);
}; };