Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
vite-integral
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a6dde235
authored
Aug 11, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
下拉加载
1 parent
6e032328
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
src/views/home/index.vue
src/views/home/useHistory.vue
src/views/home/index.vue
View file @
a6dde23
...
@@ -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
>
...
...
src/views/home/useHistory.vue
View file @
a6dde23
...
@@ -93,7 +93,7 @@ const getHistoryList = async () => {
...
@@ -93,7 +93,7 @@ const getHistoryList = async () => {
// 组件挂载完成
// 组件挂载完成
onBeforeMount
(()
=>
{
onBeforeMount
(()
=>
{
//
getHistoryList();
getHistoryList
();
});
});
</
script
>
</
script
>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment