...
|
...
|
@@ -57,21 +57,24 @@ export default class ActivityProductFloor extends Component { |
|
|
let productSkn = rowData.get('product_skn');
|
|
|
let imgUrl = SlicedImage.getSlicedUrl(rowData.get('default_images'),cellWidth,120,2);
|
|
|
return (
|
|
|
<View style={styles.row}>
|
|
|
<YH_Image style={styles.image}
|
|
|
url={imgUrl}/>
|
|
|
<Text style={styles.vipText} numberOfLines={1}>{productPrice}</Text>
|
|
|
{
|
|
|
this._isShowOrignPrice(type) ?
|
|
|
<View style={styles.vipContainer}>
|
|
|
<Text style={styles.discountText} numberOfLines={1}>{orginPrice}</Text>
|
|
|
{
|
|
|
this._isShowVip(type) ? <Image style={{width:33,height:12,marginLeft:2}}
|
|
|
source={require('../../images/ic_vip_red.png')}/> : null
|
|
|
}
|
|
|
</View> : null
|
|
|
}
|
|
|
</View>);
|
|
|
<TouchableOpacity activeOpacity={1}
|
|
|
onPress={()=>this.props.onPressVipProduct && this.props.onPressVipProduct(productId,productSkn)}>
|
|
|
<View style={styles.row}>
|
|
|
<YH_Image style={styles.image}
|
|
|
url={imgUrl}/>
|
|
|
<Text style={styles.vipText} numberOfLines={1}>{productPrice}</Text>
|
|
|
{
|
|
|
this._isShowOrignPrice(type) ?
|
|
|
<View style={styles.vipContainer}>
|
|
|
<Text style={styles.discountText} numberOfLines={1}>{orginPrice}</Text>
|
|
|
{
|
|
|
this._isShowVip(type) ? <Image style={{width:33,height:12,marginLeft:2}}
|
|
|
source={require('../../images/ic_vip_red.png')}/> : null
|
|
|
}
|
|
|
</View> : null
|
|
|
}
|
|
|
</View>
|
|
|
</TouchableOpacity>);
|
|
|
}
|
|
|
|
|
|
render() {
|
...
|
...
|
@@ -83,21 +86,23 @@ export default class ActivityProductFloor extends Component { |
|
|
let bannerData = data.get('banner_image');
|
|
|
let productData = data.get('list');
|
|
|
let type = data.get('type');
|
|
|
|
|
|
let cellH = this._isShowOrignPrice(type) ? cellHeight : cellHeight - 20;
|
|
|
let floorH = cellH + 40 + bannerHeight;
|
|
|
return (
|
|
|
<View style={styles.container}>
|
|
|
<View style={{backgroundColor: 'white',width:width,height:floorH}}>
|
|
|
<HeadTitleCell title={title} moreUrl={moreUrl}/>
|
|
|
<Banner
|
|
|
data={bannerData}
|
|
|
duration={8}
|
|
|
width={width}
|
|
|
height={bannerHeight}
|
|
|
onPress={this.onPressBanner}
|
|
|
onPress={this.props.onPressVipBannerItem}
|
|
|
/>
|
|
|
|
|
|
<View style={styles.listContianer,{height:cellH}}>
|
|
|
<View style={{width:width,alignItems:'center',height:cellH}}>
|
|
|
{visible ?
|
|
|
<YH_Image style={styles.listBg,{height:cellH}}
|
|
|
<YH_Image style={{width: width,height:cellH}}
|
|
|
url={SlicedImage.getSlicedUrl(bgUrl,width,cellH)}/> : null}
|
|
|
<ListView
|
|
|
style={{position:'absolute',left:0,top:5,paddingTop:12,paddingBottom:12}}
|
...
|
...
|
@@ -116,7 +121,7 @@ export default class ActivityProductFloor extends Component { |
|
|
let {width, height} = Dimensions.get('window');
|
|
|
let bannerHeight = Math.ceil((234 / 750) * width);
|
|
|
let sectionHeight = Math.ceil((419 / 750) * width);
|
|
|
let cellWidth = 95;
|
|
|
let cellWidth = 90;
|
|
|
let cellHeight = 210;
|
|
|
|
|
|
//1 VIP 专享 2 新人专享 3 学生专享 4 新品到着
|
...
|
...
|
@@ -125,17 +130,7 @@ const TYPE_NEW_USER = 2; |
|
|
const TYPE_STUDENT = 3;
|
|
|
const TYPE_NEW_PRODUCT = 4;
|
|
|
const styles = StyleSheet.create({
|
|
|
container: {
|
|
|
backgroundColor: 'white',
|
|
|
},
|
|
|
listContianer: {
|
|
|
width:width,
|
|
|
alignItems: 'center',
|
|
|
},
|
|
|
listBg: {
|
|
|
width: width,
|
|
|
height: cellHeight,
|
|
|
},
|
|
|
|
|
|
listContent: {
|
|
|
backgroundColor: 'transparent',
|
|
|
flexDirection: 'row',
|
...
|
...
|
@@ -144,13 +139,10 @@ const styles = StyleSheet.create({ |
|
|
paddingHorizontal: 5,
|
|
|
},
|
|
|
row: {
|
|
|
flexDirection: 'column',
|
|
|
width: cellWidth,
|
|
|
backgroundColor: '#f0f0f0',
|
|
|
backgroundColor: 'white',
|
|
|
borderRadius: 3,
|
|
|
justifyContent: 'center',
|
|
|
marginLeft: 6,
|
|
|
marginRight: 6
|
|
|
marginLeft: 11,
|
|
|
},
|
|
|
vipContainer: {
|
|
|
width: cellWidth,
|
...
|
...
|
@@ -170,7 +162,6 @@ const styles = StyleSheet.create({ |
|
|
},
|
|
|
vipText: {
|
|
|
color: '#d0021b',
|
|
|
flex: 1,
|
|
|
marginTop: 7,
|
|
|
marginBottom: 7,
|
|
|
textAlign: 'center',
|
...
|
...
|
|