|
|
<template>
|
|
|
<div style="height: 100%;">
|
|
|
<div class="head"></div>
|
|
|
<ClassicTabs ref="tabs" v-model="selectLabel" :data="tabLabels" @on-filter-change="onFilterChange"></ClassicTabs>
|
|
|
|
|
|
<div class="tab-slide-container">
|
...
|
...
|
@@ -14,31 +13,29 @@ |
|
|
@scroll="scroll"
|
|
|
@change="changePage"
|
|
|
>
|
|
|
<SlideItem style="background-color: #f0f0f0;">
|
|
|
<ExchangeBox v-model="inputCouponCode" @click="onSubmitCode"></ExchangeBox>
|
|
|
|
|
|
<SlideItem>
|
|
|
<div class="filter-wrapper" v-if="showFilter">
|
|
|
<div class="filter-mask" @click="onMaskClick"></div>
|
|
|
<FilterBar :list="filterList" v-model="selectFilterId" class="filter"></FilterBar>
|
|
|
</div>
|
|
|
|
|
|
<div class="head"></div>
|
|
|
<ExchangeBox v-model="inputCouponCode" @click="onSubmitCode"></ExchangeBox>
|
|
|
|
|
|
<ScrollView ref="notuse" :data="getNotUseList" :options="scrollOptions" v-if="getNotUseList.length" :reach-bottom="reachBottom">
|
|
|
<ScrollView class="scroll-view1" ref="notuse" :data="getNotUseList" :options="scrollOptions" v-if="getNotUseList.length" :reach-bottom="reachBottom">
|
|
|
<CouponItem :item="item" v-for="(item, index) in getNotUseList" :key="index"></CouponItem>
|
|
|
</ScrollView>
|
|
|
<Empty v-else></Empty>
|
|
|
</SlideItem>
|
|
|
|
|
|
<SlideItem style="background-color: #f0f0f0;">
|
|
|
<ScrollView ref="use" :data="getUseList" :options="scrollOptions" v-if="getUseList.length" :reach-bottom="reachBottom">
|
|
|
<SlideItem>
|
|
|
<ScrollView class="scroll-view2" ref="use" :data="getUseList" :options="scrollOptions" v-if="getUseList.length" :reach-bottom="reachBottom">
|
|
|
<CouponItem :item="item" v-for="(item, index) in getUseList" :key="index"></CouponItem>
|
|
|
</ScrollView>
|
|
|
<Empty v-else></Empty>
|
|
|
</SlideItem>
|
|
|
|
|
|
<SlideItem style="background-color: #f0f0f0;">
|
|
|
<ScrollView ref="overtime" :data="getOvertimeList" :options="scrollOptions" v-if="getOvertimeList.length" :reach-bottom="reachBottom">
|
|
|
<SlideItem>
|
|
|
<ScrollView class="scroll-view2" ref="overtime" :data="getOvertimeList" :options="scrollOptions" v-if="getOvertimeList.length" :reach-bottom="reachBottom">
|
|
|
<CouponItem :item="item" v-for="(item, index) in getOvertimeList" :key="index"></CouponItem>
|
|
|
</ScrollView>
|
|
|
<Empty v-else></Empty>
|
...
|
...
|
@@ -116,7 +113,8 @@ export default { |
|
|
more: '加载更多',
|
|
|
noMore: '以上是最新的内容'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
bounce: true
|
|
|
},
|
|
|
slideOptions: {
|
|
|
listenScroll: true,
|
...
|
...
|
@@ -179,12 +177,15 @@ export default { |
|
|
type: this.selectType,
|
|
|
filter: this.tabLabels[this.selectIndex].selectFilterId,
|
|
|
refresh
|
|
|
}).then(() => {
|
|
|
this.$refs[this.selectType].forceUpdate();
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
selectFilterId(val) {
|
|
|
this.tabLabels[0].selectFilterId = val;
|
|
|
this.$refs.notuse.scrollTo(0, 0);
|
|
|
this.onMaskClick();
|
|
|
this.reachBottom(true);
|
|
|
}
|
...
|
...
|
@@ -203,8 +204,9 @@ export default { |
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.head {
|
|
|
height: 90px;
|
|
|
|
|
|
.page-wrapper {
|
|
|
height: calc(100% - 90px);
|
|
|
}
|
|
|
|
|
|
.tab-slide-container {
|
...
|
...
|
@@ -214,7 +216,8 @@ export default { |
|
|
.filter-wrapper {
|
|
|
width: calc(100% / 3);
|
|
|
height: 100%;
|
|
|
position: fixed;
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
z-index: 4;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -227,4 +230,12 @@ export default { |
|
|
height: 100%;
|
|
|
background-color: rgba(0, 0, 0, 0.4);
|
|
|
}
|
|
|
|
|
|
.scroll-view1 {
|
|
|
height: calc(100% - 270px);
|
|
|
}
|
|
|
|
|
|
.scroll-view2 {
|
|
|
height: calc(100% - 180px);
|
|
|
}
|
|
|
</style> |
...
|
...
|
|