|
|
@@ -28,7 +28,7 @@
|
|
|
<span><van-count-down :time="status" /> {{ $t('product.start') }}</span>
|
|
|
</div> -->
|
|
|
</ion-header>
|
|
|
- <ion-content>
|
|
|
+ <ion-content :scrollEvents="true" @ionScrollEnd="handleScrollEnd()">
|
|
|
<ion-refresher slot="fixed" @ionRefresh="handleRefresh($event)">
|
|
|
<ion-refresher-content></ion-refresher-content>
|
|
|
</ion-refresher>
|
|
|
@@ -45,6 +45,8 @@
|
|
|
:finished-text="$t('common.loadFinish')"
|
|
|
@load="getData"
|
|
|
:immediate-check="false"
|
|
|
+ ref="listRef"
|
|
|
+ :disabled="disScroll"
|
|
|
>
|
|
|
<template v-if="listType === 'list'">
|
|
|
<div class="product-list" v-for="item in list" :key="item.id">
|
|
|
@@ -91,7 +93,7 @@ const { empty, size, loading, finished, list, getData } = useList('/product/list
|
|
|
}
|
|
|
})
|
|
|
const handleRefresh = event => {
|
|
|
- getData(true, true).then(() => {
|
|
|
+ getData(true).then(() => {
|
|
|
event.target.complete()
|
|
|
})
|
|
|
}
|
|
|
@@ -135,11 +137,23 @@ const changeType = type => {
|
|
|
// return ''
|
|
|
// })
|
|
|
|
|
|
+const disScroll = ref(true)
|
|
|
onMounted(() => {
|
|
|
- size.value = 10
|
|
|
- getData(true, true)
|
|
|
+ if (batchId === 11548 || batchId === '11548') {
|
|
|
+ size.value = 20
|
|
|
+ disScroll.value = false
|
|
|
+ } else {
|
|
|
+ size.value = 10
|
|
|
+ disScroll.value = true
|
|
|
+ }
|
|
|
+ getData(true)
|
|
|
getBatch()
|
|
|
})
|
|
|
+
|
|
|
+const listRef = ref(null)
|
|
|
+function handleScrollEnd() {
|
|
|
+ listRef.value.check()
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
@@ -160,7 +174,7 @@ ion-button {
|
|
|
margin-right: 12px;
|
|
|
}
|
|
|
.list {
|
|
|
- padding: 8px;
|
|
|
+ padding: 8px 8px 8px;
|
|
|
.product {
|
|
|
margin: 8px;
|
|
|
background: var(--ion-color-step-50);
|