주석추가

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 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);
};