修改
This commit is contained in:
parent
e951f9b56b
commit
b80345c43f
@ -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) {
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user