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
0d7d31875f37325467634e5ba41f01af73866b4e
2 parents
c5acad2c
429bcc68
Merge branch '5.5.0' into 5.5.1
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
120 additions
and
46 deletions
js/home/components/floor/ActivityProductFloor.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/TrendgoodsTopic.js
js/home/components/floor/VipUserFloor.js
js/home/components/home/Home.js
js/home/containers/HomeContainer.js
js/home/utils/floorParser.js
js/mine/containers/MineContainer.js
js/home/components/floor/ActivityProductFloor.js
View file @
0d7d318
...
...
@@ -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/HotCategoryIndividualization.js
View file @
0d7d318
...
...
@@ -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 @
0d7d318
...
...
@@ -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 @
0d7d318
...
...
@@ -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
}
resizeMode
=
{
'stretch'
}
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
}
resizeMode
=
{
'stretch'
}
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
}
resizeMode
=
{
'stretch'
}
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
}
resizeMode
=
{
'stretch'
}
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
}
resizeMode
=
{
'stretch'
}
url
=
{
rightSmallBottomRightImageUrl
}
/
>
<
/TouchableOpacity
>
...
...
js/home/components/floor/NewUserFloor.js
View file @
0d7d318
...
...
@@ -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 @
0d7d318
...
...
@@ -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 @
0d7d318
...
...
@@ -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 @
0d7d318
...
...
@@ -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 @
0d7d318
...
...
@@ -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
}
resizeMode
=
{
'stretch'
}
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 @
0d7d318
...
...
@@ -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/TrendgoodsTopic.js
View file @
0d7d318
...
...
@@ -6,6 +6,7 @@ import Swiper from 'react-native-swiper';
import
HeadTitleCell
from
'../cell/HeadTitleCell'
;
import
YH_Image
from
'../../../common/components/YH_Image'
;
import
Immutable
,
{
Map
}
from
'immutable'
;
import
RecyclerSwiper
from
'../../../common/recycler-swiper/recyclerswiper'
;
const
{
View
,
...
...
@@ -17,6 +18,8 @@ const {
Platform
,
}
=
ReactNative
;
const
YH_Swiper
=
(
Platform
.
OS
===
'ios'
)
?
Swiper
:
RecyclerSwiper
;
export
default
class
TrendgoodsTopic
extends
React
.
Component
{
constructor
(
props
)
{
...
...
@@ -84,7 +87,7 @@ export default class TrendgoodsTopic extends React.Component {
return
(
<
View
style
=
{
styles
.
container
}
>
<
HeadTitleCell
yh_exposureData
=
{
yh_exposureData_more
}
title
=
{
title
.
title
}
moreUrl
=
{
title
.
more_url
}
onPressTitleMore
=
{
this
.
props
.
onPressTitleMore
}
/
>
<
Swiper
<
YH_
Swiper
showsButtons
=
{
false
}
loop
=
{
true
}
autoplay
=
{
true
}
...
...
@@ -127,7 +130,7 @@ export default class TrendgoodsTopic extends React.Component {
<
/TouchableOpacity
>
);
})}
<
/Swiper
>
<
/
YH_
Swiper
>
<
/View
>
);
}
...
...
js/home/components/floor/VipUserFloor.js
View file @
0d7d318
...
...
@@ -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/components/home/Home.js
View file @
0d7d318
...
...
@@ -583,6 +583,8 @@ export default class Home extends Component {
this
.
_autoHiddenRecommendView
();
}
}
//用于android首页曝光
this
.
props
.
onExposureScroll
();
}
_backTop
()
{
...
...
js/home/containers/HomeContainer.js
View file @
0d7d318
...
...
@@ -285,6 +285,12 @@ class HomeContainer extends Component {
NativeModules
.
YH_CommonHelper
.
logEvent
(
'YB_MAIN_BO'
,
{
'TOURL'
:
url
});
}
onExposureScroll
(){
if
(
Platform
.
OS
===
'android'
){
NativeModules
.
YH_CommonHelper
.
exposeView
();
}
}
render
()
{
let
{
app
,
home
}
=
this
.
props
;
return
(
...
...
@@ -310,6 +316,7 @@ class HomeContainer extends Component {
onPressChangeChannel
=
{
this
.
onPressChangeChannel
}
onPressFloorItem
=
{
this
.
onPressFloorItem
}
onPressProductItem
=
{
this
.
onPressProductItem
}
onExposureScroll
=
{
this
.
onExposureScroll
}
/
>
<
/View
>
);
...
...
js/home/utils/floorParser.js
View file @
0d7d318
...
...
@@ -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
;
...
...
@@ -878,7 +878,7 @@ function homeFloorAutoReportData(list,channel) {
}
let
moreItem
=
item
.
data
.
title
?
item
.
data
.
title
:
null
;
let
actionUrl
=
moreItem
.
more_url
?
moreItem
.
more_url
:
''
;
let
inFloorIndex
=
0
;
let
inFloorIndex
=
"0"
;
let
param
=
autoReportData
(
channlStr
,
floorName
,
floorID
,
floorIndex
,
inFloorIndex
,
actionUrl
);
moreItem
.
yh_exposureData
=
param
;
break
;
...
...
@@ -904,7 +904,7 @@ function homeFloorAutoReportData(list,channel) {
}
let
moreItem
=
item
.
data
.
title
?
item
.
data
.
title
:
null
;
let
actionUrl
=
moreItem
.
more_url
?
moreItem
.
more_url
:
''
;
let
inFloorIndex
=
0
;
let
inFloorIndex
=
"0"
;
let
param
=
autoReportData
(
channlStr
,
floorName
,
floorID
,
floorIndex
,
inFloorIndex
,
actionUrl
);
moreItem
.
yh_exposureData
=
param
;
break
;
...
...
@@ -945,7 +945,7 @@ function homeFloorAutoReportData(list,channel) {
if
(
is_show
)
{
let
moreItem
=
item
.
data
.
title
?
item
.
data
.
title
:
null
;
let
actionUrl
=
moreItem
.
more_url
?
moreItem
.
more_url
:
''
;
let
inFloorIndex
=
0
;
let
inFloorIndex
=
"0"
;
let
param
=
autoReportData
(
channlStr
,
floorName
,
floorID
,
floorIndex
,
inFloorIndex
,
actionUrl
);
moreItem
.
yh_exposureData
=
param
;
}
...
...
@@ -972,7 +972,7 @@ function homeFloorAutoReportData(list,channel) {
let
moreItem
=
item
.
data
.
title
?
item
.
data
.
title
:
null
;
let
actionUrl
=
moreItem
.
more_url
?
moreItem
.
more_url
:
''
;
let
inFloorIndex
=
0
;
let
inFloorIndex
=
"0"
;
let
param
=
autoReportData
(
channlStr
,
floorName
,
floorID
,
floorIndex
,
inFloorIndex
,
actionUrl
);
moreItem
.
yh_exposureData
=
param
;
break
;
...
...
@@ -989,7 +989,7 @@ function homeFloorAutoReportData(list,channel) {
let
moreItem
=
item
.
data
.
title
?
item
.
data
.
title
:
null
;
let
actionUrl
=
moreItem
.
more_url
?
moreItem
.
more_url
:
''
;
let
inFloorIndex
=
0
;
let
inFloorIndex
=
"0"
;
let
param
=
autoReportData
(
channlStr
,
floorName
,
floorID
,
floorIndex
,
inFloorIndex
,
actionUrl
);
moreItem
.
yh_exposureData
=
param
;
break
;
...
...
@@ -1008,7 +1008,7 @@ function homeFloorAutoReportData(list,channel) {
let
moreItem
=
item
.
data
.
title
?
item
.
data
.
title
:
null
;
let
actionUrl
=
moreItem
.
more_url
?
moreItem
.
more_url
:
''
;
let
inFloorIndex
=
0
;
let
inFloorIndex
=
"0"
;
let
param
=
autoReportData
(
channlStr
,
floorName
,
floorID
,
floorIndex
,
inFloorIndex
,
actionUrl
);
moreItem
.
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 @
0d7d318
...
...
@@ -73,7 +73,7 @@ class MineContainer extends Component {
this
.
subscription4
=
NativeAppEventEmitter
.
addListener
(
'MineCenterResumeEvent'
,
(
reminder
)
=>
{
(
reminder
)
=>
{
this
.
props
.
actions
.
onMineCenterRefresh
();
}
);
...
...
@@ -226,7 +226,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