Commit a6dde235 by 匡雅琴

下拉加载

1 parent 6e032328
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
class="van-list-box" class="van-list-box"
:style="{ height: data.innerHeight - (280 + 10 + 28 + 68) + 'px' }" :style="{ height: data.innerHeight - (280 + 10 + 28 + 68) + 'px' }"
> >
<!-- -->
<van-list <van-list
finished-text="- 没有更多啦 -" finished-text="- 没有更多啦 -"
loading-text="加载中..." loading-text="加载中..."
...@@ -177,7 +178,7 @@ const onLoad = async () => { ...@@ -177,7 +178,7 @@ const onLoad = async () => {
let params = pageData; let params = pageData;
console.log(list.length, total.value); console.log(list.length, total.value);
// 如果列表长度小于总长度下拉刷新 // 如果列表长度小于总长度下拉刷新
if (list.length == 0 || list.length < total.value) { if (list.length <= total.value) {
const res = await req( const res = await req(
"scrm.api.renewal.h5.integral.record.list", "scrm.api.renewal.h5.integral.record.list",
params, params,
...@@ -198,6 +199,7 @@ const onLoad = async () => { ...@@ -198,6 +199,7 @@ const onLoad = async () => {
// 组件挂载完成 // 组件挂载完成
onBeforeMount(() => { onBeforeMount(() => {
hasSession(); hasSession();
// onLoad();
}); });
</script> </script>
......
...@@ -93,7 +93,7 @@ const getHistoryList = async () => { ...@@ -93,7 +93,7 @@ const getHistoryList = async () => {
// 组件挂载完成 // 组件挂载完成
onBeforeMount(() => { onBeforeMount(() => {
// getHistoryList(); getHistoryList();
}); });
</script> </script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!