|
|
|
@ -18,7 +18,7 @@ |
|
|
|
</scroll-view> |
|
|
|
<!-- 右侧 二级分类 --> |
|
|
|
<mescroll-body ref="mescrollRef" :sticky="true" @init="mescrollInit" :down="{ native: true }" @down="downCallback" :up="upOption" @up="upCallback"> |
|
|
|
<scroll-view v-if="list.length>0 && type==0" class="cate-right" :scroll-top="scrollTop" :scroll-y="true" :style="{ height: `${scrollHeight}px` }"> |
|
|
|
<scroll-view v-if="list.length>0 && type==0" @scroll="scroll" class="cate-right" :scroll-top="scrollTop" :scroll-y="true" :style="{ height: `${scrollHeight}px` }"> |
|
|
|
<!-- 有数据的时候 --> |
|
|
|
<view class="cate-right-cont"> |
|
|
|
<view class="cate-two-box"> |
|
|
|
@ -35,7 +35,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
<scroll-view v-else-if="userList.length>0 && type==1" class="cate-right" :scroll-top="scrollTop" :scroll-y="true" :style="{ height: `${scrollHeight}px` }"> |
|
|
|
<scroll-view v-else-if="userList.length>0 && type==1" @scroll="scroll" class="cate-right" :scroll-top="scrollTop" :scroll-y="true" :style="{ height: `${scrollHeight}px` }"> |
|
|
|
<view class="cate-right-cont"> |
|
|
|
<view class="cate-two-box"> |
|
|
|
<view class="cate-cont-box"> |
|
|
|
@ -56,7 +56,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
<scroll-view v-else-if="informationList.length>0 && type==2" class="cate-right" :scroll-top="scrollTop" :scroll-y="true" :style="{ height: `${scrollHeight}px` }"> |
|
|
|
<scroll-view v-else-if="informationList.length>0 && type==2" @scroll="scroll" class="cate-right" :scroll-top="scrollTop" :scroll-y="true" :style="{ height: `${scrollHeight}px` }"> |
|
|
|
<view class="cate-right-cont"> |
|
|
|
<view class="cate-two-box"> |
|
|
|
<view class="cate-cont-box"> |
|
|
|
@ -70,7 +70,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
<scroll-view v-else-if="serviceProvidersList.length>0 && type==3" class="cate-right" :scroll-top="scrollTop" :scroll-y="true" :style="{ height: `${scrollHeight}px` }"> |
|
|
|
<scroll-view v-else-if="serviceProvidersList.length>0 && type==3" @scroll="scroll" class="cate-right" :scroll-top="scrollTop" :scroll-y="true" :style="{ height: `${scrollHeight}px` }"> |
|
|
|
<view class="cate-right-cont"> |
|
|
|
<view class="cate-two-box"> |
|
|
|
<view class="cate-cont-box"> |
|
|
|
@ -86,7 +86,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
<scroll-view v-else-if="transactionList.length>0 && type==4" class="cate-right" :scroll-top="scrollTop" :scroll-y="true" :style="{ height: `${scrollHeight}px` }"> |
|
|
|
<scroll-view v-else-if="transactionList.length>0 && type==4" @scroll="scroll" class="cate-right" :scroll-top="scrollTop" :scroll-y="true" :style="{ height: `${scrollHeight}px` }"> |
|
|
|
<view class="cate-right-cont"> |
|
|
|
<view class="cate-two-box"> |
|
|
|
<view class="cate-cont-box"> |
|
|
|
@ -194,6 +194,9 @@ |
|
|
|
tip: '暂无记录' |
|
|
|
} |
|
|
|
}, |
|
|
|
old: { |
|
|
|
scrollTop: 0 |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
@ -221,6 +224,10 @@ |
|
|
|
this.setListHeight() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
scroll: function(e) { |
|
|
|
// console.log(e) |
|
|
|
this.old.scrollTop = e.detail.scrollTop |
|
|
|
}, |
|
|
|
// 设置列表内容的高度 |
|
|
|
setListHeight() { |
|
|
|
const { windowHeight } = uni.getSystemInfoSync() |
|
|
|
@ -280,8 +287,14 @@ |
|
|
|
// 一级分类:选中分类 |
|
|
|
handleSelectNav(index) { |
|
|
|
this.curIndex = index |
|
|
|
this.scrollTop = 0 |
|
|
|
// this.scrollTop = 0 |
|
|
|
// 获取到滚动的距离 |
|
|
|
this.scrollTop = this.old.scrollTop |
|
|
|
this.$nextTick(function() { |
|
|
|
this.scrollTop = 0 |
|
|
|
}); |
|
|
|
this.upCallback(1) |
|
|
|
|
|
|
|
}, |
|
|
|
// 查询分类 获取列表 |
|
|
|
getCatList(pageNo = 1){ |
|
|
|
|