首页下拉刷新和加载更多的设置,地区搜索是置page为1

This commit is contained in:
wangzimeng 2025-08-14 09:26:32 +08:00
parent 1e87dd5950
commit e999d3738d

View File

@ -2,6 +2,9 @@
<view v-if="template">
<s-layout title="首页" navbar="custom" tabbar="/pages/index/index" :bgStyle="template.style?.background"
:navbarStyle="template.style?.navbar" onShareAppMessage :showFloatButton="true" bgColor="#fcc74e">
<scroll-view @scrolltolower="onScrolltolower" :refresher-enabled="true" :refresher-triggered="homrS"
@refresherrefresh="onS" scroll-y="true" class="scrollBox align-items"
style="height: 1080rpx;box-sizing: border-box;">
<view class="container">
<!-- 顶部 -->
<view class="top">
@ -90,9 +93,7 @@
</view>
</view>
<!-- 列表 -->
<scroll-view @scrolltolower="onScrolltolower" :refresher-enabled="true" :refresher-triggered="homrS"
@refresherrefresh="onS" scroll-y="true" class="flex align-items"
style="height: 800rpx;box-sizing: border-box;margin-top: 20rpx;">
<view class="rrecommList" v-for="(item,index) in rentList" :key="index"
@click="toPage(`/pages/canteenRent/rentDetail?id=` + item.id)">
<view class="reListItem">
@ -136,12 +137,12 @@
</view>
</view>
</view>
</view>
<view class="viewCan" style="width: 100%;height: 200rpx;"></view>
</view>
</scroll-view>
</view>
</view>
<!-- 省市区弹窗 -->
@ -260,6 +261,7 @@
console.log('onRegionConfirm33', state.model, proCity.value);
listQuery.value.province = state.model.province_id
listQuery.value.city = state.model.city_id;
listQuery.value.page = 1;
rentList.value = [];
getList()
state.showRegion = false;
@ -537,8 +539,22 @@
line-height: 22rpx;
}
.scrollBox {
padding-bottom: constant(safe-area-inset-bottom);
/* iOS 11.0 - 11.1 */
padding-bottom: env(safe-area-inset-bottom);
/* iOS 11.2+ */
}
/* 对于没有安全区域的设备,设置默认值 */
@supports not (padding-bottom: env(safe-area-inset-bottom)) {
.scrollBox {
padding-bottom: 0;
}
}
.container {
min-height: 90vh;
height: 100%;
width: 100%;
background-color: #f7f7f7;
// display: grid;
@ -760,6 +776,9 @@
}
.viewCan {}
}
</style>