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

View File

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