Commit e1ff5bee by chenwq

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

1 parent 5f3d58aa
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
border-radius: 24rpx; border-radius: 24rpx;
margin-bottom: 24rpx; margin-bottom: 24rpx;
font-size: 28rpx; font-size: 28rpx;
margin: 0 16rpx 30rpx;
.card-header { .card-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
...@@ -74,7 +74,14 @@ Page({ ...@@ -74,7 +74,14 @@ Page({
this.setData({ keyword: e.detail }); this.setData({ keyword: e.detail });
}, },
onSearch(e) { 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(); this.getList();
}, },
onTabChange(e) { onTabChange(e) {
...@@ -83,11 +90,18 @@ Page({ ...@@ -83,11 +90,18 @@ Page({
page: 1, page: 1,
list: [], list: [],
isLastPage: false, isLastPage: false,
scrollTop: 0,
isRefreshing: true,
}); });
this.getList(); this.getList();
}, },
onRefresh() { onRefresh() {
this.setData({ page: 1, isRefreshing: true, isLastPage: false }); this.setData({
page: 1,
isRefreshing: true,
isLastPage: false,
scrollTop: 0,
});
this.getList(); this.getList();
}, },
onLoadMore() { onLoadMore() {
......
...@@ -38,11 +38,15 @@ page { ...@@ -38,11 +38,15 @@ page {
} }
.list-scroll { .list-scroll {
padding: 16rpx 30rpx;
box-sizing: border-box; box-sizing: border-box;
background-color: #f3f7ff; background-color: #f3f7ff;
} }
.top-empty {
height: 16rpx;
width: 100%;
}
.nothing { .nothing {
text-align: center; text-align: center;
padding-top: 298rpx; padding-top: 298rpx;
......
...@@ -40,16 +40,21 @@ ...@@ -40,16 +40,21 @@
</view> </view>
<scroll-view <scroll-view
scroll-y scroll-y
scroll-top="{{scrollTop}}"
enable-back-to-top enable-back-to-top
scroll-top="{{scrollTop}}"
refresher-enabled="{{ true }}" refresher-enabled="{{ true }}"
bindrefresherrefresh="onRefresh" bindrefresherrefresh="onRefresh"
bindscroll="onScroll"
bindscrolltolower="onLoadMore" bindscrolltolower="onLoadMore"
refresher-triggered="{{ isRefreshing }}" refresher-triggered="{{ isRefreshing }}"
class="list-scroll" class="list-scroll"
style="height: calc(100vh - {{navHeight}}px - 180rpx);" 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 <auction-card
wx:for="{{list}}" wx:for="{{list}}"
wx:key="id" wx:key="id"
...@@ -62,8 +67,7 @@ ...@@ -62,8 +67,7 @@
> >
</auction-card> </auction-card>
<view class="loading-text">{{isLastPage ? '到底了~' : '加载中...'}}</view> <view class="loading-text">{{isLastPage ? '到底了~' : '加载中...'}}</view>
</view> </block>
<view wx:else class="nothing"> <view wx:else class="nothing">
<view class="icon"> <view class="icon">
<glsx-image webp src="/common/empty-icon.png" /> <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!