【优化】商品列表显示优化,检索增加吸顶效果。

This commit is contained in:
大灰灰
2022-10-31 23:51:14 +08:00
parent 603bba1079
commit 13101a9bce

View File

@@ -4,6 +4,7 @@
<u-navbar :title="title" safeAreaInsetTop fixed placeholder @leftClick="goNavigateBack"></u-navbar>
<!-- 条件筛选 -->
<u-sticky :offset-top="statusBar" customNavHeight="44">
<view class="coreshop-justify-center coreshop-bg-white">
<fy-dropdown :menuList="menuList" ref="uDropdown">
<fy-dropdown-item v-model="comprehensiveDataValue" dropdownKey="synthesis" title="综合" :options="comprehensiveData" @change="comprehensive"></fy-dropdown-item>
@@ -82,6 +83,9 @@
</fy-dropdown-item>
</fy-dropdown>
</view>
</u-sticky>
<view class="coreshop-margin-left-16 coreshop-margin-right-16 index-goods coreshop-margin-top-10" v-if="goodsList.length > 0">
<custom-waterfalls-flow :value="goodsList" @wapperClick="wapperClick" @imageClick="imageClick">
<!-- #ifdef MP-WEIXIN -->
@@ -244,7 +248,10 @@
{
label: '从大到小',
value: 'desc',
}]
}],
statusBar: 0,//状态栏高度
customBar: 0,// 状态栏高度 + 导航栏高度
navbar: 0,// 自定义标题与胶囊对齐高度
};
},
onPageScroll(e) {
@@ -252,7 +259,39 @@
},
//加载执行
onLoad: function (options) {
uni.showTabBar();
uni.getSystemInfo({
success: (e) => {
// #ifdef MP
this.statusBar = e.statusBarHeight
this.customBar = e.statusBarHeight + 45
if (e.platform === 'android') {
this.$store.commit('SET_SYSTEM_IOSANDROID', false)
this.customBar = e.statusBarHeight + 50
}
// #endif
// #ifdef MP-WEIXIN
this.statusBar = e.statusBarHeight
const custom = wx.getMenuButtonBoundingClientRect()
this.customBar = custom.bottom + custom.top - e.statusBarHeight
this.navbar = (custom.top - e.statusBarHeight) * 2 + custom.height
// #endif
// #ifdef MP-ALIPAY
this.statusBar = e.statusBarHeight
this.customBar = e.statusBarHeight + e.titleBarHeight
// #endif
// #ifdef APP-PLUS
console.log('app-plus', e)
this.statusBar = e.statusBarHeight
this.customBar = e.statusBarHeight + 45
// #endif
}
})
var where = {};
if (options.id) {
where.catId = options.id;