ui优化 # reviewed by hongyong
Showing
1 changed file
with
19 additions
and
22 deletions
@@ -73,26 +73,16 @@ export default class PBProductListView extends Component { | @@ -73,26 +73,16 @@ export default class PBProductListView extends Component { | ||
73 | <View style={styles.tagView}> | 73 | <View style={styles.tagView}> |
74 | + <Text style= {styles.tag}>{rowData.tag}</Text> | 74 | + <Text style= {styles.tag}>{rowData.tag}</Text> |
75 | </View>} | 75 | </View>} |
76 | - | ||
77 | - {/* {tipState == '已抢光' ? | ||
78 | - <View style={styles.soldOutContainer}> | ||
79 | - <Image source={require('../../images/yqg.png')}/> | ||
80 | - </View> | ||
81 | - : null } */} | ||
82 | - | ||
83 | </View> | 76 | </View> |
84 | 77 | ||
85 | 78 | ||
86 | <View style={styles.rowRight}> | 79 | <View style={styles.rowRight}> |
87 | <Text style={styles.productTitle} | 80 | <Text style={styles.productTitle} |
88 | numberOfLines={2}>{rowData.productName}</Text> | 81 | numberOfLines={2}>{rowData.productName}</Text> |
89 | - | ||
90 | - {/* <View style = {{flexDirection : 'row', position: 'absolute', top: 80}}> */} | ||
91 | {tipState == '马上抢' && <View style = {styles.progressBar}> | 82 | {tipState == '马上抢' && <View style = {styles.progressBar}> |
92 | - | ||
93 | <Progress.Bar | 83 | <Progress.Bar |
94 | progress={percent/100} | 84 | progress={percent/100} |
95 | - width={100} | 85 | + width={adjustPx(100)} |
96 | color={'#D0021B'} | 86 | color={'#D0021B'} |
97 | unfilledColor={'#ffffff'} | 87 | unfilledColor={'#ffffff'} |
98 | borderWidth={1} | 88 | borderWidth={1} |
@@ -104,7 +94,7 @@ export default class PBProductListView extends Component { | @@ -104,7 +94,7 @@ export default class PBProductListView extends Component { | ||
104 | {tipState == '已抢光' && <View style = {styles.progressBar}> | 94 | {tipState == '已抢光' && <View style = {styles.progressBar}> |
105 | <Progress.Bar | 95 | <Progress.Bar |
106 | progress={1} | 96 | progress={1} |
107 | - width={100} | 97 | + width={adjustPx(100)} |
108 | color={'#B0B0B0'} | 98 | color={'#B0B0B0'} |
109 | unfilledColor={'#B0B0B0'} | 99 | unfilledColor={'#B0B0B0'} |
110 | borderWidth={1} | 100 | borderWidth={1} |
@@ -113,11 +103,9 @@ export default class PBProductListView extends Component { | @@ -113,11 +103,9 @@ export default class PBProductListView extends Component { | ||
113 | <Text style = {styles.progressText}>已售罄</Text> | 103 | <Text style = {styles.progressText}>已售罄</Text> |
114 | </View> } | 104 | </View> } |
115 | 105 | ||
116 | - <View> | ||
117 | - <Text style={{fontSize: 12, color: '#B0B0B0', top: 8}}>限量{stock}件</Text> | ||
118 | - </View> | ||
119 | - | ||
120 | - | 106 | + {rowData.wait && <View style={styles.limit}> |
107 | + <Text style={styles.limitText}>限量{stock}件</Text> | ||
108 | + </View>} | ||
121 | <View style={{ | 109 | <View style={{ |
122 | flexDirection: 'row', | 110 | flexDirection: 'row', |
123 | flex: 1, | 111 | flex: 1, |
@@ -271,17 +259,18 @@ let styles = StyleSheet.create({ | @@ -271,17 +259,18 @@ let styles = StyleSheet.create({ | ||
271 | }, | 259 | }, |
272 | seckillPrice: { | 260 | seckillPrice: { |
273 | fontSize: 18, | 261 | fontSize: 18, |
274 | - lineHeight: 21, | 262 | + lineHeight: 30, |
275 | fontWeight: 'bold', | 263 | fontWeight: 'bold', |
276 | color: '#d0021b', | 264 | color: '#d0021b', |
265 | + justifyContent: 'center', | ||
277 | }, | 266 | }, |
278 | originPrice: { | 267 | originPrice: { |
279 | textDecorationLine: 'line-through', | 268 | textDecorationLine: 'line-through', |
280 | color: '#B0B0B0', | 269 | color: '#B0B0B0', |
281 | fontSize: 12, | 270 | fontSize: 12, |
282 | - lineHeight: 17, | 271 | + height: 17, |
283 | left: 5, | 272 | left: 5, |
284 | - top: 3 | 273 | + top: 10, |
285 | }, | 274 | }, |
286 | seckillBeginTimeTip: { | 275 | seckillBeginTimeTip: { |
287 | fontSize: 9, | 276 | fontSize: 9, |
@@ -311,12 +300,20 @@ let styles = StyleSheet.create({ | @@ -311,12 +300,20 @@ let styles = StyleSheet.create({ | ||
311 | }, | 300 | }, |
312 | progressBar: { | 301 | progressBar: { |
313 | flexDirection : 'row', | 302 | flexDirection : 'row', |
314 | - position: 'absolute', | 303 | + position: 'absolute', |
315 | top: adjustPx(80), | 304 | top: adjustPx(80), |
316 | }, | 305 | }, |
317 | tag: { | 306 | tag: { |
318 | fontSize: 10, | 307 | fontSize: 10, |
319 | color: 'white', | 308 | color: 'white', |
320 | - } | 309 | + }, |
310 | + limit: { | ||
311 | + position: 'absolute', | ||
312 | + top: adjustPx(80), | ||
313 | + }, | ||
314 | + limitText: { | ||
315 | + fontSize: 12, | ||
316 | + color: '#B0B0B0', | ||
317 | + }, | ||
321 | 318 | ||
322 | }); | 319 | }); |
-
Please register or login to post a comment