Commit a09dbf9c authored by tangfh's avatar tangfh

+

parent a164207a
...@@ -9,9 +9,10 @@ ...@@ -9,9 +9,10 @@
<swiper :current="tabIndex" class="swiper-box" :duration="300" @change="onTabChange" <swiper :current="tabIndex" class="swiper-box" :duration="300" @change="onTabChange"
:style="{height: swiperHeight + 'px'}"> :style="{height: swiperHeight + 'px'}">
<swiper-item class="swiper-item" v-for="(tab,index) in tabBars" :key="index"> <swiper-item class="swiper-item" v-for="(tab,index) in tabBars" :key="index">
<scroll-view class="scroll-v" scroll-y :refresher-enabled="tab.content.refresherEnable" @refresherrefresh="onRefresh()" <scroll-view class="scroll-v" scroll-y :refresher-enabled="tab.content.refresherEnable"
:enable-back-to-top="true" :lower-threshold="75" :refresher-triggered="tab.content.refreshing" @refresherrefresh="onRefresh()" :enable-back-to-top="true" :lower-threshold="75"
@scrolltolower="onLoadMore(index)" :style="{height: (swiperHeight) + 'px'}"> :refresher-triggered="tab.content.refreshing" @scrolltolower="onLoadMore(index)"
:style="{height: (swiperHeight) + 'px'}">
<view class="flex-column" v-if="tab.content.list.length > 0" <view class="flex-column" v-if="tab.content.list.length > 0"
:style="{'min-height': (swiperHeight + 'px')}"> :style="{'min-height': (swiperHeight + 'px')}">
<view class="view-tmp1 active" v-for="(item2, index2) in tab.content.list" :index="index2" <view class="view-tmp1 active" v-for="(item2, index2) in tab.content.list" :index="index2"
...@@ -103,7 +104,7 @@ ...@@ -103,7 +104,7 @@
var tab = this.tabBars[this.tabIndex]; var tab = this.tabBars[this.tabIndex];
setTimeout(() => { setTimeout(() => {
tab.content.refreshing = true; tab.content.refreshing = true;
}, 1000) }, 35)
}, },
onNavBarLeftClick() { onNavBarLeftClick() {
uni.navigateBack(); uni.navigateBack();
...@@ -138,6 +139,8 @@ ...@@ -138,6 +139,8 @@
if (!url) { if (!url) {
return; return;
} }
var tab = this.tabBars[this.tabIndex];
tab.content.refreshFlag = false;
let param = { let param = {
status: this.tabBars[index].type, status: this.tabBars[index].type,
screen: this.screen, screen: this.screen,
...@@ -184,6 +187,7 @@ ...@@ -184,6 +187,7 @@
}, },
requestComplete() { requestComplete() {
var tab = this.tabBars[this.tabIndex]; var tab = this.tabBars[this.tabIndex];
tab.content.refreshFlag = false;
tab.content.firstRequest = false; tab.content.firstRequest = false;
tab.content.refreshing = false; tab.content.refreshing = false;
tab.content.isRequestComplete = true; tab.content.isRequestComplete = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment