直播添加了下拉刷新
This commit is contained in:
parent
fd1801de3d
commit
e58f571de4
@ -39,7 +39,8 @@
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<scroll-view style="width:100%;height:100%" scroll-y="true" @scrolltolower="swiperBottom">
|
||||
<scroll-view style="width:100%;height:100%" scroll-y="true" @scrolltolower="swiperBottom" :refresher-enabled="true" @refresherrefresh="dianji(1)" :refresher-triggered="refresher" @refresherpulling="onPulling"
|
||||
@refresherrestore="onRestore" @refresherabort="onAbort">
|
||||
<view class="box">
|
||||
<u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code" @click="clickSImage($event, 2)"></u-swiper>
|
||||
<view class="list">
|
||||
@ -260,6 +261,7 @@
|
||||
loading: '努力加载中',
|
||||
nomore: '实在没有了'
|
||||
},
|
||||
refresher:true
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@ -360,6 +362,7 @@
|
||||
this.$u.api.tabLiveList({page:this.live_page}).then((res) => {
|
||||
// uni.stopPullDownRefresh();
|
||||
this.status_live = "loading";
|
||||
this.refresher = false;
|
||||
console.log(res)
|
||||
if (res.errCode == 0) {
|
||||
uni.hideLoading();
|
||||
@ -414,7 +417,8 @@
|
||||
},
|
||||
// 切换导航
|
||||
dianji(a) {
|
||||
// console.log(a);
|
||||
console.log(a);
|
||||
|
||||
if (a.type == "change") {
|
||||
this.num = a.detail.current
|
||||
} else {
|
||||
@ -422,7 +426,7 @@
|
||||
}
|
||||
// console.log(this.num);
|
||||
// 状态请求
|
||||
if (a.type == "change") { // 强制请求一次
|
||||
if (a.type == "change" || this.num == 1) { // 强制请求一次
|
||||
if (this.num == 0) {
|
||||
this.page = 1;
|
||||
this.articleList = [];
|
||||
@ -432,7 +436,7 @@
|
||||
} else if (this.num == 1) {
|
||||
this.live_page = 1;
|
||||
this.getZhiBoSwiper(); // 直播轮播
|
||||
this.tabLiveList();
|
||||
this.tabLiveList();
|
||||
} else if (this.num == 2) {
|
||||
this.follow_page = 0;
|
||||
this.fansList = [];
|
||||
@ -580,6 +584,16 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
onPulling(e) {
|
||||
console.log("onpulling", e);
|
||||
},
|
||||
onRestore() {
|
||||
this.refresher = 'restore'; // 需要重置
|
||||
console.log("onRestore");
|
||||
},
|
||||
onAbort() {
|
||||
console.log("onAbort");
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user