Commit 7fb60e4c authored by 张娇(东信)'s avatar 张娇(东信)

筛选修改

parent 259481ea
......@@ -69,7 +69,7 @@ function timestampToDateBasic(timestamp) {
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
return `${year}/${month}/${day}`;
return `${year}-${month}-${day} 00:00:00`;
}
</script>
......
......@@ -16,11 +16,11 @@
<script setup>
import { ref } from 'vue';
const items = ref([
{ name: '距离优先', sortMode: 1 },
{ name: '好评优先', sortMode: 2 },
{ name: '销量优先', sortMode: 3 },
{ name: '低价优先', sortMode: 4 },
{ name: '高价优先', sortMode: 5 },
{ name: '距离优先', sortMode: '1' },
{ name: '好评优先', sortMode: '2' },
{ name: '销量优先', sortMode: '3' },
{ name: '低价优先', sortMode: '4' },
{ name: '高价优先', sortMode: '5' },
]);
const emit = defineEmits(['sortParams']);
const selectedItem = ref(null);
......
......@@ -340,10 +340,10 @@ const sortParams = (sortMode) => {
// };
const dataParams = (item, datePart) => {
if (item) {
dateType.value = item.key;
dateType.value = item.key.toString();
getProd();
} else {
dateType.value = 8;
dateType.value = '8';
if (datePart && datePart !== 'NaN/NaN/NaN') {
allocateDate.value = datePart;
rotate2.value = false;
......@@ -355,7 +355,7 @@ const dataParams = (item, datePart) => {
const placeParams = (item) => {
const ids = item.map((i) => i.id);
const arr = ids.join(',');
attractionIdList.value = arr.split(',').map(Number);
attractionIdList.value = arr.split(',').map(String);
getProd();
};
......@@ -406,7 +406,7 @@ const getProd = (searchKeyword = '') => {
// ...(startCityList.value && { startCityList: startCityList.value.split(',') }),
// ...(serviceList.value && { serviceList: serviceList.value.split(',') }),
// ...(forPeopleList.value && { forPeopleList: forPeopleList.value.split(',') }),
...(dateType.value === 8 && { allocateDate: allocateDate.value }),
...(dateType.value === '8' && { allocateDate: allocateDate.value }),
...(searchKeyword && { keyword: searchKeyword }),
};
getProdList(params).then((res) => {
......
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