添加了分也

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(){
return vm.$u.post('Specialci/tabLiveList')
tabLiveList({page}){
return vm.$u.post('Specialci/tabLiveList',{page})
},
// 商城-活动广告
getStoreActivity() {

View File

@ -41,7 +41,7 @@
<swiper-item>
<scroll-view style="width:100%;height:100%" scroll-y="true">
<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>
<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>
</view>
</view>
<u-loadmore class="load-size" color="#999999" :status="status" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" />
</view>
</scroll-view>
</swiper-item>
@ -302,9 +303,26 @@
},
//
tabLiveList() {
this.$u.api.tabLiveList().then((res) => {
console.log(res)
this.tabLiveLists = res.data;
this.$u.api.tabLiveList({page:this.page}).then((res) => {
// uni.stopPullDownRefresh();
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.getSwiper();
} else if (this.num == 1) {
this.page = 1;
this.getZhiBoSwiper(); //
this.tabLiveList();
} else if (this.num == 2) {
@ -402,7 +421,12 @@
},
//
swiperBottom(e) {
this.getArticlelist();
if(this.num == 0 ){
this.getArticlelist();
}else if(this.num == 1){
this.tabLiveList()
}
// console.log(e);
},
swiperTop() {