...
|
...
|
@@ -23,6 +23,25 @@ export default class RedPersonPicThree extends Component{ |
|
|
return null;
|
|
|
}
|
|
|
|
|
|
let yh_exposureData = this.props.yh_exposureData?this.props.yh_exposureData:null;
|
|
|
let yh_exposureData0 = null;
|
|
|
let yh_exposureData1 = null;
|
|
|
let yh_exposureData2 = null;
|
|
|
if (yh_exposureData) {
|
|
|
yh_exposureData0 = {
|
|
|
I_INDEX: 0,
|
|
|
...yh_exposureData,
|
|
|
};
|
|
|
yh_exposureData1 = {
|
|
|
I_INDEX: 1,
|
|
|
...yh_exposureData,
|
|
|
};
|
|
|
yh_exposureData2 = {
|
|
|
I_INDEX: 2,
|
|
|
...yh_exposureData,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
let list = resource.get('module_data').get('data').toJS();
|
|
|
let properties = resource.get('module_data').get('properties').toJS();
|
|
|
let isModuleMargin = properties.isModuleMargin;
|
...
|
...
|
@@ -73,7 +92,7 @@ export default class RedPersonPicThree extends Component{ |
|
|
case '1':
|
|
|
return (
|
|
|
<View style={{flexDirection: 'row',width:width,height: isModuleMargin=='1'?containerHeigth4+nullHeigth:containerHeigth4,backgroundColor: '#f0f0f0'}}>
|
|
|
<TouchableOpacity activeOpacity={1.0} style={styles.imagetype4} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType1,linkReource1,moduleOrder,moduleType,1)}} >
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData0} activeOpacity={1.0} style={styles.imagetype4} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType1,linkReource1,moduleOrder,moduleType,1)}} >
|
|
|
<YH_Image url={backgroundImage1} style={[styles.imagetype4,{resizeMode: 'contain'}]}/>
|
|
|
{linkType1=='1' && showProductInfo1 ?<View style={styles.maskContainer4}>
|
|
|
<Text style={styles.titleText4} numberOfLines={1}>{name1}</Text>
|
...
|
...
|
@@ -83,7 +102,7 @@ export default class RedPersonPicThree extends Component{ |
|
|
</View>
|
|
|
</View>:null}
|
|
|
</TouchableOpacity>
|
|
|
<TouchableOpacity activeOpacity={1.0} style={styles.imagetype4} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType2,linkReource2,moduleOrder,moduleType,2)}} >
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData1} activeOpacity={1.0} style={styles.imagetype4} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType2,linkReource2,moduleOrder,moduleType,2)}} >
|
|
|
<YH_Image url={backgroundImage2} style={[styles.imagetype4,,{resizeMode: 'contain'}]}/>
|
|
|
{linkType2=='1' && showProductInfo2?<View style={styles.maskContainer4}>
|
|
|
<Text style={styles.titleText4} numberOfLines={1}>{name2}</Text>
|
...
|
...
|
@@ -93,7 +112,7 @@ export default class RedPersonPicThree extends Component{ |
|
|
</View>
|
|
|
</View>:null}
|
|
|
</TouchableOpacity>
|
|
|
<TouchableOpacity activeOpacity={1.0} style={styles.imagetype4} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType3,linkReource3,moduleOrder,moduleType,3)}} >
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData2} activeOpacity={1.0} style={styles.imagetype4} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType3,linkReource3,moduleOrder,moduleType,3)}} >
|
|
|
<YH_Image url={backgroundImage3} style={[styles.imagetype4,{resizeMode: 'contain'}]}/>
|
|
|
{linkType3=='1' && showProductInfo3?<View style={styles.maskContainer4}>
|
|
|
<Text style={styles.titleText4} numberOfLines={1}>{name3}</Text>
|
...
|
...
|
@@ -109,21 +128,21 @@ export default class RedPersonPicThree extends Component{ |
|
|
case '2':
|
|
|
return (
|
|
|
<View style={{flexDirection: 'row',width:width,height: isModuleMargin=='1'?containerHeigth3+nullHeigth:containerHeigth3,backgroundColor: '#f0f0f0'}}>
|
|
|
<TouchableOpacity activeOpacity={1.0} style={styles.imagetype3} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType1,linkReource1,moduleOrder,moduleType,1)}} >
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData0} activeOpacity={1.0} style={styles.imagetype3} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType1,linkReource1,moduleOrder,moduleType,1)}} >
|
|
|
<YH_Image url={backgroundImage1} style={[styles.imagetype3,{resizeMode: 'contain'}]}/>
|
|
|
{linkType1=='1'?<View style={styles.maskContainer3}>
|
|
|
<Text style={{marginTop: 2,marginLeft: 10,fontSize: 11,backgroundColor: 'transparent',color: saleAble1?'red':'white',}}>{price1}</Text>
|
|
|
{saleAble1?<Text style={styles.deleteSale}>{sale1}</Text>:null}
|
|
|
</View>:null}
|
|
|
</TouchableOpacity>
|
|
|
<TouchableOpacity activeOpacity={1.0} style={styles.imagetype3} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType2,linkReource2,moduleOrder,moduleType,2)}} >
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData1} activeOpacity={1.0} style={styles.imagetype3} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType2,linkReource2,moduleOrder,moduleType,2)}} >
|
|
|
<YH_Image url={backgroundImage2} style={[styles.imagetype3,{resizeMode: 'contain'}]}/>
|
|
|
{linkType2=='1'?<View style={styles.maskContainer3}>
|
|
|
<Text style={{marginTop: 2,marginLeft: 10,fontSize: 11,backgroundColor: 'transparent',color: saleAble2?'red':'white',}}>{price2}</Text>
|
|
|
{saleAble2?<Text style={styles.deleteSale}>{sale2}</Text>:null}
|
|
|
</View>:null}
|
|
|
</TouchableOpacity>
|
|
|
<TouchableOpacity activeOpacity={1.0} style={styles.imagetype3} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType3,linkReource3,moduleOrder,moduleType,3)}} >
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData2} activeOpacity={1.0} style={styles.imagetype3} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType3,linkReource3,moduleOrder,moduleType,3)}} >
|
|
|
<YH_Image url={backgroundImage3} style={[styles.imagetype3,{resizeMode: 'contain'}]}/>
|
|
|
{linkType3=='1'?<View style={styles.maskContainer3}>
|
|
|
<Text style={{marginTop: 2,marginLeft: 10,fontSize: 11,backgroundColor: 'transparent',color: saleAble3?'red':'white',}}>{price3}</Text>
|
...
|
...
|
@@ -137,7 +156,7 @@ export default class RedPersonPicThree extends Component{ |
|
|
return (
|
|
|
<View style={{flexDirection: 'row',width:width,height: isModuleMargin=='1'?containerHeigth+nullHeigth:containerHeigth,backgroundColor: '#f0f0f0'}}>
|
|
|
<View style={styles.subContainer}>
|
|
|
<TouchableOpacity activeOpacity={1.0} style={styles.image} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType1,linkReource1,moduleOrder,moduleType,1)}} >
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData0} activeOpacity={1.0} style={styles.image} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType1,linkReource1,moduleOrder,moduleType,1)}} >
|
|
|
<YH_Image url={backgroundImage1} style={[styles.image,{resizeMode: 'contain'}]}/>
|
|
|
{linkType1=='1'?<View style={styles.maskContainer1}>
|
|
|
<Text style={styles.titleText} numberOfLines={2}>{name1}</Text>
|
...
|
...
|
@@ -147,7 +166,7 @@ export default class RedPersonPicThree extends Component{ |
|
|
</View>
|
|
|
</View>:null}
|
|
|
</TouchableOpacity>
|
|
|
<TouchableOpacity activeOpacity={1.0} style={styles.image} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType2,linkReource2,moduleOrder,moduleType,2)}} >
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData1} activeOpacity={1.0} style={styles.image} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType2,linkReource2,moduleOrder,moduleType,2)}} >
|
|
|
<YH_Image url={backgroundImage2} style={[styles.image,{resizeMode: 'contain'}]}/>
|
|
|
{linkType2=='1'?<View style={styles.maskContainer1}>
|
|
|
<Text style={styles.titleText} numberOfLines={2}>{name2}</Text>
|
...
|
...
|
@@ -158,7 +177,7 @@ export default class RedPersonPicThree extends Component{ |
|
|
</View>:null}
|
|
|
</TouchableOpacity>
|
|
|
</View>
|
|
|
<TouchableOpacity activeOpacity={1.0} style={styles.imageBig} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType3,linkReource3,moduleOrder,moduleType,3)}} >
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData2} activeOpacity={1.0} style={styles.imageBig} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType3,linkReource3,moduleOrder,moduleType,3)}} >
|
|
|
<YH_Image url={backgroundImage3} style={[styles.imageBig,{resizeMode: 'contain'}]}/>
|
|
|
{linkType3=='1'?<View style={styles.maskContainer2}>
|
|
|
<Text style={styles.titleText} numberOfLines={2}>{name3}</Text>
|
...
|
...
|
@@ -174,7 +193,7 @@ export default class RedPersonPicThree extends Component{ |
|
|
case '4':
|
|
|
return (
|
|
|
<View style={{flexDirection: 'row',width:width,height: isModuleMargin=='1'?containerHeigth+nullHeigth:containerHeigth,backgroundColor: '#f0f0f0'}}>
|
|
|
<TouchableOpacity activeOpacity={1.0} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType1,linkReource1,moduleOrder,moduleType,1)}} >
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData0} activeOpacity={1.0} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType1,linkReource1,moduleOrder,moduleType,1)}} >
|
|
|
<View style={styles.subContainer}>
|
|
|
<YH_Image url={backgroundImage1} style={[styles.imageBig,{resizeMode: 'contain'}]}/>
|
|
|
{linkType1=='1'?<View style={styles.maskContainer2}>
|
...
|
...
|
@@ -187,7 +206,7 @@ export default class RedPersonPicThree extends Component{ |
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
<View style={styles.subContainer}>
|
|
|
<TouchableOpacity activeOpacity={1.0} style={styles.image} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType2,linkReource2,moduleOrder,moduleType,2)}} >
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData1} activeOpacity={1.0} style={styles.image} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType2,linkReource2,moduleOrder,moduleType,2)}} >
|
|
|
<YH_Image url={backgroundImage2} style={[styles.image,{resizeMode: 'contain'}]}/>
|
|
|
{linkType2=='1'?<View style={styles.maskContainer1}>
|
|
|
<Text style={styles.titleText} numberOfLines={2}>{name2}</Text>
|
...
|
...
|
@@ -197,7 +216,7 @@ export default class RedPersonPicThree extends Component{ |
|
|
</View>
|
|
|
</View>:null}
|
|
|
</TouchableOpacity>
|
|
|
<TouchableOpacity activeOpacity={1.0} style={styles.image} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType3,linkReource3,moduleOrder,moduleType,3)}} >
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData2} activeOpacity={1.0} style={styles.image} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType3,linkReource3,moduleOrder,moduleType,3)}} >
|
|
|
<YH_Image url={backgroundImage3} style={[styles.image,{resizeMode: 'contain'}]}/>
|
|
|
{linkType3=='1'?<View style={styles.maskContainer1}>
|
|
|
<Text style={styles.titleText} numberOfLines={2}>{name3}</Text>
|
...
|
...
|
|