Toggle navigation
Toggle navigation
This project
Loading...
Sign in
mobile
/
YH_RNComponent
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
李犇
8 years ago
Commit
a9d03091afca5762ba46f5a9239f4897f9e16496
1 parent
526e2b31
首页猜你喜欢,增加android版的预加载;达到滚动底部时,android直接请求网络数据;猜你喜欢拖拽4页——review by 于良
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
4 deletions
js/home/components/home/Home.js
js/home/containers/HomeContainer.js
js/home/reducers/home/homeActions.js
js/home/services/HomeService.js
js/home/components/home/Home.js
View file @
a9d0309
...
...
@@ -766,6 +766,8 @@ export default class Home extends Component {
}}
renderFooter
=
{
this
.
_renderFooter
}
onScroll
=
{
this
.
_onScroll
}
scrollRenderAheadDistance
=
{
2000
}
onEndReachedThreshold
=
{
2000
}
/
>
}
...
...
js/home/containers/HomeContainer.js
View file @
a9d0309
...
...
@@ -220,9 +220,14 @@ class HomeContainer extends Component {
}
onEndReached
()
{
InteractionManager
.
runAfterInteractions
(()
=>
{
if
(
Platform
===
'ios'
)
{
InteractionManager
.
runAfterInteractions
(()
=>
{
this
.
props
.
actions
.
fetchHomeFavoriteList
();
});
}
else
{
this
.
props
.
actions
.
fetchHomeFavoriteList
();
}
);
}
}
jumpWithUrl
(
jumpUrl
,
imageUrl
,
index
,
floorData
,
floorIndex
)
{
...
...
js/home/reducers/home/homeActions.js
View file @
a9d0309
...
...
@@ -321,7 +321,7 @@ export function fetchBoyGirlFavoriteList() {
}
//商品列表最多分四页
payload
.
endReached
=
(
payload
.
list
.
length
==
0
)
||
((
payload
.
currentPage
>
4
)
||
(
payload
.
currentPage
==
payload
.
pageCount
));
payload
.
endReached
=
(
payload
.
list
.
length
==
0
)
||
((
payload
.
currentPage
>
3
)
||
(
payload
.
currentPage
==
payload
.
pageCount
));
dispatch
(
fetchFavoriteSuccess
(
payload
,
channelStr
));
...
...
js/home/services/HomeService.js
View file @
a9d0309
...
...
@@ -2,6 +2,10 @@
import
Request
from
'../../common/services/NativeRequest'
;
import
{
Platform
,
}
from
'react-native'
export
default
class
HomeService
{
constructor
(
host
)
{
...
...
@@ -51,7 +55,7 @@ export default class HomeService {
url
:
''
,
body
:
{
method
:
'app.search.newLast7day'
,
limit
:
5
0
,
limit
:
(
Platform
.
OS
===
'ios'
)
?
50
:
2
0
,
page
,
yh_channel
:
channel
,
gender
,
...
...
Please
register
or
login
to post a comment