拼团列表加载更多 #398
@ -6,12 +6,12 @@
 | 
			
		||||
		</view>
 | 
			
		||||
		<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{height: swiperHeight}">
 | 
			
		||||
			<swiper-item class="swiper-item" v-for="(_, index) in tabList" :key="index">
 | 
			
		||||
				<scroll-view scroll-y style="width: 100%;" @scrolltolower="onreachBottom">
 | 
			
		||||
				<scroll-view scroll-y style="width: 100%;height: 100%;" @scrolltolower="onreachBottom">
 | 
			
		||||
					<view v-if="pinTuanList[index]">
 | 
			
		||||
						<SpecialGoods v-for="(item, index) in pinTuanList[index]" :key="index" :item="item" type='group'></SpecialGoods>
 | 
			
		||||
					</view>
 | 
			
		||||
					<u-empty text="暂无商品" mode="list" color="#000" margin-top="120" v-if="!pinTuanList[index] || !pinTuanList[index].length"></u-empty>
 | 
			
		||||
					<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" v-if="pinTuanList[index] && pinTuanList[index].length>=pageSize" @loadmore="onreachBottom"></u-loadmore>
 | 
			
		||||
					<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" v-if="pinTuanList[index]" @loadmore="onreachBottom"></u-loadmore>
 | 
			
		||||
				</scroll-view>
 | 
			
		||||
			</swiper-item>
 | 
			
		||||
		</swiper>
 | 
			
		||||
@ -22,7 +22,6 @@ import SpecialGoods from "../../components/shop/special-shop/index";
 | 
			
		||||
export default {
 | 
			
		||||
	data() {
 | 
			
		||||
		return {
 | 
			
		||||
			pageSize: 6,
 | 
			
		||||
			tabList: [],
 | 
			
		||||
			current: -1,
 | 
			
		||||
			swiperCurrent: 0,
 | 
			
		||||
@ -42,6 +41,7 @@ export default {
 | 
			
		||||
	},
 | 
			
		||||
	watch: {
 | 
			
		||||
		current(index) {
 | 
			
		||||
			this.page = 0;
 | 
			
		||||
			this.getPinTuanList({ id: this.tabList[index].gc_id, load: 'reload' });
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
@ -56,7 +56,7 @@ export default {
 | 
			
		||||
			})
 | 
			
		||||
		},
 | 
			
		||||
		// 拼团列表
 | 
			
		||||
		async getPinTuanList({ id, page, load }) {
 | 
			
		||||
		async getPinTuanList({ id, load }) {
 | 
			
		||||
			const res = await this.$u.api.getPinTuanList({
 | 
			
		||||
				page: this.page,
 | 
			
		||||
				gc_id: id,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user