Commit 65f9965d authored by 张娇(东信)'s avatar 张娇(东信)

乡村旅居筛选

parent f4060838
......@@ -64,6 +64,10 @@ function timestampToDateBasic(timestamp) {
const day = date.getDate().toString().padStart(2, '0');
return `${year}/${month}/${day}`;
}
const reset = () => {
selectedItem.value = null;
};
defineExpose({ reset });
</script>
<style lang="scss" scoped>
......
......@@ -50,6 +50,10 @@ const getTourList = () => {
placeList.value = res.data;
});
};
const reset = () => {
selectedItem.value = [];
};
defineExpose({ reset });
</script>
<style lang="scss" scoped>
......
......@@ -89,7 +89,12 @@ const getScreeningConditions = () => {
peopleList.value = res.data.forPeopleList;
});
};
const reset = () => {};
const reset = () => {
selectedItem.value = [];
selectedItem1.value = [];
selectedItem2.value = [];
};
defineExpose({ reset });
</script>
<style lang="scss" scoped>
......
......@@ -34,6 +34,10 @@ const selectItem = (index, item) => {
selectedItem.value = index;
emit('sortParams', item);
};
const reset = () => {
selectedItem.value = null;
};
defineExpose({ reset });
</script>
<style lang="scss" scoped>
......
......@@ -124,10 +124,10 @@
<wd-icon size="24rpx" class="icons"></wd-icon>
</view>
</view>
<Sort v-show="rotate" @sortParams="sortParams" />
<DepartureDate v-show="rotate2" @dataParams="dataParams" />
<ScenicSpots v-show="rotate3" @placeParams="placeParams" />
<Screen v-show="rotate4" @screenParams="screenParams" />
<Sort v-show="rotate" ref="sortRef" @sortParams="sortParams" />
<DepartureDate v-show="rotate2" ref="departureDateRef" @dataParams="dataParams" />
<ScenicSpots v-show="rotate3" ref="scenicSpotsRef" @placeParams="placeParams" />
<Screen v-show="rotate4" ref="screenRef" @screenParams="screenParams" />
</view>
<view class="list-card">
<view
......@@ -193,7 +193,10 @@ const allocateDate = ref(null);
const serviceList = ref([]);
const keyword = ref('');
const forPeopleList = ref([]);
const sortRef = ref(null);
const departureDateRef = ref(null);
const scenicSpotsRef = ref(null);
const screenRef = ref(null);
const locationFiltering = (index) => {
switch (index) {
case 0:
......@@ -331,17 +334,32 @@ const getProd = (searchKeyword = '') => {
cardList.value = res.data.records;
});
};
const resetParams = () => {
sortType.value = null;
attractionIdList.value = [];
dateType.value = null;
startCityList.value = [];
serviceList.value = [];
forPeopleList.value = [];
allocateDate.value = null;
getProd();
if (sortRef.value || departureDateRef.value || scenicSpotsRef.value || screenRef.value) {
sortType.value = null;
dateType.value = null;
allocateDate.value = null;
attractionIdList.value = [];
startCityList.value = [];
serviceList.value = [];
forPeopleList.value = [];
sortRef.value.reset();
departureDateRef.value.reset();
scenicSpotsRef.value.reset();
screenRef.value.reset();
getProd();
}
};
// const resetParams = () => {
// sortType.value = null;
// attractionIdList.value = [];
// dateType.value = null;
// startCityList.value = [];
// serviceList.value = [];
// forPeopleList.value = [];
// allocateDate.value = null;
// getProd();
// };
function toRouteDetails(item) {
console.log(item, 22222);
// TODO: 跳转到线路详情
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment