Merge branch 'search'
This commit is contained in:
commit
09344000b6
@ -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 };
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user