Commit 70e66e07 authored by tangfh's avatar tangfh

+

parent b18e59ab
......@@ -11,7 +11,7 @@
<swiper-item class="swiper-item" v-for="(tab,index) in tabList" :key="index">
<scroll-view class="scroll-v" scroll-y :refresher-enabled="true" @refresherrefresh="onRefresh()"
:enable-back-to-top="true" :lower-threshold="75" :refresher-triggered="tab.refreshing"
@scrolltolower="loadMore(index)" :style="{height: (swiperHeight) + 'px'}">
@scrolltolower="onLoadMore(index)" :style="{height: (swiperHeight) + 'px'}">
<view class="flex-column" v-if="tab.data.length > 0" :style="{'min-height': (svHeight + 'rpx')}">
<view class="view-tmp1 active" v-for="(item2, index2) in tab.data" :index="index2" :key="index2"
:item="item2" @onItemClick="onItemClick"></view>
......@@ -131,13 +131,13 @@
tab.limit = 10;
tab.loadStatus = constant.LOAD_STATUS.more;
tab.total_pages = 1;
tab.data.push([{},{},{}]);
// tab.data.push([{},{},{}]);
tab.channel = REPAIR_LIST_TYPE.wait_alloc.text
} else if (tabBar.type == REPAIR_LIST_TYPE.alloced.type) {
tab.limit = 5;
tab.loadStatus = constant.LOAD_STATUS.more;
tab.total_pages = 1;
tab.data.push([{},{},{},{},{},{}]);
// tab.data.push([{},{},{},{},{},{}]);
tab.channel = REPAIR_LIST_TYPE.alloced.text
}
if (tab.total_pages == 1) {
......@@ -177,7 +177,6 @@
}
tab.loadStatus = constant.LOAD_STATUS.loading;
tab.page++;
tab.loadStatus = tab.page > tab.total_pages ? constant.LOAD_STATUS.noMore : constant.LOAD_STATUS.more;
this.getList(this.tabIndex);
},
getList(index) {
......@@ -226,15 +225,15 @@
// }
// })
if (tab.refreshing || tab.data.length == 0) {
tab.total_page = util.calTotalPage(data.total_list);
tab.total_pages = util.calTotalPage(data.total_list);
this.clearTabData(this.tabIndex);
tab.data = list;
tab.loadStatus = tab.total_page == 1 ? constant.LOAD_STATUS.noMore : constant.LOAD_STATUS.more;
tab.loadStatus = tab.total_pages == 1 ? constant.LOAD_STATUS.noMore : constant.LOAD_STATUS.more;
} else if (tab.loadStatus == constant.LOAD_STATUS.loading) {
if (list.length > 0) {
tab.data = tab.data.concat(list);
}
tab.loadStatus = tab.page == tab.total_page ? constant.LOAD_STATUS.noMore : constant.LOAD_STATUS.more;
tab.loadStatus = tab.page == tab.total_pages ? constant.LOAD_STATUS.noMore : constant.LOAD_STATUS.more;
}
tab.contentStatus = tab.data.length == 0 ? constant.CONTENT_STATUS.EMPTY : {};
},
......
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