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

旅居列表渲染

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