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
chenl
8 years ago
Commit
6f4a14eb222d253a50f3abe7e305474ec16f731e
1 parent
b97a69ac
修复了品类页在android 7 点击无效的问题。review by liben。
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
24 deletions
js/classify/components/categoryB/HotCategoryList.js
js/classify/components/categoryB/HotCategoryList.js
View file @
6f4a14e
...
...
@@ -52,30 +52,14 @@ export default class HotCategoryList extends Component{
}
let
imageUrl
=
SlicedImage
.
getSlicedUrl
(
rowData
.
get
(
"default_images"
),
98
,
128
,
2
);
// let categoryName = rowData.get("category_name");
//数据类型,纯文字型和图片型,列表中会出现纯文本的情况,比如MORE
let
dataType
=
rowData
.
get
(
"data_type"
);
if
(
dataType
&&
dataType
==
'text'
)
return
(
<
TouchableOpacity
activeOpacity
=
{
1
}
onPress
=
{()
=>
this
.
props
.
onPressHotCategoryItem
&&
this
.
props
.
onPressHotCategoryItem
(
rowData
.
toJS
(),
rowID
)}
>
<
View
style
=
{
styles
.
rowContainer
}
>
<
Text
style
=
{
styles
.
rowText
}
numberOfLines
=
{
1
}
>
{
rowData
.
get
(
"show_category_name"
)}
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
);
else
{
return
(
<
TouchableOpacity
activeOpacity
=
{
1
}
onPress
=
{()
=>
this
.
props
.
onPressHotCategoryItem
&&
this
.
props
.
onPressHotCategoryItem
(
rowData
.
toJS
(),
rowID
)}
>
<
View
style
=
{
styles
.
rowContainer
}
>
<
Image
style
=
{
styles
.
rowThumbnail
}
source
=
{{
uri
:
imageUrl
}}
/
>
<
View
style
=
{
styles
.
rowTextContainer
}
><
Text
style
=
{
styles
.
rowText
}
numberOfLines
=
{
2
}
>
{
rowData
.
get
(
"category_name"
)}
<
/Text></
View
>
<
/View
>
<
/TouchableOpacity
>
);
}
return
(
<
TouchableOpacity
onPress
=
{()
=>
this
.
props
.
onPressHotCategoryItem
&&
this
.
props
.
onPressHotCategoryItem
(
rowData
.
toJS
(),
rowID
)}
>
<
View
style
=
{
styles
.
rowContainer
}
>
<
Image
style
=
{
styles
.
rowThumbnail
}
key
=
{
imageUrl
}
source
=
{{
uri
:
imageUrl
}}
/
>
<
View
style
=
{
styles
.
rowTextContainer
}
><
Text
style
=
{
styles
.
rowText
}
numberOfLines
=
{
2
}
>
{
rowData
.
get
(
"category_name"
)}
<
/Text></
View
>
<
/View
>
<
/TouchableOpacity
>
);
}
...
...
Please
register
or
login
to post a comment