Authored by 孙凯

add 限购码 : //价格为 售价待定 显示灰色 //价格正常显示 显示黑色 review by hongmo

@@ -40,6 +40,8 @@ export default class LimitCodeProductsCell extends React.Component { @@ -40,6 +40,8 @@ export default class LimitCodeProductsCell extends React.Component {
40 let defaultUrl = data.defaultUrl; 40 let defaultUrl = data.defaultUrl;
41 let newSrc = getSlicedUrl(defaultUrl, 100, 100); 41 let newSrc = getSlicedUrl(defaultUrl, 100, 100);
42 let price = data.price; 42 let price = data.price;
  43 + let priceNum = price.replace('¥', '');
  44 + let priceColor = parseFloat(priceNum) > 0 ? 'black' : '#b0b0b0';
43 let productName = data.productName; 45 let productName = data.productName;
44 let limitCode = data.limitCode; 46 let limitCode = data.limitCode;
45 let limitCodeTitle = '限购码: ' + limitCode; 47 let limitCodeTitle = '限购码: ' + limitCode;
@@ -65,7 +67,7 @@ export default class LimitCodeProductsCell extends React.Component { @@ -65,7 +67,7 @@ export default class LimitCodeProductsCell extends React.Component {
65 /> 67 />
66 <View style={styles.detailView}> 68 <View style={styles.detailView}>
67 <Text style={styles.nameText} numberOfLines={2}>{productName}</Text> 69 <Text style={styles.nameText} numberOfLines={2}>{productName}</Text>
68 - <Text style={styles.priceText}>{price}</Text> 70 + <Text style={{width: width - productIconWidth - 60,fontSize: 13,color: priceColor,marginTop: 15,marginLeft: 10,}}>{price}</Text>
69 </View> 71 </View>
70 </View> 72 </View>
71 </TouchableOpacity> 73 </TouchableOpacity>
@@ -124,17 +126,8 @@ let styles = StyleSheet.create({ @@ -124,17 +126,8 @@ let styles = StyleSheet.create({
124 width: width - productIconWidth - 30, 126 width: width - productIconWidth - 30,
125 height: backgroundHeigth - titleHeigth - 1, 127 height: backgroundHeigth - titleHeigth - 1,
126 }, 128 },
127 - priceText: {  
128 - width: width - productIconWidth - 60,  
129 - marginLeft: 3,  
130 - fontSize: 13,  
131 - color: 'black',  
132 - marginTop: 15,  
133 - marginLeft: 10,  
134 - },  
135 nameText: { 129 nameText: {
136 width: width - productIconWidth - 60, 130 width: width - productIconWidth - 60,
137 - marginLeft: 3,  
138 fontSize: 13, 131 fontSize: 13,
139 color: 'black', 132 color: 'black',
140 marginTop: 12, 133 marginTop: 12,