This commit is contained in:
luyuan 2020-08-13 15:37:59 +08:00
parent 1a3b39f31e
commit d604351cf3
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3

View File

@ -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