Fix: fix api url

This commit is contained in:
jhynsoo 2024-05-23 09:51:57 +09:00
parent d3865adcde
commit 74c3c5d7ba

View File

@ -1,9 +1,9 @@
<script setup>
import { reactive, ref, watch } from 'vue';
import axios from 'axios';
import Select from '../common/Select.vue';
import { useAttractionStore } from '@/stores/attractionStore';
import SearchBox from '../common/SearchBox.vue';
import { getGugun, getSido } from '@/api/area';
const contentTypeList = reactive([
{ value: 0, name: '전체' },
@ -29,16 +29,14 @@ watch(sido, ({ sidoCode }) => {
if (sidoCode === 0) {
return;
}
axios.get(`//localhost:8000/area/gugun?sidoCode=${sidoCode}`).then(({ data }) => {
getGugun(sidoCode).then(({ data }) => {
gugunList.value = [{ gugunCode: 0, gugunName: '전체' }, ...data];
});
console.log(keyword.value);
});
if (sidoList.value.length === 0) {
axios
.get('//localhost:8000/area/sido')
.then(({ data }) => (sidoList.value = [{ sidoCode: 0, sidoName: '전체' }, ...data]));
getSido().then(({ data }) => (sidoList.value = [{ sidoCode: 0, sidoName: '전체' }, ...data]));
}
function handleSubmit() {