Merge pull request '直播分也' (#179) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/179
This commit is contained in:
		
						commit
						e0216062f1
					
				@ -39,9 +39,9 @@
 | 
			
		||||
					</scroll-view>
 | 
			
		||||
				</swiper-item>
 | 
			
		||||
				<swiper-item>
 | 
			
		||||
					<scroll-view style="width:100%;height:100%" scroll-y="true">
 | 
			
		||||
					<scroll-view style="width:100%;height:100%" scroll-y="true" @scrolltolower="swiperBottom">
 | 
			
		||||
						<view class="box">
 | 
			
		||||
							<u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code" @scrolltolower="swiperBottom" @click="clickSImage($event, 2)"></u-swiper>
 | 
			
		||||
							<u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code" @click="clickSImage($event, 2)"></u-swiper>
 | 
			
		||||
							<view class="list">
 | 
			
		||||
								<view>
 | 
			
		||||
									<zhiboItem v-for="item in tabLiveLists.filter((_, index) => !(index&1))" :zid="item.live_id" :rid="item.chatroom_id"
 | 
			
		||||
@ -303,6 +303,9 @@
 | 
			
		||||
            },
 | 
			
		||||
            // 直播列表
 | 
			
		||||
			tabLiveList() {
 | 
			
		||||
				uni.showLoading({
 | 
			
		||||
                    title: "loading..."
 | 
			
		||||
                })
 | 
			
		||||
				this.$u.api.tabLiveList({page:this.page}).then((res) => {
 | 
			
		||||
					 // uni.stopPullDownRefresh();
 | 
			
		||||
                    this.status = "loading";
 | 
			
		||||
@ -311,18 +314,20 @@
 | 
			
		||||
                        if (this.page == 1) {
 | 
			
		||||
                        	this.tabLiveLists = res.data.data;
 | 
			
		||||
                            this.status = "loadmore";
 | 
			
		||||
                        } else if (res.data.length == 0 && this.page > 1) {
 | 
			
		||||
                        } else if (res.data.data.length == 0 && this.page > 1) {
 | 
			
		||||
                            this.status = "nomore";
 | 
			
		||||
                        } else {
 | 
			
		||||
                            this.tabLiveLists  = this.tabLiveLists.push(...res.data.data);
 | 
			
		||||
							this.tabLiveLists  = this.tabLiveLists.concat(res.data.data);
 | 
			
		||||
							console.log(this.tabLiveLists)
 | 
			
		||||
                        }
 | 
			
		||||
                        if (res.data.length == 0 && this.page > 1) {
 | 
			
		||||
                        if (res.data.data.length == 0 && this.page > 1) {
 | 
			
		||||
                        } else {
 | 
			
		||||
                            this.page++;
 | 
			
		||||
                        }
 | 
			
		||||
                    } else {
 | 
			
		||||
                        this.status = "nomore"
 | 
			
		||||
                    }
 | 
			
		||||
					}
 | 
			
		||||
					
 | 
			
		||||
				})
 | 
			
		||||
			},
 | 
			
		||||
            // 轮播图
 | 
			
		||||
@ -425,6 +430,7 @@
 | 
			
		||||
	                this.getArticlelist();
 | 
			
		||||
 | 
			
		||||
				}else if(this.num == 1){
 | 
			
		||||
					console.log(123)
 | 
			
		||||
					this.tabLiveList()
 | 
			
		||||
				}
 | 
			
		||||
                // console.log(e);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user