直播添加了下拉刷新

This commit is contained in:
luyuan 2020-08-20 10:16:40 +08:00
parent fd1801de3d
commit e58f571de4
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3

View File

@ -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>