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
da3a3e16239ade2b72aca6cb0d85bd9eb840f605
1 parent
cef1f88d
退出页面是 取消timer review by zhanglixia
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
4 deletions
js/outlet/components/outlet/ActivityCell.js
js/outlet/components/outlet/OutletPageListView.js
js/outlet/reducers/outlet/outletReducer.js
js/outlet/components/outlet/ActivityCell.js
View file @
da3a3e1
...
...
@@ -69,6 +69,10 @@ export default class ActivityCell extends React.Component {
}
}
componentWillUnmount
()
{
this
.
interval
&&
clearInterval
(
this
.
interval
);
}
getStartTimeString
(
startTime
){
let
startDate
=
new
Date
(
startTime
);
return
startDate
.
getMonth
()
+
'月'
+
startDate
.
getDate
()
+
'日'
+
startDate
.
getHours
()
+
'时'
+
'开始'
;
...
...
js/outlet/components/outlet/OutletPageListView.js
View file @
da3a3e1
...
...
@@ -115,7 +115,7 @@ export default class OutletPageListView extends Component {
// return(<TripleImage resource={rowData} onPressProduct={this.props.onPressProduct}/>);
}
}
else
if
(
sectionID
==
'activityList'
)
{
return
(
<
ActivityCell
resource
=
{
rowData
}
onPressProduct
=
{
this
.
props
.
onPressProduct
}
/>
)
;
return
(
<
ActivityCell
resource
=
{
rowData
}
key
=
{
rowID
+
'activityList'
}
onPressProduct
=
{
this
.
props
.
onPressProduct
}
/>
)
;
}
else
if
(
sectionID
==
'activityMore'
)
{
if
(
rowData
==
'more'
)
{
return
(
...
...
@@ -153,10 +153,11 @@ export default class OutletPageListView extends Component {
return
null
;
}
let
title
=
tabLabel
;
let
isFetching
=
resource
.
get
(
'isFetching'
)?
resource
.
get
(
'isFetching'
):
false
;
let
isFetching
_homeResource
=
resource
.
get
(
'isFetching'
)?
resource
.
get
(
'isFetching'
):
false
;
let
honeResource
=
resource
.
get
(
'honeResource'
);
let
activityList
=
resource
.
get
(
'activityList'
)?
resource
.
get
(
'activityList'
).
toArray
():
null
;
let
activityMore
=
resource
.
get
(
'activityMore'
);
let
activityFetching
=
resource
.
get
(
'activityFetching'
)?
resource
.
get
(
'activityFetching'
):
false
;
let
categoryNavigationList
=
resource
.
get
(
'categoryNavigationList'
)?
resource
.
get
(
'categoryNavigationList'
).
toArray
():
null
;
let
fliter
=
resource
.
get
(
'Navfliter'
)?
resource
.
get
(
'Navfliter'
):
0
;
let
productList
=
categoryNavigationList
?
categoryNavigationList
[
fliter
].
get
(
'list'
):
null
;
...
...
@@ -167,6 +168,7 @@ export default class OutletPageListView extends Component {
if
(
!
activityMore
)
{
activityList
=
activityList
?
activityList
.
slice
(
0
,
10
):
null
;
}
let
isFetching
=
isFetching_homeResource
||
activityFetching
;
let
dataSource
=
{
outletHomeReource
:
list
?
list
.
toArray
():[],
...
...
js/outlet/reducers/outlet/outletReducer.js
View file @
da3a3e1
...
...
@@ -162,7 +162,15 @@ export default function outletReducer(state=initialState, action) {
return
state
.
setIn
([
'categoryList'
,
'list'
],
Immutable
.
fromJS
(
categoryList
.
list
))
}
case
GET_OUTLET_ACTIVITY_LIST_REQUEST
:
{
let
categoryList
=
state
.
categoryList
.
toJS
();
let
content_code1
=
action
.
payload
;
categoryList
.
list
.
map
((
item
,
i
)
=>
{
let
content_code0
=
item
.
content_code
;
if
(
content_code1
==
content_code0
)
{
item
.
activityFetching
=
true
;
}
})
return
state
.
setIn
([
'categoryList'
,
'list'
],
Immutable
.
fromJS
(
categoryList
.
list
))
}
case
GET_OUTLET_ACTIVITY_LIST_SUCCESS
:
{
let
categoryList
=
state
.
categoryList
.
toJS
();
...
...
@@ -172,12 +180,22 @@ export default function outletReducer(state=initialState, action) {
if
(
content_code1
==
content_code0
)
{
item
.
activityList
=
action
.
payload
.
json
;
item
.
activityMore
=
false
;
item
.
activityFetching
=
false
;
}
})
return
state
.
setIn
([
'categoryList'
,
'list'
],
Immutable
.
fromJS
(
categoryList
.
list
))
}
case
GET_OUTLET_ACTIVITY_LIST_FAILURE
:
{
let
categoryList
=
state
.
categoryList
.
toJS
();
let
content_code1
=
action
.
payload
.
content_code
;
categoryList
.
list
.
map
((
item
,
i
)
=>
{
let
content_code0
=
item
.
content_code
;
if
(
content_code1
==
content_code0
)
{
item
.
activityFetching
=
false
;
item
.
error
=
action
.
payload
.
error
;
}
})
return
state
.
setIn
([
'categoryList'
,
'list'
],
Immutable
.
fromJS
(
categoryList
.
list
))
}
case
SET_ACTIVITY_FLITER
:
{
let
categoryList
=
state
.
categoryList
.
toJS
();
...
...
Please
register
or
login
to post a comment