Commit 6870e34f by 李伟康

分页增加加载

1 parent 99982d8c
...@@ -79,7 +79,11 @@ ...@@ -79,7 +79,11 @@
</div> </div>
<template v-if="type == 0"> <template v-if="type == 0">
<div class="bottom flex"> <div class="bottom flex">
<img class="icon-img-wh" :src="require(`@/assets/images/coupon/icon-${attrToIcon[item.discountType]}.png`)" alt=""> <img
class="icon-img-wh"
:src="require(`@/assets/images/coupon/icon-${attrToIcon[item.discountType]}.png`)"
alt=""
>
<div class="name"> <div class="name">
<template v-if="tabIndex == 0"> <template v-if="tabIndex == 0">
核销时间: {{new Date(item.verificationTime).format('yyyy/MM/dd')}} 核销时间: {{new Date(item.verificationTime).format('yyyy/MM/dd')}}
...@@ -94,7 +98,10 @@ ...@@ -94,7 +98,10 @@
</div> </div>
</template> </template>
</template> </template>
<div v-else-if="type == 0 && item.discountType == 7" class="type-3"> <div
v-else-if="type == 0 && item.discountType == 7"
class="type-3"
>
<div class="item"> <div class="item">
<div class="title flex"> <div class="title flex">
{{item.phone}} {{item.phone}}
...@@ -151,7 +158,11 @@ ...@@ -151,7 +158,11 @@
<template v-else>不限次数</template> <template v-else>不限次数</template>
</template> </template>
</div> --> </div> -->
<img class="icon-img-wh" :src="require(`@/assets/images/coupon/icon-${attrToIcon[item.discountType]}.png`)" alt=""> <img
class="icon-img-wh"
:src="require(`@/assets/images/coupon/icon-${attrToIcon[item.discountType]}.png`)"
alt=""
>
<div class="name">{{tabIndex == 0?'核销时间':'购买时间'}}:{{new Date(tabIndex == 0 ?item.verificationTime:item.receiveTime).format('yyyy/MM/dd')}}</div> <div class="name">{{tabIndex == 0?'核销时间':'购买时间'}}:{{new Date(tabIndex == 0 ?item.verificationTime:item.receiveTime).format('yyyy/MM/dd')}}</div>
</div> </div>
</div> </div>
...@@ -451,12 +462,17 @@ export default { ...@@ -451,12 +462,17 @@ export default {
onReachBottom () { onReachBottom () {
let { total, pageNum, list } = this let { total, pageNum, list } = this
this.$refs.scrollView.loading = false this.$refs.scrollView.loading = false
if (list.length == total || Math.ceil(total / 10) < pageNum) { if (list.length == total) {
this.$refs.scrollView.finished = true this.$refs.scrollView.finished = true
return return
} }
this.pageNum = pageNum + 1 if (Math.ceil(total / 10) > pageNum) {
this.getList() this.showLoading()
this.pageNum = pageNum + 1
this.getList()
} else {
this.$refs.scrollView.finished = true
}
}, },
scan () { scan () {
// let resultStr = 't=1&c=3510671342174081024' // let resultStr = 't=1&c=3510671342174081024'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!