Authored by 孙凯

add gang detail 商品样式 review by hongmo

... ... @@ -46,14 +46,37 @@ export default class GoodsCell extends React.Component {
renderRow(rowData, sectionID, rowID, highlightRow) {
let paddingLeft = rowID % 2 == 1 ? rowMarginHorizontal / 2 : rowMarginHorizontal;
let customStyle = rowID == 0 || rowID == 1 ? {paddingLeft} : {paddingLeft};
let product = rowData?rowData.toJS():'';
let prd_id = product.product_id;
let isGlobal = product.is_global=='Y'?true:false;
let is_limitbuy = product.is_limitbuy=='Y'?true:false;
return (
<BrandProductListCell
style={[styles.listContainer, customStyle]}
key={'row' + rowID}
rowID={rowID}
data={rowData}
onPressProduct={this.props.onPressProduct}
/>
<View style={[styles.listContainer, customStyle]}>
<BrandProductListCell
style={styles.listContainer}
key={'row' + rowID}
rowID={rowID}
data={rowData}
onPressProduct={this.props.onPressProduct}
/>
{is_limitbuy ?
<TouchableOpacity style={styles.type2LookDetail} activeOpacity={0.5} onPress={() => {
let pos_id = 103;
this.props.onPressProduct && this.props.onPressProduct(rowData,rowID,pos_id);
}}>
<Text style={styles.lookDetailText}>查看详情</Text>
<Image source={require('../../../studentCertification/images/right_arrow.png')} style={styles.arrow_icon} resizeMode={'contain'}></Image>
</TouchableOpacity>
:
<TouchableOpacity style={styles.type2ShopCar} activeOpacity={0.5} onPress={() => {
let pos_id = 106;
this.props.onPressShopCar && this.props.onPressShopCar(product.product_skn,prd_id,pos_id,isGlobal);
}}>
<Image source={require('../../image/jgwc_bt.png')} style={styles.button} resizeMode={'contain'}></Image>
</TouchableOpacity>
}
</View>
);
}
... ... @@ -117,7 +140,15 @@ export default class GoodsCell extends React.Component {
<Text style={styles.nowPrice} numberOfLines={1}>{originPriceStr}</Text>
</View>
{
is_limitbuy ? null : <TouchableOpacity
is_limitbuy ?
<TouchableOpacity style={styles.type1LookDetail} activeOpacity={0.5} onPress={() => {
let pos_id = 103;
this.props.onPressProduct && this.props.onPressProduct(value,i,pos_id);
}}>
<Text style={styles.lookDetailText}>查看详情</Text>
<Image source={require('../../../studentCertification/images/right_arrow.png')} style={styles.arrow_icon} resizeMode={'contain'}></Image>
</TouchableOpacity>
: <TouchableOpacity
style={styles.touchableOpacityButton}
activeOpacity={0.5}
onPress={() => {
... ... @@ -279,5 +310,38 @@ let styles = StyleSheet.create({
arrow_icon: {
width: 15,
height: 7,
},
type2ShopCar: {
position: 'absolute',
bottom: 8,
right: 15,
width: 40,
height: 23,
},
type1LookDetail: {
position: 'absolute',
bottom: 10,
right: 15,
width: 65,
height: 12,
flexDirection: 'row',
alignItems:"center",
},
type2LookDetail: {
position: 'absolute',
bottom: 8,
right: 15,
width: 65,
height: 12,
flexDirection: 'row',
alignItems:"center",
},
lookDetailText: {
width: 50,
height: 12,
fontSize: 12,
color: '#444444',
textAlign: 'right',
fontWeight:'bold',
}
});
... ...