添加了分也

This commit is contained in:
luyuan 2020-08-13 11:52:05 +08:00
parent eb886368e9
commit 54dd8a6eb0
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
2 changed files with 31 additions and 7 deletions

View File

@ -276,8 +276,8 @@ export default {
}); });
}, },
// 获取直播列表 // 获取直播列表
tabLiveList(){ tabLiveList({page}){
return vm.$u.post('Specialci/tabLiveList') return vm.$u.post('Specialci/tabLiveList',{page})
}, },
// 商城-活动广告 // 商城-活动广告
getStoreActivity() { getStoreActivity() {

View File

@ -41,7 +41,7 @@
<swiper-item> <swiper-item>
<scroll-view style="width:100%;height:100%" scroll-y="true"> <scroll-view style="width:100%;height:100%" scroll-y="true">
<view class="box"> <view class="box">
<u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code" @click="clickSImage($event, 2)"></u-swiper> <u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code" @scrolltolower="swiperBottom" @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"
@ -52,6 +52,7 @@
:key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url" :item="item" @updateList="updateList"></zhiboItem> :key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url" :item="item" @updateList="updateList"></zhiboItem>
</view> </view>
</view> </view>
<u-loadmore class="load-size" color="#999999" :status="status" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" />
</view> </view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
@ -302,9 +303,26 @@
}, },
// //
tabLiveList() { tabLiveList() {
this.$u.api.tabLiveList().then((res) => { this.$u.api.tabLiveList({page:this.page}).then((res) => {
console.log(res) // uni.stopPullDownRefresh();
this.tabLiveLists = res.data; this.status = "loading";
if (res.errCode == 0) {
uni.hideLoading();
if (this.page == 1) {
this.tabLiveLists = res.data.data;
this.status = "loadmore";
} else if (res.data.length == 0 && this.page > 1) {
this.status = "nomore";
} else {
this.tabLiveLists = this.tabLiveLists.push(...res.data.data);
}
if (res.data.length == 0 && this.page > 1) {
} else {
this.page++;
}
} else {
this.status = "nomore"
}
}) })
}, },
// //
@ -352,6 +370,7 @@
this.getArticlelist(); this.getArticlelist();
this.getSwiper(); this.getSwiper();
} else if (this.num == 1) { } else if (this.num == 1) {
this.page = 1;
this.getZhiBoSwiper(); // this.getZhiBoSwiper(); //
this.tabLiveList(); this.tabLiveList();
} else if (this.num == 2) { } else if (this.num == 2) {
@ -402,7 +421,12 @@
}, },
// //
swiperBottom(e) { swiperBottom(e) {
if(this.num == 0 ){
this.getArticlelist(); this.getArticlelist();
}else if(this.num == 1){
this.tabLiveList()
}
// console.log(e); // console.log(e);
}, },
swiperTop() { swiperTop() {