diff --git a/packageA/search/index.vue b/packageA/search/index.vue
index 120c3db..465a2e5 100644
--- a/packageA/search/index.vue
+++ b/packageA/search/index.vue
@@ -23,11 +23,11 @@
+ style="height: 75vh;box-sizing: border-box;">
-
+
@@ -133,14 +133,14 @@
-
+ v-if="( currentTab == 0 && rentCount == 0) || (currentTab == 1 && schoolCount == 0) || (currentTab == 2 && mallCount == 0)">
- 暂无数据信息
- -->
+ 请输入搜索条件
+
@@ -176,9 +176,9 @@
},
];
const currentTab = ref(0)
- const collectRentList = ref([])
+ const searchRentList = ref([])
const rentCount = ref(0)
- const collectSchoolList = ref([])
+ const searchSchoolList = ref([])
const schoolCount = ref(0)
const mallList = ref([])
const mallCount = ref(0)
@@ -215,10 +215,10 @@
console.log('切换tabs', currentTab.value,listQuery.value.keywords);
if(listQuery.value.keywords != null) {
if (currentTab.value == 0) {
- collectRentList.value = [];
+ searchRentList.value = [];
getRentList();
} else if (currentTab.value == 1) {
- collectSchoolList.value = [];
+ searchSchoolList.value = [];
getSchoolList();
} else {
getGoods();
@@ -229,10 +229,10 @@
function search(e) {
console.log('搜索', e.value);
if (currentTab.value == 0) {
- collectRentList.value = [];
+ searchRentList.value = [];
getRentList();
} else if (currentTab.value == 1) {
- collectSchoolList.value = [];
+ searchSchoolList.value = [];
getSchoolList();
} else {
getGoods();
@@ -268,17 +268,17 @@
console.log('招租收藏列表', res);
if (res.code == 1) {
- collectRentList.value = [...collectRentList.value, ...res.data.list];
+ searchRentList.value = [...searchRentList.value, ...res.data.list];
rentCount.value = res.data.count
} else {
// Handle case where data is not in expected format
- collectRentList.value = [];
+ searchRentList.value = [];
uni.showToast({
title: res.msg,
icon: 'none'
})
}
- console.log('getList', collectRentList.value);
+ console.log('getList', searchRentList.value);
}
//平台课程列表
async function getSchoolList() {
@@ -291,28 +291,29 @@
console.log('平台课程收藏列表', res);
if (res.code == 1) {
- collectSchoolList.value = [...collectSchoolList.value, ...res.data.list];
+ searchSchoolList.value = [...searchSchoolList.value, ...res.data.list];
schoolCount.value = res.data.count
} else {
// Handle case where data is not in expected format
- collectSchoolList.value = [];
+ searchSchoolList.value = [];
uni.showToast({
title: res.msg,
icon: 'none'
})
}
- console.log('平台课程收藏列表-222', collectSchoolList.value);
+ console.log('平台课程收藏列表-222', searchSchoolList.value);
}
//加载更多
function onScrolltolower() {
+ console.log('搜索页面:',searchRentList.value.length,searchSchoolList.value.length,mallList.value.length);
if (currentTab.value == 0) {
- if (collectRentList.value.length < rentCount.value) {
+ if (searchRentList.value.length < rentCount.value) {
listQuery.value.rentPage += 1;
getRentList();
}
} else if(currentTab.value == 1) {
- if (collectSchoolList.value.length < schoolCount.value) {
+ if (searchSchoolList.value.length < schoolCount.value) {
listQuery.value.schoolPage += 1;
getSchoolList();
}
@@ -342,12 +343,12 @@
function resetLists() {
if (currentTab.value == 0) {
listQuery.value.rentPage = 1;
- collectRentList.value = [];
+ searchRentList.value = [];
loadStatus.value = "loading";
getRentList();
} else if(currentTab.value == 1) {
listQuery.value.schoolPage = 1;
- collectSchoolList.value = [];
+ searchSchoolList.value = [];
loadStatus.value = "loading";
getSchoolList();
}else {
@@ -360,6 +361,26 @@