Commit 572c51ae authored by 张娇(东信)'s avatar 张娇(东信)

旅居列表渲染

parent 43aca4c6
......@@ -324,6 +324,8 @@ function handleFullscreenChange(event) {
// };
// 智能排序
const sortParams = (sortMode) => {
currentPage.value = 1;
hasMoreData.value = true;
sortType.value = sortMode;
getProd();
};
......@@ -340,10 +342,14 @@ const sortParams = (sortMode) => {
// };
const dataParams = (item, datePart) => {
if (item) {
currentPage.value = 1;
hasMoreData.value = true;
console.log(item, 212);
dateType.value = String(item.key);
getProd();
} else {
currentPage.value = 1;
hasMoreData.value = true;
dateType.value = '8';
if (datePart && datePart !== 'NaN/NaN/NaN') {
allocateDate.value = datePart;
......@@ -354,6 +360,8 @@ const dataParams = (item, datePart) => {
};
// 景点
const placeParams = (item) => {
currentPage.value = 1;
hasMoreData.value = true;
if (item.length !== 0) {
const ids = item.map((i) => i.id);
const arr = ids.join(',');
......@@ -367,6 +375,8 @@ const placeParams = (item) => {
// 筛选
const screenParams = (selectedItems, type) => {
currentPage.value = 1;
hasMoreData.value = true;
console.log(selectedItems.length, type, 111);
if (type === 'screen') {
if (selectedItems.length !== 0) {
......@@ -435,7 +445,7 @@ const getProd = (searchKeyword = '') => {
if (currentPage.value === 1) {
cardList.value = res.data.records;
} else {
cardList.value = [...cardList.value, ...res.data.content];
cardList.value = [...cardList.value, ...res.data.records];
}
// 判断是否还有更多数据
if (res.data.records.length < params.size) {
......
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