...
|
...
|
@@ -22,7 +22,7 @@ if (Platform.OS === 'ios') { |
|
|
nameIndent = ' ';
|
|
|
}
|
|
|
|
|
|
export default class GroupDetailProduct extends React.Component {
|
|
|
export default class GroupDetailProduct extends React.PureComponent {
|
|
|
|
|
|
constructor(props) {
|
|
|
super(props);
|
...
|
...
|
@@ -36,28 +36,33 @@ export default class GroupDetailProduct extends React.Component { |
|
|
let productName = resource.productName;
|
|
|
let productSalePrice = resource.productSalePrice;
|
|
|
let productSkn = resource.productSkn;
|
|
|
let otdTime = resource.expectArrivalTimeStr;
|
|
|
let priceViewTop = otdTime ? {} :{marginTop: 25 * DEVICE_WIDTH_RATIO}
|
|
|
otdTime = otdTime ? otdTime.replace(/_/, '-'): otdTime;
|
|
|
|
|
|
return (
|
|
|
<View style={styles.container}>
|
|
|
|
|
|
|
|
|
<View style={styles.subcontainer}>
|
|
|
|
|
|
<YH_Image style={styles.image} url={productIcon}></YH_Image>
|
|
|
<View style={styles.right}>
|
|
|
<View style={styles.titleView}>
|
|
|
{joinLimit == 1 && <Image style={styles.priceImg} source={require('../images/ptj_tab.png')}/>}
|
|
|
<View style={styles.subcontainer}>
|
|
|
<YH_Image style={styles.image} url={productIcon}></YH_Image>
|
|
|
<View style={styles.right}>
|
|
|
<View style={styles.titleView}>
|
|
|
{joinLimit == 1 && <Image style={styles.priceImg} source={require('../images/ptj_tab.png')} />}
|
|
|
<Text style={styles.title} numberOfLines={2}>{(joinLimit == 1 ? nameIndent : '') + productName}</Text>
|
|
|
</View>
|
|
|
<View style={styles.priceView}>
|
|
|
<Text style={styles.price1}>{productGroupPrice}</Text>
|
|
|
</View>
|
|
|
<View style={styles.subPriceView}>
|
|
|
<Text style={styles.subPrice1}>单人购买:</Text>
|
|
|
<Text style={[styles.price2, {textDecorationLine: 'line-through'}]}>{productSalePrice}</Text>
|
|
|
</View>
|
|
|
<View style={[styles.priceView, priceViewTop]}>
|
|
|
<Text style={styles.price1}>{productGroupPrice}</Text>
|
|
|
</View>
|
|
|
<View style={styles.subPriceView}>
|
|
|
<Text style={styles.subPrice1}>单人购买:</Text>
|
|
|
<Text style={[styles.price2, { textDecorationLine: 'line-through' }]}>{productSalePrice}</Text>
|
|
|
</View>
|
|
|
{otdTime ?
|
|
|
(<View style={styles.otdView}>
|
|
|
<Text style={styles.subPrice1}>到货日期:</Text>
|
|
|
<Text style={styles.otdTime}>{otdTime}</Text>
|
|
|
</View>): null}
|
|
|
</View>
|
|
|
</View>
|
|
|
</View>
|
|
|
|
|
|
</View>
|
|
|
);
|
...
|
...
|
@@ -107,24 +112,32 @@ let styles = StyleSheet.create({ |
|
|
textAlignVertical: 'top',
|
|
|
lineHeight: 20,
|
|
|
},
|
|
|
otdView: {
|
|
|
width: 174*DEVICE_WIDTH_RATIO,
|
|
|
height: 14*DEVICE_WIDTH_RATIO,
|
|
|
marginLeft: 10*DEVICE_WIDTH_RATIO,
|
|
|
marginTop: 3.2*DEVICE_WIDTH_RATIO,
|
|
|
flexDirection: 'row',
|
|
|
alignItems: 'center',
|
|
|
},
|
|
|
subPriceView: {
|
|
|
width: 174*DEVICE_WIDTH_RATIO,
|
|
|
height: 14*DEVICE_WIDTH_RATIO,
|
|
|
marginLeft: 10*DEVICE_WIDTH_RATIO,
|
|
|
marginTop: 5*DEVICE_WIDTH_RATIO,
|
|
|
marginTop: 3.2*DEVICE_WIDTH_RATIO,
|
|
|
flexDirection: 'row',
|
|
|
alignItems: 'center',
|
|
|
},
|
|
|
subPrice1: {
|
|
|
fontSize: 10*DEVICE_WIDTH_RATIO,
|
|
|
color: '#B0B0B0',
|
|
|
lineHeight: 10*DEVICE_WIDTH_RATIO,
|
|
|
lineHeight: 12*DEVICE_WIDTH_RATIO,
|
|
|
},
|
|
|
priceView: {
|
|
|
width: 174*DEVICE_WIDTH_RATIO,
|
|
|
height: 21*DEVICE_WIDTH_RATIO,
|
|
|
height: 24*DEVICE_WIDTH_RATIO,
|
|
|
marginLeft: 10*DEVICE_WIDTH_RATIO,
|
|
|
marginTop: 25*DEVICE_WIDTH_RATIO,
|
|
|
marginTop: 12.7*DEVICE_WIDTH_RATIO,
|
|
|
flexDirection: 'row',
|
|
|
alignItems: 'center',
|
|
|
},
|
...
|
...
|
@@ -150,7 +163,13 @@ let styles = StyleSheet.create({ |
|
|
color: '#D0021B',
|
|
|
fontWeight: 'bold',
|
|
|
},
|
|
|
|
|
|
otdTime: {
|
|
|
fontSize: 10*DEVICE_WIDTH_RATIO,
|
|
|
lineHeight: 12*DEVICE_WIDTH_RATIO,
|
|
|
fontWeight: '500',
|
|
|
color: '#444444',
|
|
|
alignItems: 'center',
|
|
|
},
|
|
|
price2: {
|
|
|
fontSize: 12*DEVICE_WIDTH_RATIO,
|
|
|
lineHeight: 12*DEVICE_WIDTH_RATIO,
|
...
|
...
|
|