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
于良
9 years ago
Commit
aa602df392a054e5ae7aa984675715b7ab3508a1
1 parent
94b63d08
master
...
6.7.0_0.49
6.7.1_0.49
6.7.4_0.49
6.7.5_0.49
6.8.7_message
6.9.5_msg
6.9.9_invite
V0125_Date
V1115_Date
V1130_Date
V1217_Date
V1230_Date
V6.10.1
V6.10.2
V6.7.9_dev
V6.8.6
V6.8.7
V6.8.7_upgrades
V6.8.9
V6.9.1
V6.9.2
V6.9.3
V6.9.5
V6.9.6
V6.9.6_Alliance
V6.9.7
V6.9.8
V6.9.8_shoudan
V6.9.9
V9.30_Date
exception
feature/rn_update61
gerry/v6.9.14_panicBuying
gerry/v6.9.16_bugfixed
v6.10.0
v6.9.10
v6.9.11
v6.9.12
v6.9.13
v6.9.14
v6.9.16
v6.9.17
v6.9.19
v6.9.20
v6.9.21
v6.9.22
v6.9.24
6.9.8
6.9.7
6.9.6
6.9.4
6.9.2
6.9.1
6.8.9
6.8.8
6.8.4
6.8.3
6.8.2
6.7.9
6.7.8
6.7.7
6.6.4
5.5.1
5.4.1
5.4
v6.7.5
v6.7.1
v6.2.0
v6.1.0
v5.6.2
v5.6.0
v5.5.2
v5.5.0
v5.4.1
v5.4.0
lqzx-5.1.0
lqzx-5.0.0
ios-qrcode-5.3.1-20161230
ios-dp-5.2.0-20161129
ios-dp-5.2.0-20161128
ios-classify-5.3.0-2016122101
ios-5.4.0
iOS-dp-5.2.0
android-dp-5.2.0-20161201
android-dp-5.2.0-20161128
android-classify-5.3.0-2016122801
V6.8.6
V6.8.5
V6.8.1
下拉刷新和上拉加载优化 review by 阿瑟
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
7 deletions
js/community/containers/HomeContainer.js
js/community/containers/SectionContainer.js
js/community/reducers/home/homeActions.js
js/community/reducers/home/homeInitialState.js
js/community/reducers/section/sectionActions.js
js/community/reducers/section/sectionInitialState.js
js/community/containers/HomeContainer.js
View file @
aa602df
...
...
@@ -100,7 +100,7 @@ class HomeContainer extends React.Component {
componentDidMount
()
{
InteractionManager
.
runAfterInteractions
(()
=>
{
this
.
props
.
actions
.
bannerNoticeSection
();
this
.
props
.
actions
.
bannerNoticeSection
OnlyDispathSuccess
();
this
.
props
.
actions
.
getUserInfo
(
false
);
});
...
...
js/community/containers/SectionContainer.js
View file @
aa602df
...
...
@@ -86,7 +86,7 @@ class SectionContainer extends React.Component {
}
InteractionManager
.
runAfterInteractions
(()
=>
{
this
.
props
.
actions
.
header
();
this
.
props
.
actions
.
header
OnlyDispatchSuccess
();
});
}
...
...
js/community/reducers/home/homeActions.js
View file @
aa602df
...
...
@@ -67,6 +67,25 @@ export function bannerNoticeSection() {
};
}
export
function
bannerNoticeSectionOnlyDispathSuccess
()
{
return
(
dispatch
,
getState
)
=>
{
let
{
app
,
home
}
=
getState
();
if
(
home
.
isFetching
)
{
return
;
}
// dispatch(bnsRequest());
return
new
HomeService
().
bannerNoticeSection
(
app
.
container
)
.
then
(
json
=>
{
let
payload
=
parseBNS
(
json
);
dispatch
(
bnsSuccess
(
payload
));
})
.
catch
(
error
=>
{
// dispatch(bnsFailure(error));
});
};
}
export
function
recommendationRequest
(
ptr
)
{
return
{
type
:
HOME_RECOMMENDATION_REQUEST
,
...
...
@@ -91,7 +110,7 @@ export function recommendationFailure(error) {
export
function
recommendation
(
ptr
=
false
)
{
return
(
dispatch
,
getState
)
=>
{
let
{
home
,
user
}
=
getState
();
if
(
home
.
recommendation
.
isFetching
||
(
!
ptr
&&
home
.
recommendation
.
endReached
))
{
if
(
home
.
recommendation
.
isFetching
||
(
!
ptr
&&
home
.
recommendation
.
endReached
)
||
home
.
recommendation
.
error
!==
null
)
{
return
;
}
...
...
js/community/reducers/home/homeInitialState.js
View file @
aa602df
...
...
@@ -24,7 +24,7 @@ let InitialState = Record({
})),
notice
:
new
(
Record
({
duration
:
3
,
open
:
'
Y
'
,
open
:
'
N
'
,
list
:
List
(),
})),
section
:
List
(),
...
...
js/community/reducers/section/sectionActions.js
View file @
aa602df
...
...
@@ -106,10 +106,28 @@ export function header() {
};
}
export
function
headerOnlyDispatchSuccess
()
{
return
(
dispatch
,
getState
)
=>
{
let
{
section
}
=
getState
();
if
(
section
.
isFetching
)
{
return
;
}
// dispatch(headerRequest());
return
new
SectionService
().
header
(
section
.
id
)
.
then
(
json
=>
{
let
payload
=
parseHeader
(
json
);
dispatch
(
headerSuccess
(
payload
));
})
.
catch
(
error
=>
{
// dispatch(headerFailure());
});
};
}
export
function
newPost
(
ptr
=
false
)
{
return
(
dispatch
,
getState
)
=>
{
let
{
section
,
user
}
=
getState
();
if
(
section
.
new
.
isFetching
||
(
!
ptr
&&
section
.
new
.
endReached
))
{
if
(
section
.
new
.
isFetching
||
(
!
ptr
&&
section
.
new
.
endReached
)
||
section
.
new
.
error
!==
null
)
{
return
;
}
dispatch
(
newPostRequest
(
ptr
));
...
...
@@ -139,7 +157,7 @@ export function newPost(ptr = false) {
export
function
hotPost
(
ptr
=
false
)
{
return
(
dispatch
,
getState
)
=>
{
let
{
section
,
user
}
=
getState
();
if
(
section
.
hot
.
isFetching
||
(
!
ptr
&&
section
.
hot
.
endReached
))
{
if
(
section
.
hot
.
isFetching
||
(
!
ptr
&&
section
.
hot
.
endReached
)
||
section
.
hot
.
error
!==
null
)
{
return
;
}
dispatch
(
hotPostRequest
(
ptr
));
...
...
js/community/reducers/section/sectionInitialState.js
View file @
aa602df
...
...
@@ -23,7 +23,7 @@ let InitialState = Record({
ptr
:
false
,
notice
:
new
(
Record
({
duration
:
3
,
open
:
'
Y
'
,
open
:
'
N
'
,
list
:
List
(),
})),
header
:
new
(
Record
({
...
...
Please
register
or
login
to post a comment