Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
icbcRPG
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wildfirecode13
icbcRPG
Commits
53c2fa5f
Commit
53c2fa5f
authored
Jan 08, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0219e95d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
index.js
project/mock/e-family/index.js
+1
-1
detail2.jsx
project/src/pages/detail2/detail2.jsx
+3
-2
No files found.
project/mock/e-family/index.js
View file @
53c2fa5f
...
...
@@ -4,7 +4,7 @@ export const homeInfo = {
{
"canUpdateNickName"
:
false
,
"figures"
:
[{
"figureId"
:
"1"
},
{
"figureId"
:
"2"
},
{
"figureId"
:
"3"
}],
"newUser"
:
1
,
"newUser"
:
0
,
"userInfo"
:
{
"figureId"
:
"3"
,
"joyBeans"
:
123456789123
,
"nickName"
:
"13"
}
},
"message"
:
null
,
...
...
project/src/pages/detail2/detail2.jsx
View file @
53c2fa5f
...
...
@@ -20,6 +20,7 @@ class Detail2 extends Component {
}
onScroll
=
()
=>
{
console
.
log
(
'%c onScroll function run'
,
'color:blue;font-size:20px;font-weight:900;'
)
if
(
!
canLoading
)
{
console
.
log
(
'不能加载了'
)
return
;
...
...
@@ -27,13 +28,13 @@ class Detail2 extends Component {
const
{
list
}
=
this
.
state
;
const
targetScrollTop
=
list
.
length
*
55
*
ratio
-
listWrapperHeight
;
const
currentScrollTop
=
this
.
refs
.
listref
.
scrollTop
*
ratio
;
if
(
currentScrollTop
>=
targetScrollTop
)
{
if
(
currentScrollTop
>=
targetScrollTop
-
300
)
{
console
.
log
(
'加载新数据'
);
canLoading
=
false
;
this
.
loadPage
();
}
//
console.log(currentScrollTop, targetScrollTop)
console
.
log
(
currentScrollTop
,
targetScrollTop
)
}
loadPage
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment