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
鹿亮亮
8 years ago
Commit
05dc652716ab8c6e3f8648799bd1d37a30e6e838
2 parents
d0e2ed36
6e44a57e
Merge branch '5.5.0' of
http://git.yoho.cn/mobile/YH_RNComponent
into 5.5.0
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
101 additions
and
39 deletions
js/home/components/floor/ActivityProductFloor.js
js/home/components/floor/AppIconList.js
js/home/components/floor/HotCategoryIndividualization.js
js/home/components/floor/LivePicture.js
js/home/components/floor/NewProductFloor.js
js/home/components/floor/NewUserFloor.js
js/home/components/floor/PopularSingleProduct.js
js/home/components/floor/Sale1T1L4R.js
js/home/components/floor/SingleNameImage.js
js/home/components/floor/SixLinesFloor.js
js/home/components/floor/SmallPic.js
js/home/components/floor/VipUserFloor.js
js/home/utils/floorParser.js
js/mine/containers/MineContainer.js
js/home/components/floor/ActivityProductFloor.js
View file @
05dc652
...
...
@@ -62,9 +62,12 @@ export default class ActivityProductFloor extends Component {
let
productId
=
rowData
.
get
(
'product_id'
);
let
productSkn
=
rowData
.
get
(
'product_skn'
);
let
imgUrl
=
SlicedImage
.
getSlicedUrl
(
rowData
.
get
(
'default_images'
),
cellWidth
,
120
,
2
);
let
yh_exposureData
=
rowData
.
get
(
'yh_exposureData'
)
?
rowData
.
get
(
'yh_exposureData'
).
toJS
()
:
null
;
return
(
<
TouchableOpacity
activeOpacity
=
{
1
}
yh_exposureData
=
{
rowData
.
get
(
'yh_exposureData'
)
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
yh_exposureData
}
onPress
=
{()
=>
{
this
.
props
.
onPressVipProduct
&&
this
.
props
.
onPressVipProduct
(
rowData
,
imgUrl
,
index
+
rowID
)
}}
...
...
@@ -99,10 +102,13 @@ export default class ActivityProductFloor extends Component {
let
cellH
=
this
.
_isShowOrignPrice
(
type
)
?
cellHeight
:
cellHeight
-
20
;
let
floorH
=
cellH
+
40
+
bannerHeight
;
let
yh_exposureDataTitle
=
(
data
.
get
(
'title'
)
&&
data
.
get
(
'title'
).
get
(
'yh_exposureData'
))
?
data
.
get
(
'title'
).
get
(
'yh_exposureData'
).
toJS
()
:
null
;
return
(
<
View
style
=
{{
backgroundColor
:
'white'
,
width
:
width
,
height
:
floorH
}}
>
<
HeadTitleCell
title
=
{
title
}
moreUrl
=
{
moreUrl
}
onPressTitleMore
=
{
this
.
props
.
onPressTitleMore
}
yh_exposureData
=
{
data
.
get
(
'title'
).
get
(
'yh_exposureData'
)
}
/
>
onPressTitleMore
=
{
this
.
props
.
onPressTitleMore
}
yh_exposureData
=
{
yh_exposureDataTitle
}
/
>
<
ImageSlider
resource
=
{
bannerData
}
sliderWidth
=
{
width
}
...
...
js/home/components/floor/AppIconList.js
View file @
05dc652
...
...
@@ -56,7 +56,7 @@ export default class AppIconList extends React.Component {
yh_exposureData
=
{
yh_exposureData
}
onPress
=
{()
=>
{
this
.
props
.
onPressAppIconItem
&&
this
.
props
.
onPressAppIconItem
(
url
,
src
,
rowID
)}}
>
<
YH_Image
style
=
{
imgStyle
}
url
=
{
src
}
/
>
<
YH_Image
key
=
{
src
}
style
=
{
imgStyle
}
url
=
{
src
}
/
>
<
Text
style
=
{
titleStyle
}
>
{
title
}
<
/Text
>
<
/TouchableOpacity
>
);
...
...
js/home/components/floor/HotCategoryIndividualization.js
View file @
05dc652
...
...
@@ -36,19 +36,24 @@ export default class HotCategoryIndividualization extends Component {
let
lineNumber
=
parseInt
((
data
.
length
+
3
)
/
4
);
let
listHeight
=
Math
.
floor
(
lineNumber
*
cellHeight
);
let
containerHeight
=
listHeight
+
40
;
let
yh_exposureDataTitle
=
(
title
&&
title
.
get
(
'yh_exposureData'
))
?
title
.
get
(
'yh_exposureData'
).
toJS
()
:
null
;
return
(
<
View
style
=
{[
styles
.
container
,
{
height
:
containerHeight
}]}
>
<
HeadTitleCell
title
=
{
title
.
get
(
'title'
)}
moreUrl
=
{
title
.
get
(
'more_url'
)}
onPressTitleMore
=
{
this
.
props
.
onPressTitleMore
}
yh_exposureData
=
{
title
.
get
(
'yh_exposureData'
)
}
/
>
onPressTitleMore
=
{
this
.
props
.
onPressTitleMore
}
yh_exposureData
=
{
yh_exposureDataTitle
}
/
>
<
View
style
=
{[
styles
.
list
,
{
height
:
listHeight
}]}
>
{
data
.
map
((
item
,
i
)
=>
{
let
url
=
YH_Image
.
getSlicedUrl
(
item
.
get
(
'src'
),
imageWidth
,
imageHeight
,
2
);
let
yh_exposureData
=
item
.
get
(
'yh_exposureData'
)
?
item
.
get
(
'yh_exposureData'
).
toJS
()
:
null
;
return
(
<
TouchableOpacity
key
=
{
i
}
style
=
{
styles
.
cellContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
item
.
get
(
'yh_exposureData'
)
}
yh_exposureData
=
{
yh_exposureData
}
onPress
=
{()
=>
{
this
.
props
.
onPressVipBannerItem
&&
this
.
props
.
onPressVipBannerItem
(
item
.
get
(
'url'
),
url
,
i
+
1
);
}}
>
...
...
js/home/components/floor/LivePicture.js
View file @
05dc652
...
...
@@ -38,24 +38,29 @@ export default class LivePicture extends Component{
let
image2Url
=
SlicedImage
.
getSlicedUrl
(
imglst
.
get
(
1
).
get
(
"src"
),
imageWidth
,
imageHeight
,
2
);
let
image3Url
=
SlicedImage
.
getSlicedUrl
(
imglst
.
get
(
2
).
get
(
"src"
),
imageWidth
,
imageHeight
,
2
);
let
yh_exposureDataTitle
=
title
.
get
(
'yh_exposureData'
)
?
title
.
get
(
'yh_exposureData'
).
toJS
()
:
null
;
let
yh_exposureData0
=
imglst
.
get
(
0
).
get
(
'yh_exposureData'
)
?
imglst
.
get
(
0
).
get
(
'yh_exposureData'
).
toJS
()
:
null
;
let
yh_exposureData1
=
imglst
.
get
(
1
).
get
(
'yh_exposureData'
)
?
imglst
.
get
(
1
).
get
(
'yh_exposureData'
).
toJS
()
:
null
;
let
yh_exposureData2
=
imglst
.
get
(
2
).
get
(
'yh_exposureData'
)
?
imglst
.
get
(
2
).
get
(
'yh_exposureData'
).
toJS
()
:
null
;
return
(
<
View
style
=
{
styles
.
container
}
>
<
HeadTitleCell
title
=
{
title
.
get
(
'title'
)}
moreUrl
=
{
title
.
get
(
'more_url'
)}
onPressTitleMore
=
{
this
.
props
.
onPressTitleMore
}
yh_exposureData
=
{
title
.
get
(
'yh_exposureData'
)
}
/
>
onPressTitleMore
=
{
this
.
props
.
onPressTitleMore
}
yh_exposureData
=
{
yh_exposureDataTitle
}
/
>
<
View
style
=
{
styles
.
imageContainer
}
>
<
TouchableOpacity
activeOpacity
=
{
1
}
yh_exposureData
=
{
imglst
.
get
(
0
).
get
(
'yh_exposureData'
)
}
<
TouchableOpacity
activeOpacity
=
{
1
}
yh_exposureData
=
{
yh_exposureData0
}
onPress
=
{()
=>
this
.
props
.
onPressImageItem
&&
this
.
props
.
onPressImageItem
(
imglst
.
get
(
0
).
get
(
'url'
),
image1Url
,
0
)}
>
<
YH_Image
style
=
{
styles
.
imageLeftAndRight
}
url
=
{
image1Url
}
/
>
<
/TouchableOpacity
>
<
TouchableOpacity
activeOpacity
=
{
1
}
yh_exposureData
=
{
imglst
.
get
(
1
).
get
(
'yh_exposureData'
)
}
<
TouchableOpacity
activeOpacity
=
{
1
}
yh_exposureData
=
{
yh_exposureData1
}
onPress
=
{()
=>
this
.
props
.
onPressImageItem
&&
this
.
props
.
onPressImageItem
(
imglst
.
get
(
1
).
get
(
'url'
),
image2Url
,
1
)}
>
<
YH_Image
style
=
{
styles
.
imageMiddle
}
url
=
{
image2Url
}
/
>
<
/TouchableOpacity
>
<
TouchableOpacity
activeOpacity
=
{
1
}
yh_exposureData
=
{
imglst
.
get
(
2
).
get
(
'yh_exposureData'
)
}
<
TouchableOpacity
activeOpacity
=
{
1
}
yh_exposureData
=
{
yh_exposureData2
}
onPress
=
{()
=>
this
.
props
.
onPressImageItem
&&
this
.
props
.
onPressImageItem
(
imglst
.
get
(
2
).
get
(
'url'
),
image3Url
,
2
)}
>
<
YH_Image
style
=
{
styles
.
imageLeftAndRight
}
url
=
{
image3Url
}
/
>
<
/TouchableOpacity
>
...
...
js/home/components/floor/NewProductFloor.js
View file @
05dc652
...
...
@@ -39,35 +39,41 @@ export default class NewProductFloor extends Component{
let
rightSmallTopRightImageUrl
=
SlicedImage
.
getSlicedUrl
(
imglst
.
get
(
3
).
get
(
"src"
),
rightSmallImageWidth
,
rightSmallImageHeight
,
2
);
let
rightSmallBottomRightImageUrl
=
SlicedImage
.
getSlicedUrl
(
imglst
.
get
(
4
).
get
(
"src"
),
rightSmallImageWidth
,
rightSmallImageHeight
,
2
);
let
yh_exposureDataTitle
=
title
.
get
(
'yh_exposureData'
)
?
title
.
get
(
'yh_exposureData'
).
toJS
()
:
null
;
let
yh_exposureData0
=
imglst
.
get
(
0
).
get
(
'yh_exposureData'
)
?
imglst
.
get
(
0
).
get
(
'yh_exposureData'
).
toJS
()
:
null
;
let
yh_exposureData1
=
imglst
.
get
(
1
).
get
(
'yh_exposureData'
)
?
imglst
.
get
(
1
).
get
(
'yh_exposureData'
).
toJS
()
:
null
;
let
yh_exposureData2
=
imglst
.
get
(
2
).
get
(
'yh_exposureData'
)
?
imglst
.
get
(
2
).
get
(
'yh_exposureData'
).
toJS
()
:
null
;
let
yh_exposureData3
=
imglst
.
get
(
3
).
get
(
'yh_exposureData'
)
?
imglst
.
get
(
3
).
get
(
'yh_exposureData'
).
toJS
()
:
null
;
let
yh_exposureData4
=
imglst
.
get
(
4
).
get
(
'yh_exposureData'
)
?
imglst
.
get
(
4
).
get
(
'yh_exposureData'
).
toJS
()
:
null
;
return
(
<
View
style
=
{
styles
.
container
}
>
<
HeadTitleCell
title
=
{
title
.
get
(
'title'
)}
moreUrl
=
{
title
.
get
(
'more_url'
)}
onPressTitleMore
=
{
this
.
props
.
onPressTitleMore
}
yh_exposureData
=
{
title
.
get
(
'yh_exposureData'
)
}
/
>
onPressTitleMore
=
{
this
.
props
.
onPressTitleMore
}
yh_exposureData
=
{
yh_exposureDataTitle
}
/
>
<
View
style
=
{
styles
.
imageContainer
}
>
<
TouchableOpacity
style
=
{
styles
.
leftBigImageContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
imglst
.
get
(
0
).
get
(
'yh_exposureData'
)
}
<
TouchableOpacity
style
=
{
styles
.
leftBigImageContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
yh_exposureData0
}
onPress
=
{()
=>
this
.
props
.
onPressImageItem
&&
this
.
props
.
onPressImageItem
(
imglst
.
get
(
0
).
get
(
'url'
),
leftBigImageUrl
,
0
)}
>
<
YH_Image
style
=
{
styles
.
leftBigImage
}
url
=
{
leftBigImageUrl
}
/
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
rightSmallTopLeftImageContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
imglst
.
get
(
1
).
get
(
'yh_exposureData'
)
}
<
TouchableOpacity
style
=
{
styles
.
rightSmallTopLeftImageContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
yh_exposureData1
}
onPress
=
{()
=>
this
.
props
.
onPressImageItem
&&
this
.
props
.
onPressImageItem
(
imglst
.
get
(
1
).
get
(
'url'
),
rightSmallTopLeftImageUrl
,
1
)}
>
<
YH_Image
style
=
{
styles
.
rightSmallTopLeftImage
}
url
=
{
rightSmallTopLeftImageUrl
}
/
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
rightSmallBottomLeftImageContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
imglst
.
get
(
2
).
get
(
'yh_exposureData'
)
}
<
TouchableOpacity
style
=
{
styles
.
rightSmallBottomLeftImageContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
yh_exposureData2
}
onPress
=
{()
=>
this
.
props
.
onPressImageItem
&&
this
.
props
.
onPressImageItem
(
imglst
.
get
(
2
).
get
(
'url'
),
rightSmallBottomLeftImageUrl
,
2
)}
>
<
YH_Image
style
=
{
styles
.
rightSmallBottomLeftImage
}
url
=
{
rightSmallBottomLeftImageUrl
}
/
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
rightSmallTopRightImageContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
imglst
.
get
(
3
).
get
(
'yh_exposureData'
)
}
<
TouchableOpacity
style
=
{
styles
.
rightSmallTopRightImageContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
yh_exposureData3
}
onPress
=
{()
=>
this
.
props
.
onPressImageItem
&&
this
.
props
.
onPressImageItem
(
imglst
.
get
(
3
).
get
(
'url'
),
rightSmallTopRightImageUrl
,
3
)}
>
<
YH_Image
style
=
{
styles
.
rightSmallTopRightImage
}
url
=
{
rightSmallTopRightImageUrl
}
/
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
rightSmallBottomRightImageContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
imglst
.
get
(
4
).
get
(
'yh_exposureData'
)
}
<
TouchableOpacity
style
=
{
styles
.
rightSmallBottomRightImageContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
yh_exposureData4
}
onPress
=
{()
=>
this
.
props
.
onPressImageItem
&&
this
.
props
.
onPressImageItem
(
imglst
.
get
(
4
).
get
(
'url'
),
rightSmallBottomRightImageUrl
,
4
)}
>
<
YH_Image
style
=
{
styles
.
rightSmallBottomRightImage
}
url
=
{
rightSmallBottomRightImageUrl
}
/
>
<
/TouchableOpacity
>
...
...
js/home/components/floor/NewUserFloor.js
View file @
05dc652
...
...
@@ -43,8 +43,10 @@ export default class NewUserFloor extends Component {
let
productId
=
rowData
.
get
(
'product_id'
);
let
productSkn
=
rowData
.
get
(
'product_skn'
);
let
imgUrl
=
SlicedImage
.
getSlicedUrl
(
rowData
.
get
(
'default_images'
),
cellWidth
/
2
,
cellHeight
,
2
);
let
yh_exposureData
=
rowData
.
get
(
'yh_exposureData'
)
?
rowData
.
get
(
'yh_exposureData'
).
toJS
()
:
null
;
return
(
<
TouchableOpacity
style
=
{
styles
.
row
}
yh_exposureData
=
{
rowData
.
get
(
'yh_exposureData'
)
}
<
TouchableOpacity
style
=
{
styles
.
row
}
yh_exposureData
=
{
yh_exposureData
}
onPress
=
{()
=>
{
this
.
props
.
onPressVipProduct
&&
this
.
props
.
onPressVipProduct
(
rowData
,
imgUrl
,
index
+
rowID
)}}
>
<
YH_Image
style
=
{
styles
.
image
}
url
=
{
imgUrl
}
/
>
...
...
@@ -69,10 +71,13 @@ export default class NewUserFloor extends Component {
let
bannerData
=
data
.
get
(
'banner_image'
);
let
productData
=
data
.
get
(
'list'
);
let
floorH
=
130
+
40
+
bannerHeight
;
let
yh_exposureDataTitle
=
(
data
.
get
(
'title'
)
&&
data
.
get
(
'title'
).
get
(
'yh_exposureData'
))
?
data
.
get
(
'title'
).
get
(
'yh_exposureData'
).
toJS
()
:
null
;
return
(
<
View
style
=
{{
backgroundColor
:
'white'
,
width
:
width
,
height
:
floorH
}}
>
<
HeadTitleCell
title
=
{
title
}
moreUrl
=
{
moreUrl
}
onPressTitleMore
=
{
this
.
props
.
onPressTitleMore
}
yh_exposureData
=
{
data
.
get
(
'title'
).
get
(
'yh_exposureData'
)
}
/
>
onPressTitleMore
=
{
this
.
props
.
onPressTitleMore
}
yh_exposureData
=
{
yh_exposureDataTitle
}
/
>
<
ImageSlider
resource
=
{
bannerData
}
sliderWidth
=
{
width
}
...
...
js/home/components/floor/PopularSingleProduct.js
View file @
05dc652
...
...
@@ -44,9 +44,12 @@ export default class PopularSingleProduct extends Component{
let
goodsPrice
=
"¥"
+
parseFloat
(
rowData
.
get
(
'sales_price'
,
0
)).
toFixed
(
2
);
let
goodsLookNum
=
rowData
.
get
(
'sales_num'
)
+
"人"
;
let
yh_exposureData
=
rowData
.
get
(
'yh_exposureData'
)
?
rowData
.
get
(
'yh_exposureData'
).
toJS
()
:
null
;
return
(
<
TouchableOpacity
activeOpacity
=
{
1
}
yh_exposureData
=
{
rowData
.
get
(
'yh_exposureData'
)
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
yh_exposureData
}
onPress
=
{()
=>
this
.
props
.
onPressToProductDetail
&&
this
.
props
.
onPressToProductDetail
(
rowData
,
goodsImageUrl
,
index
)}
>
...
...
@@ -77,10 +80,13 @@ export default class PopularSingleProduct extends Component{
let
title
=
data
.
get
(
"title"
);
let
imglst
=
data
.
get
(
"list"
,
List
());
let
yh_exposureDataTitle
=
title
.
get
(
'yh_exposureData'
)
?
title
.
get
(
'yh_exposureData'
).
toJS
()
:
null
;
return
(
<
View
style
=
{
styles
.
container
}
>
<
HeadTitleCell
title
=
{
title
.
get
(
'title'
)}
moreUrl
=
{
title
.
get
(
'more_url'
)}
onPressTitleMore
=
{
this
.
props
.
onPressTitleMore
}
yh_exposureData
=
{
title
.
get
(
'yh_exposureData'
)
}
/
>
onPressTitleMore
=
{
this
.
props
.
onPressTitleMore
}
yh_exposureData
=
{
yh_exposureDataTitle
}
/
>
<
ImageSlider
resource
=
{
banner
}
sliderWidth
=
{
width
}
...
...
js/home/components/floor/Sale1T1L4R.js
View file @
05dc652
...
...
@@ -104,11 +104,18 @@ export default class Sale1T1L4R extends Component{
let
index
=
banner
.
toJS
().
length
;
let
yh_exposureDataTitle
=
title
.
get
(
'yh_exposureData'
)
?
title
.
get
(
'yh_exposureData'
).
toJS
()
:
null
;
let
yh_exposureData0
=
imglst
.
get
(
0
).
get
(
'yh_exposureData'
)
?
imglst
.
get
(
0
).
get
(
'yh_exposureData'
).
toJS
()
:
null
;
let
yh_exposureData1
=
imglst
.
get
(
1
).
get
(
'yh_exposureData'
)
?
imglst
.
get
(
1
).
get
(
'yh_exposureData'
).
toJS
()
:
null
;
let
yh_exposureData2
=
imglst
.
get
(
2
).
get
(
'yh_exposureData'
)
?
imglst
.
get
(
2
).
get
(
'yh_exposureData'
).
toJS
()
:
null
;
let
yh_exposureData3
=
imglst
.
get
(
3
).
get
(
'yh_exposureData'
)
?
imglst
.
get
(
3
).
get
(
'yh_exposureData'
).
toJS
()
:
null
;
let
yh_exposureData4
=
imglst
.
get
(
4
).
get
(
'yh_exposureData'
)
?
imglst
.
get
(
4
).
get
(
'yh_exposureData'
).
toJS
()
:
null
;
return
(
<
View
style
=
{[
styles
.
container
,
{
height
:
containerHeight
}]}
>
<
HeadTitleCell
title
=
{
title
.
get
(
'title'
)}
moreUrl
=
{
title
.
get
(
'more_url'
)}
onPressTitleMore
=
{
this
.
props
.
onPressTitleMore
}
yh_exposureData
=
{
title
.
get
(
'yh_exposureData'
)
}
/
>
onPressTitleMore
=
{
this
.
props
.
onPressTitleMore
}
yh_exposureData
=
{
yh_exposureDataTitle
}
/
>
<
ImageSlider
resource
=
{
banner
}
...
...
@@ -119,7 +126,7 @@ export default class Sale1T1L4R extends Component{
<
View
style
=
{
styles
.
imageContainer
}
>
<
TouchableOpacity
style
=
{
styles
.
leftBigImageContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
imglst
.
get
(
0
).
get
(
'yh_exposureData'
)
}
<
TouchableOpacity
style
=
{
styles
.
leftBigImageContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
yh_exposureData0
}
onPress
=
{()
=>
this
.
props
.
onPressImageItem
&&
this
.
props
.
onPressImageItem
(
imglst
.
get
(
0
).
get
(
'url'
),
leftBigImageUrl
,
index
)}
>
<
YH_Image
style
=
{
styles
.
leftBigImage
}
url
=
{
leftBigImageUrl
}
/
>
...
...
@@ -138,22 +145,22 @@ export default class Sale1T1L4R extends Component{
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
rightTopBigImageContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
imglst
.
get
(
1
).
get
(
'yh_exposureData'
)
}
<
TouchableOpacity
style
=
{
styles
.
rightTopBigImageContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
yh_exposureData1
}
onPress
=
{()
=>
this
.
props
.
onPressImageItem
&&
this
.
props
.
onPressImageItem
(
imglst
.
get
(
1
).
get
(
'url'
),
rightTopBigImageUrl
,
index
+
1
)}
>
<
YH_Image
style
=
{
styles
.
rightTopBigImage
}
url
=
{
rightTopBigImageUrl
}
/
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
rightTopSmallImageContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
imglst
.
get
(
2
).
get
(
'yh_exposureData'
)
}
<
TouchableOpacity
style
=
{
styles
.
rightTopSmallImageContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
yh_exposureData2
}
onPress
=
{()
=>
this
.
props
.
onPressImageItem
&&
this
.
props
.
onPressImageItem
(
imglst
.
get
(
2
).
get
(
'url'
),
rightTopSmallImageUrl
,
index
+
2
)}
>
<
YH_Image
style
=
{
styles
.
rightTopSmallImage
}
url
=
{
rightTopSmallImageUrl
}
/
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
rightBottomBigImageContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
imglst
.
get
(
3
).
get
(
'yh_exposureData'
)
}
<
TouchableOpacity
style
=
{
styles
.
rightBottomBigImageContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
yh_exposureData3
}
onPress
=
{()
=>
this
.
props
.
onPressImageItem
&&
this
.
props
.
onPressImageItem
(
imglst
.
get
(
3
).
get
(
'url'
),
rightBottomBigImageUrl
,
index
+
3
)}
>
<
YH_Image
style
=
{
styles
.
rightBottomBigImage
}
url
=
{
rightBottomBigImageUrl
}
/
>
<
/TouchableOpacity
>
<
TouchableOpacity
style
=
{
styles
.
rightBottomSmallImageContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
imglst
.
get
(
4
).
get
(
'yh_exposureData'
)
}
<
TouchableOpacity
style
=
{
styles
.
rightBottomSmallImageContainer
}
activeOpacity
=
{
1
}
yh_exposureData
=
{
yh_exposureData4
}
onPress
=
{()
=>
this
.
props
.
onPressImageItem
&&
this
.
props
.
onPressImageItem
(
imglst
.
get
(
4
).
get
(
'url'
),
rightBottomSmallImageUrl
,
index
+
4
)}
>
<
YH_Image
style
=
{
styles
.
rightBottomSmallImage
}
url
=
{
rightBottomSmallImageUrl
}
/
>
<
/TouchableOpacity
>
...
...
js/home/components/floor/SingleNameImage.js
View file @
05dc652
...
...
@@ -38,13 +38,14 @@ export default class SingleNameImage extends React.Component {
let
title
=
data
.
get
(
'title'
);
let
imageUrl
=
YH_Image
.
getSlicedUrl
(
data
.
get
(
0
).
get
(
'src'
),
width
,
imageHeight
,
2
);
let
yh_exposureData
=
data
.
get
(
0
).
get
(
'yh_exposureData'
)
?
data
.
get
(
0
).
get
(
'yh_exposureData'
).
toJS
()
:
null
;
return
(
<
View
style
=
{
styles
.
container
}
>
<
HeadTitleCell
title
=
{
title
}
/
>
<
TouchableOpacity
activeOpacity
=
{
1
}
yh_exposureData
=
{
data
.
get
(
0
).
get
(
'yh_exposureData'
)
}
yh_exposureData
=
{
yh_exposureData
}
onPress
=
{()
=>
{
this
.
props
.
onPressSlideItem
&&
this
.
props
.
onPressSlideItem
(
data
.
get
(
0
).
get
(
'url'
),
imageUrl
,
0
);
}}
...
...
js/home/components/floor/SixLinesFloor.js
View file @
05dc652
...
...
@@ -36,8 +36,10 @@ export default class SixLinesFloor extends Component{
let
goodsImageUrl
=
rowData
.
get
(
'src'
);
goodsImageUrl
=
SlicedImage
.
getSlicedUrl
(
goodsImageUrl
,
imageWidth
,
imageHeight
,
2
);
let
yh_exposureData
=
rowData
.
get
(
'yh_exposureData'
)
?
rowData
.
get
(
'yh_exposureData'
).
toJS
()
:
null
;
return
(
<
TouchableOpacity
activeOpacity
=
{
1
}
yh_exposureData
=
{
rowData
.
get
(
'yh_exposureData'
)
}
<
TouchableOpacity
activeOpacity
=
{
1
}
yh_exposureData
=
{
yh_exposureData
}
onPress
=
{()
=>
this
.
props
.
onPressImageItem
&&
this
.
props
.
onPressImageItem
(
rowData
.
get
(
'url'
),
goodsImageUrl
,
rowID
)}
>
<
YH_Image
style
=
{
styles
.
goodsImage
}
url
=
{
goodsImageUrl
}
/
>
...
...
@@ -54,10 +56,13 @@ export default class SixLinesFloor extends Component{
let
lineNumber
=
Math
.
floor
((
imglst
.
size
+
1
)
/
2
);
let
containerHeight
=
40
+
lineNumber
*
imageHeight
;
let
yh_exposureDataTitle
=
title
.
get
(
'yh_exposureData'
)
?
title
.
get
(
'yh_exposureData'
).
toJS
()
:
null
;
return
(
<
View
style
=
{[
styles
.
container
,
{
height
:
containerHeight
}]}
>
<
HeadTitleCell
title
=
{
title
.
get
(
'name'
)}
moreUrl
=
{
title
.
get
(
'more_url'
)}
onPressTitleMore
=
{
this
.
props
.
onPressTitleMore
}
yh_exposureData
=
{
title
.
get
(
'yh_exposureData'
)
}
/
>
onPressTitleMore
=
{
this
.
props
.
onPressTitleMore
}
yh_exposureData
=
{
yh_exposureDataTitle
}
/
>
<
ListView
contentContainerStyle
=
{
styles
.
listViewContainer
}
dataSource
=
{
this
.
dataSource
.
cloneWithRows
(
imglst
.
toArray
())}
...
...
js/home/components/floor/SmallPic.js
View file @
05dc652
...
...
@@ -38,11 +38,15 @@ export default class SmallPic extends React.Component {
let
url1
=
YH_Image
.
getSlicedUrl
(
data
.
get
(
0
).
get
(
'src'
),
imageWidth
,
imageHeight
,
2
);
let
url2
=
YH_Image
.
getSlicedUrl
(
data
.
get
(
1
).
get
(
'src'
),
imageWidth
,
imageHeight
,
2
);
let
yh_exposureData1
=
data
.
get
(
0
).
get
(
'yh_exposureData'
)
?
data
.
get
(
0
).
get
(
'yh_exposureData'
).
toJS
()
:
null
;
let
yh_exposureData2
=
data
.
get
(
1
).
get
(
'yh_exposureData'
)
?
data
.
get
(
1
).
get
(
'yh_exposureData'
).
toJS
()
:
null
;
return
(
<
View
style
=
{
styles
.
container
}
>
<
TouchableOpacity
activeOpacity
=
{
1
}
yh_exposureData
=
{
data
.
get
(
0
).
get
(
'yh_exposureData'
)
}
yh_exposureData
=
{
yh_exposureData1
}
onPress
=
{()
=>
{
this
.
props
.
onPressPicItem
&&
this
.
props
.
onPressPicItem
(
data
.
get
(
0
).
get
(
'url'
),
url1
,
0
);
}}
...
...
@@ -56,7 +60,7 @@ export default class SmallPic extends React.Component {
<
/TouchableOpacity
>
<
TouchableOpacity
activeOpacity
=
{
1
}
yh_exposureData
=
{
data
.
get
(
1
).
get
(
'yh_exposureData'
)
}
yh_exposureData
=
{
yh_exposureData2
}
onPress
=
{()
=>
{
this
.
props
.
onPressPicItem
&&
this
.
props
.
onPressPicItem
(
data
.
get
(
1
).
get
(
'url'
),
url2
,
1
);
}}
...
...
js/home/components/floor/VipUserFloor.js
View file @
05dc652
...
...
@@ -44,8 +44,11 @@ export default class VipUserFloor extends Component {
let
productId
=
rowData
.
get
(
'product_id'
);
let
productSkn
=
rowData
.
get
(
'product_skn'
);
let
imgUrl
=
SlicedImage
.
getSlicedUrl
(
rowData
.
get
(
'default_images'
),
cellWidth
,
120
,
2
);
let
yh_exposureData
=
rowData
.
get
(
'yh_exposureData'
)
?
rowData
.
get
(
'yh_exposureData'
).
toJS
()
:
null
;
return
(
<
TouchableOpacity
style
=
{
styles
.
row
}
yh_exposureData
=
{
rowData
.
get
(
'yh_exposureData'
)
}
<
TouchableOpacity
style
=
{
styles
.
row
}
yh_exposureData
=
{
yh_exposureData
}
onPress
=
{()
=>
this
.
props
.
onPressVipProduct
&&
this
.
props
.
onPressVipProduct
(
rowData
,
imgUrl
,
index
+
rowID
)}
>
<
YH_Image
style
=
{
styles
.
image
}
url
=
{
imgUrl
}
...
...
@@ -67,10 +70,13 @@ export default class VipUserFloor extends Component {
let
visible
=
bgUrl
?
true
:
false
;
let
bannerData
=
data
.
get
(
'banner_image'
);
let
productData
=
data
.
get
(
'list'
);
let
yh_exposureDataTitle
=
(
data
.
get
(
'title'
)
&&
data
.
get
(
'title'
).
get
(
'yh_exposureData'
))
?
data
.
get
(
'title'
).
get
(
'yh_exposureData'
).
toJS
()
:
null
;
return
(
<
View
style
=
{
styles
.
container
}
>
<
HeadTitleCell
title
=
{
title
}
moreUrl
=
{
moreUrl
}
onPressTitleMore
=
{
this
.
props
.
onPressTitleMore
}
yh_exposureData
=
{
data
.
get
(
'title'
).
get
(
'yh_exposureData'
)
}
/
>
onPressTitleMore
=
{
this
.
props
.
onPressTitleMore
}
yh_exposureData
=
{
yh_exposureDataTitle
}
/
>
<
ImageSlider
resource
=
{
bannerData
}
sliderWidth
=
{
width
}
...
...
js/home/utils/floorParser.js
View file @
05dc652
...
...
@@ -815,10 +815,10 @@ function homeFloorAutoReportData(list,channel) {
let
params
=
autoReportData
(
channlStr
,
floorName
,
floorID
,
floorIndex
,
inFloorIndex
,
actionUrl
);
hotBrandsItem
.
yh_exposureData
=
params
;
}
let
inFloorIndex
=
parseInt
(
hotBrandsList
.
length
)
+
1
;
let
hotBrandsMore
=
item
.
data
.
image
;
let
actionUrl
=
hotBrandsMore
.
url
?
hotBrandsMore
.
url
:
''
;
let
param
=
autoReportData
(
channlStr
,
floorName
,
floorID
,
floorIndex
,
6
,
actionUrl
);
let
param
=
autoReportData
(
channlStr
,
floorName
,
floorID
,
floorIndex
,
inFloorIndex
,
actionUrl
);
hotBrandsMore
.
yh_exposureData
=
param
;
break
;
...
...
@@ -1087,7 +1087,8 @@ function homeFloorAutoReportData(list,channel) {
let
imageItem
=
itemList
[
j
];
let
inFloorIndex
=
parseInt
(
j
)
+
1
+
bannerLength
+
''
;
let
skn
=
imageItem
.
product_skn
;
let
param
=
autoReportData
(
channlStr
,
floorName
,
floorID
,
floorIndex
,
inFloorIndex
,
""
,
skn
);
let
actionUrl
=
`
http
:
//m.yohobuy.com?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${skn}"}}`;
let
param
=
autoReportData
(
channlStr
,
floorName
,
floorID
,
floorIndex
,
inFloorIndex
,
actionUrl
,
skn
);
imageItem
.
yh_exposureData
=
param
;
}
break
;
...
...
@@ -1204,7 +1205,7 @@ function homeFloorAutoReportData(list,channel) {
let
title
=
floorData
.
title
?
floorData
.
title
:
{};
let
titleParam
=
autoReportData
(
channlStr
,
floorName
,
floorID
,
floorIndex
,
"0"
,
title
.
more_url
);
title
.
yh_exposureData
=
titleParam
;
//banner添加曝光数据
let
banner
=
floorData
.
banner_image
?
floorData
.
banner_image
:
[];
let
bannerLength
=
banner
.
length
?
banner
.
length
:
0
;
...
...
@@ -1222,7 +1223,8 @@ function homeFloorAutoReportData(list,channel) {
let
imageItem
=
itemList
[
j
];
let
inFloorIndex
=
parseInt
(
j
)
+
1
+
bannerLength
+
''
;
let
skn
=
imageItem
.
product_skn
;
let
param
=
autoReportData
(
channlStr
,
floorName
,
floorID
,
floorIndex
,
inFloorIndex
,
""
,
skn
);
let
actionUrl
=
`
http
:
//m.yohobuy.com?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${skn}"}}`;
let
param
=
autoReportData
(
channlStr
,
floorName
,
floorID
,
floorIndex
,
inFloorIndex
,
actionUrl
,
skn
);
imageItem
.
yh_exposureData
=
param
;
}
break
;
...
...
@@ -1258,7 +1260,11 @@ function autoReportData(channlStr='boy',floorName='',floorID=1,floorIndex=1,inFl
param
=
{
P_NAME
:
"iFP_Home"
,
P_PARAM
:
channlStr
,
F_NAME
:
floorName
,
F_ID
:
floorID
,
F_INDEX
:
floorIndex
,
I_INDEX
:
inFloorIndex
,
ACTION_URL
:
actionUrl
,
PRD_SKN
:
skn
,
exposureEnd
:
1
,
}
...
...
js/mine/containers/MineContainer.js
View file @
05dc652
...
...
@@ -70,7 +70,7 @@ class MineContainer extends Component {
this
.
subscription4
=
NativeAppEventEmitter
.
addListener
(
'MineCenterResumeEvent'
,
(
reminder
)
=>
{
(
reminder
)
=>
{
this
.
props
.
actions
.
onMineCenterRefresh
();
}
);
...
...
@@ -222,7 +222,7 @@ class MineContainer extends Component {
this
.
props
.
actions
.
getMemberBillTaskRedDotSuccess
(
false
);
break
;
case
'mineActivity'
:
url
=
`
http
:
//m.yohobuy.com?openby:yohobuy={"action":"go.mineactivity","params":{"act_name":"${data.get('act_name')}","act_id":"${data.get('act_id')}","url":"${data.get('url')}"}}`;
url
=
`
http
:
//m.yohobuy.com?openby:yohobuy={"action":"go.mineactivity","params":{"act_name":"${data.get('act_name')}","act_id":"${data.get('act_id')}","url":"${data.get('url')}"
,"link":"${data.get('url')}"
}}`;
NativeModules
.
YH_CommonHelper
.
logEvent
(
'YB_MY_INV'
,
{});
NativeModules
.
YH_MineHelper
.
setMineActivityClicked
(
data
.
get
(
'act_id'
));
break
;
...
...
Please
register
or
login
to post a comment