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
ff40184b9d06a21a5d576a69d588ceb7aafa4c10
1 parent
3cefeae7
添加 下拉刷新 review by zhanglixia
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
js/outlet/components/outlet/OutletPageListView.js
js/outlet/components/outlet/OutletPageListView.js
View file @
ff40184
...
...
@@ -32,17 +32,22 @@ export default class OutletPageListView extends Component {
});
this
.
renderSectionHeader
=
this
.
renderSectionHeader
.
bind
(
this
);
this
.
renderRow
=
this
.
renderRow
.
bind
(
this
);
this
.
_onRefresh
=
this
.
_onRefresh
.
bind
(
this
);
}
componentDidMount
()
{
let
{
resource
,
}
=
this
.
props
;
this
.
props
.
getOutletHomeResource
&&
this
.
props
.
getOutletHomeResource
(
resource
.
get
(
'content_code'
));
this
.
_onRefresh
&&
this
.
_onRefresh
();
}
_onRefresh
()
{
let
{
resource
,
}
=
this
.
props
;
this
.
props
.
getOutletHomeResource
&&
this
.
props
.
getOutletHomeResource
(
resource
.
get
(
'content_code'
));
}
renderSectionHeader
(
sectionData
,
sectionID
)
{
if
(
sectionID
==
'categoryNavigationList'
)
{
return
(
...
...
@@ -56,7 +61,7 @@ export default class OutletPageListView extends Component {
}
renderRow
(
rowData
,
sectionID
,
rowID
,
highlightRow
)
{
console
.
log
(
rowData
.
toJS
());
//
console.log(rowData.toJS());
if
(
sectionID
==
'outletHomeReource'
)
{
if
(
rowData
.
get
(
'template_name'
)
==
'NL2R'
)
{
return
(
<
OutletThreeImage
resource
=
{
rowData
}
onPressProduct
=
{
this
.
props
.
onPressProduct
}
/>
)
;
...
...
@@ -112,10 +117,6 @@ export default class OutletPageListView extends Component {
categoryNavigationList
:
categoryNavigationList
?
categoryNavigationList
.
toArray
():[],
};
return
(
<
View
style
=
{
styles
.
container
}
>
<
ListView
...
...
@@ -125,6 +126,11 @@ export default class OutletPageListView extends Component {
dataSource
=
{
this
.
dataSource
.
cloneWithRowsAndSections
(
dataSource
)}
renderRow
=
{
this
.
renderRow
}
renderSectionHeader
=
{
this
.
renderSectionHeader
}
enablePullToRefresh
=
{
true
}
isOnPullToRefresh
=
{
isFetching
}
onRefreshData
=
{()
=>
{
this
.
_onRefresh
&&
this
.
_onRefresh
();
}}
/
>
<
LoadingIndicator
isVisible
=
{
isFetching
}
...
...
Please
register
or
login
to post a comment