This commit is contained in:
曹辉 2023-01-29 16:13:45 +08:00
parent e951f9b56b
commit b80345c43f
2 changed files with 16 additions and 4 deletions

View File

@ -31,6 +31,7 @@
暂无商品
</view>
</view>
<u-back-top :scroll-top="scrollTop"></u-back-top>
</view>
</template>
@ -59,6 +60,7 @@
goodsName: '',
GoodsCategorychildrenlist: [], //list
GoodsCategorychildrenid: null,
scrollTop: 0,
};
},
watch: { //
@ -96,6 +98,9 @@
this.GoodsCategorychildren(this.goodsCategoryId);
},
methods: {
onPageScroll(e) {
this.scrollTop = e.scrollTop;
},
//
toggleTab(index) {
if (index == 1111111111111) {

View File

@ -15,7 +15,7 @@
</view>
</scroll-view>
</view>
<view class="" style="display: inline-block;width: 80%;padding-top: 20rpx;position: absolute;right: 0%;">
<view class="" style="display: inline-block;width: 80%;position: absolute;right: 0%;">
<view class="productlist" v-if='goodsList.length>0'>
<view class="item" @tap='goCommodityDetails(item)' v-for="(item,index) in goodsList" :key="index">
<image :src="baseurl+item.goodsPictureUrl" mode=""></image>
@ -39,6 +39,7 @@
</view>
</view>
</view>
<u-back-top :scroll-top="scrollTop2"></u-back-top>
</view>
</template>
@ -54,7 +55,7 @@
//tabIndex便
baseurl: '',
pageNum: 1,
pageSize: 20,
pageSize: 10,
goodsCategoryId: '', //
goodsList: [], //list
total: 0, //list
@ -63,6 +64,7 @@
GoodsCategorychildrenlist: [], //list
GoodsCategorychildrenid: null,
scrollTop: 0,
scrollTop2: 0,
old: {
scrollTop: 0
}
@ -101,6 +103,9 @@
this.GoodsCategorychildren(this.goodsCategoryId);
},
methods: {
onPageScroll(e) {
this.scrollTop2 = e.scrollTop;
},
tapscroll(item, index) {
this.tabIndex = index
if (index == 0) {
@ -218,6 +223,7 @@
height: 100%;
.inputs {
position: fixed;
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border: 1px solid #f0f0f0;
width: 90%;
@ -254,8 +260,9 @@
.lefttabbar {
position: fixed;
width: 20%;
height: 100%;
display: inline-block;
height: 100%;
top: 100rpx;
.scroll-Y {
height: 100%;
@ -303,7 +310,7 @@
.productlist {
width: 100%;
margin: 0 auto;
margin: 120rpx auto 0;
display: flex;
flex-wrap: wrap;
justify-content: space-evenly;