Authored by 李奇

修改

... ... @@ -24,7 +24,8 @@ Page({
currentPage: 1,
totalPage: 0,
pullRefresh: false,
showBackTop: false
showBackTop: false,
showCopyright: false
},
onLoad: function () {
this.productList({ page: 1, limit: 20});
... ... @@ -138,6 +139,12 @@ Page({
totalPage: res.data.page_total
});
if (!this.data.showCopyright) {
this.setData({
showCopyright: true
});
}
// 浮动筛选时滚动位置
if (this.data.floatFilter && params.setScrollPos) {
wx.pageScrollTo({
... ...
... ... @@ -27,7 +27,7 @@
</view>
</view>
<view>
<copyright></copyright>
<copyright wx:if="{{showCopyright}}"></copyright>
</view>
<quick-navigation show-back-top="{{showBackTop}}" show="{{true}}"
bindbacktop="backTop"></quick-navigation>
... ...
... ... @@ -17,7 +17,9 @@ Page({
currentPage: 0,
totalPage: 1,
urlParams: {},
showBackTop: false
showBackTop: false,
noResult: false,
windowHeight: windowHeight + 48,
},
onLoad:function (options) {
let title = decodeURIComponent(options.title) || '默认标题';
... ... @@ -88,7 +90,8 @@ Page({
productList: this.data.productList.concat(list),
currentPage: params.page,
totalPage: res.data.page_total,
showNoMore: params.page === res.data.page_total
showNoMore: params.page === res.data.page_total,
noResult: !this.data.productList.concat(list).length
});
if (params.resetScroll) {
... ...
<view class="list-container">
<view class="list-container" style="min-height:{{windowHeight}}px;">
<view class="filter-view">
<product-list-filter bind:sortchange="sortChange"></product-list-filter>
</view>
<view class="list-view">
<product-list list="{{productList}}"
show-loading="{{showLoading}}"
show-no-more="{{showNoMore}}"></product-list>
<view class="no-res" wx:if="{{noResult}}">
<image class="no-res-img" src="../../../static/images/nosearch-ic@3x.png"></image>
<view class="no-res-txt">未搜索到任何相关商品</view>
</view>
<view wx:if="{{productList.length}}">
<product-list list="{{productList}}"
show-loading="{{showLoading}}"
show-no-more="{{showNoMore}}"></product-list>
</view>
</view>
<copyright></copyright>
<copyright class="copy-right"></copyright>
<quick-navigation show-menu="{{true}}" show-back-top="{{showBackTop}}" bindbacktop="backTop"></quick-navigation>
</view>
\ No newline at end of file
... ...
.list-container {
position: relative;
padding-bottom: 180rpx;
box-sizing: border-box;
}
.list-container .filter-view {
position: fixed;
top: 0;
... ... @@ -12,4 +18,36 @@
.list-container .list-view {
padding-top: 88rpx;
padding-bottom: 65rpx;
}
.copy-right {
position: absolute;
bottom: 0;
right: 0;
left: 0;
}
.no-res {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
padding-top: 220rpx;
text-align: center;
background-color: #fff;
z-index: -1;
}
.no-res .no-res-img {
width: 204rpx;
height: 204rpx;
margin-top: 80rpx;
}
.no-res .no-res-txt {
font-size: 24rpx;
text-align: center;
margin-top: 21rpx;
color: #444444;
}
\ No newline at end of file
... ...