From c0319d19b759e82a4c9b71e0d807acd67b412267 Mon Sep 17 00:00:00 2001
From: wangzimeng <3297159934@qq.com>
Date: Thu, 7 Aug 2025 14:09:13 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95length=E7=9A=84=E6=8A=A5?=
=?UTF-8?q?=E9=94=991?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
packageA/search/index.vue | 65 ++++++++++++-------
pages/app/score-shop.vue | 27 +++++++-
pages/app/sign.vue | 19 +-----
pages/canteenRent/rentDetail.vue | 7 +-
pages/canteenRent/rentEdit.vue | 22 +++----
pages/canteenRent/rentList.vue | 10 +--
pages/coupon/list.vue | 31 +++++++--
pages/goods/score.vue | 16 ++---
pages/index/fabu.vue | 20 +++---
pages/index/index.vue | 4 --
pages/index/user.vue | 4 +-
pages/school/schoolIndex.vue | 2 +-
pages/user/goods-log.vue | 23 ++++++-
.../su-regionCity-picker.vue | 4 +-
14 files changed, 157 insertions(+), 97 deletions(-)
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 @@