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