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
Plain Diff
Browse Files
Authored by
chenl
8 years ago
Commit
13d829344426e187857a8b16081ca13189e6ee6e
2 parents
d2816799
3675fe6b
Merge branch 'local' into 5.4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
11 deletions
js/classify/components/categoryB/CategoryBList.js
js/classify/components/categoryB/HotBrandList.js
js/classify/components/categoryB/HotCategoryList.js
js/classify/containers/BrandContainer.js
js/classify/reducers/categoryB/categoryBActions.js
js/classify/components/categoryB/CategoryBList.js
View file @
13d8293
...
...
@@ -166,7 +166,7 @@ let styles = StyleSheet.create({
backgroundColor
:
'white'
,
},
contentContainer
:
{
backgroundColor
:
'
white
'
,
backgroundColor
:
'
#f0f0f0
'
,
width
:
100
*
DEVICE_WIDTH_RATIO
,
height
:
height
-
156
,
},
...
...
js/classify/components/categoryB/HotBrandList.js
View file @
13d8293
...
...
@@ -27,7 +27,7 @@ export default class HotBrandList extends Component{
}
shouldComponentUpdate
(
nextProps
){
if
(
Immutable
.
is
(
nextProps
.
rowData
,
this
.
props
.
rowD
ata
))
{
if
(
Immutable
.
is
(
nextProps
.
data
,
this
.
props
.
d
ata
))
{
return
false
;
}
else
{
return
true
;
...
...
js/classify/components/categoryB/HotCategoryList.js
View file @
13d8293
...
...
@@ -27,10 +27,10 @@ export default class HotCategoryList extends Component{
}
shouldComponentUpdate
(
nextProps
){
if
(
Immutable
.
is
(
nextProps
.
rowData
,
this
.
props
.
rowData
))
{
return
false
;
if
(
Immutable
.
is
(
nextProps
.
data
,
this
.
props
.
data
))
{
return
false
;
}
else
{
return
true
;
return
true
;
}
}
...
...
js/classify/containers/BrandContainer.js
View file @
13d8293
...
...
@@ -73,8 +73,11 @@ class BrandContainer extends Component {
}
componentDidMount
()
{
this
.
props
.
actions
.
getBrandList
(
1
);
this
.
props
.
actions
.
getBrandResource
(
1
);
let
{
selectedChannelId
}
=
this
.
props
.
brand
;
this
.
props
.
actions
.
getBrandList
(
selectedChannelId
);
this
.
props
.
actions
.
getBrandResource
(
selectedChannelId
);
this
.
props
.
actions
.
searchHistory
();
this
.
props
.
actions
.
hotKeyword
();
}
...
...
js/classify/reducers/categoryB/categoryBActions.js
View file @
13d8293
...
...
@@ -49,8 +49,6 @@ export function selectCategoryB(category){
let
categoryId
=
category
.
category_id
;
let
categoryValue
=
category
.
category_name
;
console
.
log
(
"chenlin"
,
"调用点击事件:_onSelectCategory,参数为:"
+
JSON
.
stringify
(
category
));
if
(
category
.
sub
&&
category
.
sub
.
length
>
0
){
dispatch
(
getCategoryBSubCategoryDetail
(
categoryId
,
categoryValue
));
}
...
...
@@ -94,7 +92,7 @@ export function getCategoryBSubCategoryDetail(category_id, category_value){
}
//已命中,展示缓存数据
else
{
dispatch
(
getCategoryBSubDetail
Data
(
categoryData
));
dispatch
(
getCategoryBSubDetail
FromCache
(
categoryData
));
}
};
...
...
@@ -269,7 +267,7 @@ export function setCurrentChannelB(channelId, channelValue){
}
}
export
function
getCategoryBSubDetail
Data
(
categoryData
)
{
export
function
getCategoryBSubDetail
FromCache
(
categoryData
)
{
return
{
type
:
SET_CURRENT_CATEGORY_B_SUBDETAIL_FROM_CACHE
,
payload
:
categoryData
...
...
Please
register
or
login
to post a comment