|
|
@@ -4,7 +4,7 @@
|
|
|
<view v-for="item in categoryData" :key="item.id" :class="[categoryId===item.id?'active':'']" @click="changeCategory(item)" > {{item.categoryName}} </view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="shop-show_box">
|
|
|
+ <scroll-view class="shop-show_box" enable-flex="true" scroll-y="true" lower-threshold="20" @scrolltolower="reachBottom">
|
|
|
<view v-for="item in list.data" :key="item.id" class="show-shop_box">
|
|
|
<view class="item-detail" @click="popAddModelFn(item)">
|
|
|
<image class="img" :src="item.cover" mode="scaleToFill" ></image>
|
|
|
@@ -16,7 +16,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </scroll-view>
|
|
|
|
|
|
<slot name="footer"></slot>
|
|
|
|
|
|
@@ -74,12 +74,11 @@ export default {
|
|
|
this.categoryData = res.data
|
|
|
this.categoryId = this.categoryData[0].id
|
|
|
this.getGoodsData()
|
|
|
- //this.initStorageData()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
getGoodsData(){
|
|
|
- getGoodsList({cId:this.categoryId,page:this.list.page}).then(res=>{
|
|
|
+ getGoodsList({cId:this.categoryId,page:this.list.page,pageSize:30}).then(res=>{
|
|
|
if(res.code == 1){
|
|
|
this.completes(res)
|
|
|
}
|
|
|
@@ -111,6 +110,13 @@ export default {
|
|
|
flex-direction: column;
|
|
|
box-sizing: border-box;
|
|
|
& .shop-show_box{
|
|
|
+ flex: 1;
|
|
|
+ padding: 2upx;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ overflow-y: scroll;
|
|
|
+ overflow-x: hidden;
|
|
|
+ height:80vh;
|
|
|
& .show-shop_box{
|
|
|
& .item-detail{
|
|
|
position: relative;
|
|
|
@@ -164,14 +170,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- & .shop-show_box {
|
|
|
- flex: 1;
|
|
|
- padding: 2upx;
|
|
|
- display: flex;
|
|
|
- flex-wrap: wrap;
|
|
|
- overflow-y: scroll;
|
|
|
- overflow-x: hidden;
|
|
|
- }
|
|
|
& .shop-footer_box {
|
|
|
height: 40upx;
|
|
|
display: flex;
|