分也
This commit is contained in:
parent
1a3b39f31e
commit
d604351cf3
@ -7,7 +7,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="evaluation" :class="{ 'current' : current == 2 }" @click="switchCurrent(2)">社区</view>
|
<view class="evaluation" :class="{ 'current' : current == 2 }" @click="switchCurrent(2)">社区</view>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view scroll-y class="goods-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore" v-show="current == 0">
|
<scroll-view scroll-y class="goods-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore" v-show="current == 0" :scroll-top="scrollTop" @scroll="scroll">
|
||||||
<view v-for="goods in goodsList" :key="goods.store_id" class="goods-item" @click="toDetailsPage(goods.store_id)">
|
<view v-for="goods in goodsList" :key="goods.store_id" class="goods-item" @click="toDetailsPage(goods.store_id)">
|
||||||
<image :src="goods.store_avatar"></image>
|
<image :src="goods.store_avatar"></image>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
@ -18,7 +18,7 @@
|
|||||||
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
|
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
|
||||||
<u-empty mode="list" v-if="!goodsList.length"></u-empty>
|
<u-empty mode="list" v-if="!goodsList.length"></u-empty>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<scroll-view style="width:100%;" :style="{ height: scrollHeight }" scroll-y="true" @scrolltolower="loadMore" v-if=" current == 2 ">
|
<scroll-view style="width:100%;" :style="{ height: scrollHeight }" scroll-y="true" @scrolltolower="loadMore" v-if=" current == 2 " :scroll-top="scrollTop" @scroll="scroll">
|
||||||
<view class="box" style="padding: 0 30rpx;">
|
<view class="box" style="padding: 0 30rpx;">
|
||||||
<view style="display:flex">
|
<view style="display:flex">
|
||||||
<view>
|
<view>
|
||||||
@ -34,7 +34,7 @@
|
|||||||
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
|
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
|
||||||
<u-empty mode="list" v-if="!goodsList.length"></u-empty>
|
<u-empty mode="list" v-if="!goodsList.length"></u-empty>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<scroll-view style="width:100%;padding: 20rpx 30rpx;margin-right:23rpx;" :style="{ height: scrollHeight }" scroll-y="true" @scrolltolower="loadMore" v-if=" current == 1 ">
|
<scroll-view style="width:100%;padding: 0rpx 30rpx;margin-right:23rpx;" :style="{ height: scrollHeight }" scroll-y="true" @scrolltolower="loadMore" v-if=" current == 1 " :scroll-top="scrollTop" @scroll="scroll">
|
||||||
<view class="list" >
|
<view class="list" >
|
||||||
<darenItem style="margin-top:20rpx;margin-right:23rpx;box-shadow:0px 3rpx 7rpx 0px rgba(153, 153, 153, 0.35);" v-for="item in goodsList" :key="item.id" :info="item" v-on:pChangeType="changeType"></darenItem>
|
<darenItem style="margin-top:20rpx;margin-right:23rpx;box-shadow:0px 3rpx 7rpx 0px rgba(153, 153, 153, 0.35);" v-for="item in goodsList" :key="item.id" :info="item" v-on:pChangeType="changeType"></darenItem>
|
||||||
</view>
|
</view>
|
||||||
@ -59,7 +59,11 @@ export default {
|
|||||||
scrollHeight: '',
|
scrollHeight: '',
|
||||||
loadStatus: 'loadmore',
|
loadStatus: 'loadmore',
|
||||||
timer: true, // 防止上拉加载短时间内多次调用,
|
timer: true, // 防止上拉加载短时间内多次调用,
|
||||||
value:""
|
value:"",
|
||||||
|
scrollTop: 0,
|
||||||
|
old: {
|
||||||
|
scrollTop: 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components:{
|
components:{
|
||||||
@ -91,6 +95,9 @@ export default {
|
|||||||
this.ShopSearch()
|
this.ShopSearch()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
scroll: function(e) {
|
||||||
|
this.old.scrollTop = e.detail.scrollTop; // 必要
|
||||||
|
},
|
||||||
// 动态设置导航栏搜索框内容
|
// 动态设置导航栏搜索框内容
|
||||||
setNavSearchInput(keyword) {
|
setNavSearchInput(keyword) {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
|
Loading…
Reference in New Issue
Block a user