Fix: fix search

This commit is contained in:
jhynsoo 2024-05-21 15:57:19 +09:00
parent 9f340ee6ef
commit e5a2af6a7d
2 changed files with 4 additions and 3 deletions

View File

@ -4,7 +4,7 @@ const local = localAxios;
function searchAttarctions(queryString, success, fail) {
//list
local.get(`/attraction/search?contentTypeId=12&${queryString}`).then(success).catch(fail);
local.get(`/attraction/search?${queryString}`).then(success).catch(fail);
}
export { searchAttarctions };

View File

@ -20,7 +20,7 @@ const sidoList = ref([]);
const gugunList = ref([]);
const sido = ref({ sidoCode: 0 });
const gugun = ref({ gugunCode: 0 });
const contentType = ref(contentTypeList[0]);
const contentType = ref(0);
const keyword = ref('');
watch(sido, ({ sidoCode }) => {
@ -38,7 +38,8 @@ function handleSubmit() {
const { gugunCode } = gugun.value;
const areaQuery = `sidoCode=${sidoCode}` + (sidoCode ? `&gugunCode=${gugunCode}` : '');
const keywordQuery = `title=${keyword.value}`;
const queryString = [areaQuery, keywordQuery].join('&');
const contentTypeQuery = `contentTypeId=${contentType.value.value}`;
const queryString = [areaQuery, keywordQuery, contentTypeQuery].join('&');
setQueryString(queryString);
search();