store 8.13
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
</view>
|
||||
<scroll-view scroll-y class="scroll-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore">
|
||||
<view class="goods-container">
|
||||
<view v-for="(goods, index) in goodsList" :key="index" class="goods-view" @click="toDetailsPage(goods.goods_id)">
|
||||
<view v-for="(goods, index) in goodsList" :key="index" class="goods-view">
|
||||
<goodsItem :info="goods"></goodsItem>
|
||||
</view>
|
||||
</view>
|
||||
@@ -28,7 +28,7 @@ import goodsItem from "@/components/shop/list/item"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
pageSize: 15,
|
||||
pageSize: 5,
|
||||
cid: '',
|
||||
page: 1,
|
||||
current: 0,
|
||||
@@ -83,7 +83,7 @@ export default {
|
||||
page: this.page,
|
||||
order: sort,
|
||||
})
|
||||
this.timer = true;
|
||||
// this.timer = true;
|
||||
if(res.errCode == 0) {
|
||||
this.pageSize = res.data.per_page;
|
||||
if(load == 'reload') this.goodsList = res.data.data;
|
||||
@@ -92,8 +92,8 @@ export default {
|
||||
return res.data.data.length;
|
||||
},
|
||||
loadMore() {
|
||||
if(this.goodsList.length < this.pageSize) return false;
|
||||
if(!this.timer) return false;
|
||||
// if(this.goodsList.length < this.pageSize) return false;
|
||||
// if(!this.timer) return false;
|
||||
this.loadStatus = "loading";
|
||||
this.page++;
|
||||
this.getStoreGoodsList({ load: 'loadmore' }).then(length => {
|
||||
@@ -118,12 +118,6 @@ export default {
|
||||
this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * otherHeight + 'px';
|
||||
// console.log(this.scrollHeight);
|
||||
},
|
||||
toDetailsPage(id) {
|
||||
this.$u.route('/pageB/sdetails/index', {
|
||||
id: id,
|
||||
type: 1 // 商品详情 商品类型 1普通 2拼团 3秒杀 4优惠券
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user