Merge pull request '添加了分也' (#169) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/169
This commit is contained in:
commit
bb4f971af1
@ -276,8 +276,8 @@ export default {
|
||||
});
|
||||
},
|
||||
// 获取直播列表
|
||||
tabLiveList(){
|
||||
return vm.$u.post('Specialci/tabLiveList')
|
||||
tabLiveList({page}){
|
||||
return vm.$u.post('Specialci/tabLiveList',{page})
|
||||
},
|
||||
// 商城-活动广告
|
||||
getStoreActivity() {
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user