Authored by 于良

Merge branch '5.5.0' of http://git.yoho.cn/mobile/YH_RNComponent into 5.5.0

... ... @@ -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}
... ...
... ... @@ -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);
}}>
... ...
... ... @@ -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>
... ...
... ... @@ -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>
... ...
... ... @@ -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}
... ...
... ... @@ -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}
... ...
... ... @@ -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>
... ...
... ... @@ -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);
}}
... ...
... ... @@ -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())}
... ...
... ... @@ -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);
}}
... ...
... ... @@ -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}
... ...