mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-05-07 01:47:20 +08:00
【优化】商品列表显示优化,检索增加吸顶效果。
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
<u-navbar :title="title" safeAreaInsetTop fixed placeholder @leftClick="goNavigateBack"></u-navbar>
|
<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">
|
<view class="coreshop-justify-center coreshop-bg-white">
|
||||||
<fy-dropdown :menuList="menuList" ref="uDropdown">
|
<fy-dropdown :menuList="menuList" ref="uDropdown">
|
||||||
<fy-dropdown-item v-model="comprehensiveDataValue" dropdownKey="synthesis" title="综合" :options="comprehensiveData" @change="comprehensive"></fy-dropdown-item>
|
<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-item>
|
||||||
</fy-dropdown>
|
</fy-dropdown>
|
||||||
</view>
|
</view>
|
||||||
|
</u-sticky>
|
||||||
|
|
||||||
|
|
||||||
<view class="coreshop-margin-left-16 coreshop-margin-right-16 index-goods coreshop-margin-top-10" v-if="goodsList.length > 0">
|
<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">
|
<custom-waterfalls-flow :value="goodsList" @wapperClick="wapperClick" @imageClick="imageClick">
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
@@ -244,7 +248,10 @@
|
|||||||
{
|
{
|
||||||
label: '从大到小',
|
label: '从大到小',
|
||||||
value: 'desc',
|
value: 'desc',
|
||||||
}]
|
}],
|
||||||
|
statusBar: 0,//状态栏高度
|
||||||
|
customBar: 0,// 状态栏高度 + 导航栏高度
|
||||||
|
navbar: 0,// 自定义标题与胶囊对齐高度
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
@@ -252,7 +259,39 @@
|
|||||||
},
|
},
|
||||||
//加载执行
|
//加载执行
|
||||||
onLoad: function (options) {
|
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 = {};
|
var where = {};
|
||||||
if (options.id) {
|
if (options.id) {
|
||||||
where.catId = options.id;
|
where.catId = options.id;
|
||||||
|
|||||||
Reference in New Issue
Block a user