Commit e1ff5bee by chenwq

优化拍卖卡片样式,调整边距和添加顶部空白区域

1 parent 5f3d58aa
......@@ -3,6 +3,7 @@
border-radius: 24rpx;
margin-bottom: 24rpx;
font-size: 28rpx;
margin: 0 16rpx 30rpx;
.card-header {
display: flex;
justify-content: space-between;
......
......@@ -74,7 +74,14 @@ Page({
this.setData({ keyword: e.detail });
},
onSearch(e) {
this.setData({ keyword: e.detail, page: 1, list: [], isLastPage: false });
this.setData({
keyword: e.detail,
page: 1,
list: [],
isLastPage: false,
scrollTop: 0,
isRefreshing: true,
});
this.getList();
},
onTabChange(e) {
......@@ -83,11 +90,18 @@ Page({
page: 1,
list: [],
isLastPage: false,
scrollTop: 0,
isRefreshing: true,
});
this.getList();
},
onRefresh() {
this.setData({ page: 1, isRefreshing: true, isLastPage: false });
this.setData({
page: 1,
isRefreshing: true,
isLastPage: false,
scrollTop: 0,
});
this.getList();
},
onLoadMore() {
......
......@@ -38,11 +38,15 @@ page {
}
.list-scroll {
padding: 16rpx 30rpx;
box-sizing: border-box;
background-color: #f3f7ff;
}
.top-empty {
height: 16rpx;
width: 100%;
}
.nothing {
text-align: center;
padding-top: 298rpx;
......
......@@ -40,16 +40,21 @@
</view>
<scroll-view
scroll-y
scroll-top="{{scrollTop}}"
enable-back-to-top
scroll-top="{{scrollTop}}"
refresher-enabled="{{ true }}"
bindrefresherrefresh="onRefresh"
bindscroll="onScroll"
bindscrolltolower="onLoadMore"
refresher-triggered="{{ isRefreshing }}"
class="list-scroll"
style="height: calc(100vh - {{navHeight}}px - 180rpx);"
lower-threshold="400"
refresher-threshold="104"
>
<view wx:if="{{list.length}}" class="card-box">
<view class="top-empty">
</view>
<block wx:if="{{list.length}}" class="card-box">
<auction-card
wx:for="{{list}}"
wx:key="id"
......@@ -58,12 +63,11 @@
bind:viewDetail="viewDetail"
bind:offlineCar="offlineCar"
bind:editAuction="editAuction"
bind:republish="republish"
bind:republish="republish"
>
</auction-card>
<view class="loading-text">{{isLastPage ? '到底了~' : '加载中...'}}</view>
</view>
</block>
<view wx:else class="nothing">
<view class="icon">
<glsx-image webp src="/common/empty-icon.png" />
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!