...
|
...
|
@@ -3,7 +3,7 @@ import {View, StyleSheet, Text, Dimensions,TouchableOpacity} from 'react-native' |
|
|
import Immutable, {Map} from 'immutable';
|
|
|
import YH_Image from '../../../common/components/YH_Image';
|
|
|
|
|
|
export default class TripleImageBigRightSide extends Component{
|
|
|
export default class TripleImageOneBigSide extends Component{
|
|
|
constructor(props) {
|
|
|
super(props);
|
|
|
}
|
...
|
...
|
@@ -137,42 +137,95 @@ export default class TripleImageBigRightSide extends Component{ |
|
|
...yh_exposureData,
|
|
|
};
|
|
|
}
|
|
|
return (
|
|
|
<View style={{flexDirection: 'row',width:width,height: isModuleMargin=='1'?containerHeigth+nullHeigth:containerHeigth,backgroundColor: '#f0f0f0'}}>
|
|
|
<View style={styles.subContainer}>
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData0} activeOpacity={1.0} style={styles.image} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(url1,moduleOrder,moduleType,1)}} >
|
|
|
<YH_Image url={backgroundImage1} style={[styles.image,{resizeMode: 'contain'}]}/>
|
|
|
{linkType1=='1' && showProductInfo?<View style={styles.maskContainer1}>
|
|
|
<Text style={styles.titleText} numberOfLines={2}>{name1}</Text>
|
|
|
<View style={{backgroundColor: 'transparent',flexDirection: 'row',marginRight: 10}}>
|
|
|
<Text style={{fontSize: 12,backgroundColor: 'transparent',color: saleAble1?'red':'white'}}>{price1}</Text>
|
|
|
{saleAble1?<Text style={styles.deleteSale3}>{sale1}</Text>:null}
|
|
|
</View>
|
|
|
</View>:null}
|
|
|
</TouchableOpacity>
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData1} activeOpacity={1.0} style={styles.image} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(url2,moduleOrder,moduleType,2)}} >
|
|
|
<YH_Image url={backgroundImage2} style={[styles.image,{resizeMode: 'contain'}]}/>
|
|
|
{linkType2=='1' && showProductInfo?<View style={styles.maskContainer1}>
|
|
|
<Text style={styles.titleText} numberOfLines={2}>{name2}</Text>
|
|
|
<View style={{backgroundColor: 'transparent',flexDirection: 'row',marginRight: 10}}>
|
|
|
<Text style={{fontSize: 12,backgroundColor: 'transparent',color: saleAble2?'red':'white'}}>{price2}</Text>
|
|
|
{saleAble2?<Text style={styles.deleteSale3}>{sale2}</Text>:null}
|
|
|
</View>
|
|
|
</View>:null}
|
|
|
</TouchableOpacity>
|
|
|
</View>
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData2} activeOpacity={1.0} style={styles.imageBig} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(url3,moduleOrder,moduleType,3)}} >
|
|
|
<YH_Image url={backgroundImage3} style={[styles.imageBig,{resizeMode: 'contain'}]}/>
|
|
|
{linkType3=='1' && showProductInfo?<View style={styles.maskContainer2}>
|
|
|
<Text style={styles.titleText} numberOfLines={2}>{name3}</Text>
|
|
|
<View style={{backgroundColor: 'transparent',flexDirection: 'row'}}>
|
|
|
<Text style={{fontSize: 12,backgroundColor: 'transparent',color: saleAble3?'red':'white'}}>{price3}</Text>
|
|
|
{saleAble3?<Text style={styles.deleteSale3}>{sale3}</Text>:null}
|
|
|
let actuallyHeight = isModuleMargin=='1'?containerHeigth+nullHeigth:containerHeigth;
|
|
|
switch (displayType) {
|
|
|
case '3':
|
|
|
return (
|
|
|
<View style={[styles.container,{height:actuallyHeight}]}>
|
|
|
<View style={styles.subContainer}>
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData0} activeOpacity={1.0} style={styles.image}
|
|
|
onPress={() => {this.props.onPressProduct && this.props.onPressProduct(url1,moduleOrder,moduleType,1)}} >
|
|
|
<YH_Image url={backgroundImage1} style={[styles.image,{resizeMode: 'contain'}]}/>
|
|
|
{linkType1=='1' && showProductInfo?<View style={styles.maskContainer1}>
|
|
|
<Text style={styles.titleText} numberOfLines={2}>{name1}</Text>
|
|
|
<View style={[styles.priceContainer,{marginRight: 10}]}>
|
|
|
<Text style={[styles.price,{color: saleAble1?'red':'white'}]}>{price1}</Text>
|
|
|
{saleAble1?<Text style={styles.deleteSale3}>{sale1}</Text>:null}
|
|
|
</View>
|
|
|
</View>:null}
|
|
|
</TouchableOpacity>
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData1} activeOpacity={1.0} style={styles.image}
|
|
|
onPress={() => {this.props.onPressProduct && this.props.onPressProduct(url2,moduleOrder,moduleType,2)}} >
|
|
|
<YH_Image url={backgroundImage2} style={[styles.image,{resizeMode: 'contain'}]}/>
|
|
|
{linkType2=='1' && showProductInfo?<View style={styles.maskContainer1}>
|
|
|
<Text style={styles.titleText} numberOfLines={2}>{name2}</Text>
|
|
|
<View style={[styles.priceContainer,{marginRight: 10}]}>
|
|
|
<Text style={[styles.price,{color: saleAble2?'red':'white'}]}>{price2}</Text>
|
|
|
{saleAble2?<Text style={styles.deleteSale3}>{sale2}</Text>:null}
|
|
|
</View>
|
|
|
</View>:null}
|
|
|
</TouchableOpacity>
|
|
|
</View>
|
|
|
</View>:null}
|
|
|
</TouchableOpacity>
|
|
|
</View>
|
|
|
)
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData2} activeOpacity={1.0} style={styles.imageBig}
|
|
|
onPress={() => {this.props.onPressProduct && this.props.onPressProduct(url3,moduleOrder,moduleType,3)}} >
|
|
|
<YH_Image url={backgroundImage3} style={[styles.imageBig,{resizeMode: 'contain'}]}/>
|
|
|
{linkType3=='1' && showProductInfo?<View style={styles.maskContainer2}>
|
|
|
<Text style={styles.titleText} numberOfLines={2}>{name3}</Text>
|
|
|
<View style={styles.priceContainer}>
|
|
|
<Text style={[styles.price,{color: saleAble3?'red':'white'}]}>{price3}</Text>
|
|
|
{saleAble3?<Text style={styles.deleteSale3}>{sale3}</Text>:null}
|
|
|
</View>
|
|
|
</View>:null}
|
|
|
</TouchableOpacity>
|
|
|
</View>
|
|
|
)
|
|
|
break;
|
|
|
case '4':
|
|
|
return (
|
|
|
<View style={[styles.container, {height:actuallyHeight}]}>
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData0} activeOpacity={1.0}
|
|
|
onPress={() => {this.props.onPressProduct && this.props.onPressProduct(url1,moduleOrder,moduleType,1)}} >
|
|
|
<View style={styles.subContainer}>
|
|
|
<YH_Image url={backgroundImage1} style={[styles.imageBig,{resizeMode: 'contain'}]}/>
|
|
|
{linkType1=='1' && showProductInfo?<View style={styles.maskContainer2}>
|
|
|
<Text style={styles.titleText} numberOfLines={2}>{name1}</Text>
|
|
|
<View style={styles.priceContainer}>
|
|
|
<Text style={[styles.price, {color: saleAble1?'red':'white'}]}>{price1}</Text>
|
|
|
{saleAble1?<Text style={styles.deleteSale}>{sale1}</Text>:null}
|
|
|
</View>
|
|
|
</View>:null}
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
<View style={styles.subContainer}>
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData1} activeOpacity={1.0} style={styles.image}
|
|
|
onPress={() => {this.props.onPressProduct && this.props.onPressProduct(url2,moduleOrder,moduleType,2)}} >
|
|
|
<YH_Image url={backgroundImage2} style={[styles.image,{resizeMode: 'contain'}]}/>
|
|
|
{linkType2=='1' && showProductInfo?<View style={styles.maskContainer1}>
|
|
|
<Text style={styles.titleText} numberOfLines={2}>{name2}</Text>
|
|
|
<View style={[styles.priceContainer,{marginRight: 10}]}>
|
|
|
<Text style={[styles.price,{color: saleAble2?'red':'white'}]}>{price2}</Text>
|
|
|
{saleAble2?<Text style={styles.deleteSale}>{sale2}</Text>:null}
|
|
|
</View>
|
|
|
</View>:null}
|
|
|
</TouchableOpacity>
|
|
|
<TouchableOpacity yh_exposureData={yh_exposureData2} activeOpacity={1.0} style={styles.image}
|
|
|
onPress={() => {this.props.onPressProduct && this.props.onPressProduct(url3,moduleOrder,moduleType,3)}} >
|
|
|
<YH_Image url={backgroundImage3} style={[styles.image,{resizeMode: 'contain'}]}/>
|
|
|
{linkType3=='1' && showProductInfo?<View style={styles.maskContainer1}>
|
|
|
<Text style={styles.titleText} numberOfLines={2}>{name3}</Text>
|
|
|
<View style={[styles.priceContainer, {marginRight: 10}]}>
|
|
|
<Text style={[styles.price, {color: saleAble3?'red':'white'}]}>{price3}</Text>
|
|
|
{saleAble3?<Text style={styles.deleteSale}>{sale3}</Text>:null}
|
|
|
</View>
|
|
|
</View>:null}
|
|
|
</TouchableOpacity>
|
|
|
</View>
|
|
|
</View>
|
|
|
)
|
|
|
break;
|
|
|
default:
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -184,6 +237,11 @@ let maskHeight = 30; |
|
|
let nullHeigth = 10;
|
|
|
|
|
|
let styles = StyleSheet.create({
|
|
|
container:{
|
|
|
flexDirection: 'row',
|
|
|
width:width,
|
|
|
backgroundColor: '#f0f0f0'
|
|
|
},
|
|
|
subContainer:{
|
|
|
width:width / 2,
|
|
|
flexDirection: 'column',
|
...
|
...
|
@@ -208,33 +266,6 @@ let styles = StyleSheet.create({ |
|
|
alignItems: 'center',
|
|
|
justifyContent: 'space-around',
|
|
|
},
|
|
|
maskContainer3:{
|
|
|
position: 'absolute',
|
|
|
width: width/3,
|
|
|
height: 24,
|
|
|
backgroundColor: 'rgba(0,0,0,0.3)',
|
|
|
top: containerHeigth3-24,
|
|
|
flexDirection: 'row',
|
|
|
alignItems: 'center',
|
|
|
flexDirection: 'row',
|
|
|
},
|
|
|
maskContainer4: {
|
|
|
position: 'absolute',
|
|
|
width: width/3,
|
|
|
height: 40,
|
|
|
backgroundColor: 'rgba(0,0,0,0.3)',
|
|
|
top: containerHeigth4-40,
|
|
|
},
|
|
|
imagetype3: {
|
|
|
width:width/3 ,
|
|
|
height:containerHeigth3,
|
|
|
backgroundColor: '#f5f7f6',
|
|
|
},
|
|
|
imagetype4:{
|
|
|
width:width/3,
|
|
|
height:containerHeigth4,
|
|
|
backgroundColor: '#f5f7f6',
|
|
|
},
|
|
|
image:{
|
|
|
width:width/2,
|
|
|
height: containerHeigth / 2,
|
...
|
...
|
@@ -254,49 +285,15 @@ let styles = StyleSheet.create({ |
|
|
fontWeight: 'bold',
|
|
|
marginLeft: 10,
|
|
|
},
|
|
|
price: {
|
|
|
color:'white',
|
|
|
width : 80,
|
|
|
fontSize: 11,
|
|
|
textAlign :'right',
|
|
|
},
|
|
|
price3: {
|
|
|
width:width/3 ,
|
|
|
height:maskHeight / 2,
|
|
|
color: 'white',
|
|
|
marginLeft: 10,
|
|
|
fontSize: 11,
|
|
|
textAlign :'left',
|
|
|
},
|
|
|
titleText4: {
|
|
|
width:width/3 -10,
|
|
|
height:maskHeight / 2,
|
|
|
color: 'white',
|
|
|
marginLeft: 10,
|
|
|
fontSize: 11,
|
|
|
textAlign :'left',
|
|
|
marginTop: 4,
|
|
|
fontWeight: 'bold',
|
|
|
},
|
|
|
price4: {
|
|
|
width:width/3 ,
|
|
|
height:maskHeight / 2,
|
|
|
color: 'white',
|
|
|
marginLeft: 10,
|
|
|
fontSize: 11,
|
|
|
textAlign : 'left',
|
|
|
marginTop: 2,
|
|
|
priceContainer: {
|
|
|
backgroundColor: 'transparent',
|
|
|
flexDirection: 'row'
|
|
|
},
|
|
|
deleteSale: {
|
|
|
marginLeft: 2,
|
|
|
marginTop: 4,
|
|
|
fontSize: 11,
|
|
|
price: {
|
|
|
fontSize: 12,
|
|
|
backgroundColor: 'transparent',
|
|
|
color: 'white',
|
|
|
textDecorationLine: 'line-through',
|
|
|
},
|
|
|
|
|
|
deleteSale3: {
|
|
|
deleteSale: {
|
|
|
marginLeft: 2,
|
|
|
marginTop: 4,
|
|
|
fontSize: 11,
|
...
|
...
|
@@ -304,7 +301,6 @@ let styles = StyleSheet.create({ |
|
|
color: 'white',
|
|
|
textDecorationLine: 'line-through',
|
|
|
},
|
|
|
|
|
|
saleView:{
|
|
|
flexDirection: 'row',
|
|
|
},
|
...
|
...
|
|