直播分也 #179

Merged
theluyuan merged 1 commits from xbx into master 2020-08-13 08:22:18 +00:00

View File

@ -39,9 +39,9 @@
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
<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"> <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 class="list">
<view> <view>
<zhiboItem v-for="item in tabLiveLists.filter((_, index) => !(index&1))" :zid="item.live_id" :rid="item.chatroom_id" <zhiboItem v-for="item in tabLiveLists.filter((_, index) => !(index&1))" :zid="item.live_id" :rid="item.chatroom_id"
@ -303,6 +303,9 @@
}, },
// //
tabLiveList() { tabLiveList() {
uni.showLoading({
title: "loading..."
})
this.$u.api.tabLiveList({page:this.page}).then((res) => { this.$u.api.tabLiveList({page:this.page}).then((res) => {
// uni.stopPullDownRefresh(); // uni.stopPullDownRefresh();
this.status = "loading"; this.status = "loading";
@ -311,18 +314,20 @@
if (this.page == 1) { if (this.page == 1) {
this.tabLiveLists = res.data.data; this.tabLiveLists = res.data.data;
this.status = "loadmore"; 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"; this.status = "nomore";
} else { } 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 { } else {
this.page++; this.page++;
} }
} else { } else {
this.status = "nomore" this.status = "nomore"
} }
}) })
}, },
// //
@ -425,6 +430,7 @@
this.getArticlelist(); this.getArticlelist();
}else if(this.num == 1){ }else if(this.num == 1){
console.log(123)
this.tabLiveList() this.tabLiveList()
} }
// console.log(e); // console.log(e);