...
|
...
|
@@ -11,6 +11,8 @@ import ReactNative, { |
|
|
TouchableOpacity,
|
|
|
} from 'react-native';
|
|
|
import Immutable, {Map} from 'immutable';
|
|
|
import TimeForFocus from './TimeForFocus';
|
|
|
import TimeForLostFocus from './TimeForLostFocus';
|
|
|
|
|
|
let diff;
|
|
|
|
...
|
...
|
@@ -130,7 +132,6 @@ export default class SeckillTimeListView extends Component { |
|
|
console.log('rowID');
|
|
|
console.log(rowID);
|
|
|
rowData = rowData.toJS();
|
|
|
let colorStyle = rowData.focus ? {color: '#d30018'} : {color: '#3e3e3e'};
|
|
|
return (
|
|
|
<TouchableOpacity activeOpacity={1.0} onPress={() => {
|
|
|
if (rowData.focus) {
|
...
|
...
|
@@ -142,56 +143,24 @@ export default class SeckillTimeListView extends Component { |
|
|
this._scrollToFocusActivity();
|
|
|
this.props.onPressTimeItem && this.props.onPressTimeItem(rowData);
|
|
|
}}>
|
|
|
{rowData.focus ?
|
|
|
<View key={'row' + rowID} style={styles.rowContainerFocus}>
|
|
|
{rowData.now ?
|
|
|
<View key={'row' + rowID} style={styles.rowContainerFocus}>
|
|
|
<Text style={[colorStyle,{fontSize: 13}]}>{rowData.time} 抢购中</Text>
|
|
|
{!this.state.tickTimeOut ?
|
|
|
<View style={styles.tickTimeContainer}>
|
|
|
<Text style={colorStyle}>剩余:</Text>
|
|
|
<View style={styles.tickTime}>
|
|
|
<Text style={styles.tickTimeText}>{this.state.tickHour}</Text>
|
|
|
</View>
|
|
|
<View style={styles.tickTime}>
|
|
|
<Text style={styles.tickTimeText}>{this.state.tickMinute}</Text>
|
|
|
</View>
|
|
|
<View style={styles.tickTime}>
|
|
|
<Text style={styles.tickTimeText}>{this.state.tickSecond}</Text>
|
|
|
</View>
|
|
|
</View>
|
|
|
: null}
|
|
|
</View>
|
|
|
: null}
|
|
|
|
|
|
{rowData.over ? <Text style={[colorStyle,{fontSize: 13}]}>{rowData.time} 已开抢</Text> : null}
|
|
|
{rowData.wait ?
|
|
|
<View key={'row' + rowID} style={styles.rowContainerFocus}>
|
|
|
<Text style={[colorStyle,{fontSize: 13}]}>{rowData.time} 即将开抢</Text>
|
|
|
{!this.state.tickTimeOut ?
|
|
|
<View style={styles.tickTimeContainer}>
|
|
|
<Text style={[colorStyle,{fontSize: 10}]}>距开抢:</Text>
|
|
|
<View style={styles.tickTime}>
|
|
|
<Text style={styles.tickTimeText}>{this.state.tickHour}</Text>
|
|
|
</View>
|
|
|
<View style={styles.tickTime}>
|
|
|
<Text style={styles.tickTimeText}>{this.state.tickMinute}</Text>
|
|
|
</View>
|
|
|
<View style={styles.tickTime}>
|
|
|
<Text style={styles.tickTimeText}>{this.state.tickSecond}</Text>
|
|
|
</View>
|
|
|
</View>
|
|
|
: null}
|
|
|
</View>
|
|
|
: null}
|
|
|
</View>
|
|
|
:<View key={'row' + rowID} style={styles.rowContainer}>
|
|
|
<Text style={[colorStyle,{fontSize: 13}]}>{rowData.time}</Text>
|
|
|
{rowData.now ? <Text style={[colorStyle,{fontSize: 10}]}>抢购中</Text> : null}
|
|
|
{rowData.over ? <Text style={[colorStyle,{fontSize: 10}]}>已开抢</Text> : null}
|
|
|
{rowData.wait ? <Text style={[colorStyle,{fontSize: 10}]}>即将开抢</Text> : null}
|
|
|
|
|
|
</View>
|
|
|
{rowData.focus ? <TimeForFocus
|
|
|
key={'row' + rowID}
|
|
|
time={rowData.time}
|
|
|
now={rowData.now}
|
|
|
over={rowData.over}
|
|
|
wait={rowData.wait}
|
|
|
tickTimeOut={this.state.tickTimeOut}
|
|
|
tickHour={this.state.tickHour}
|
|
|
tickMinute={this.state.tickMinute}
|
|
|
tickSecond={this.state.tickSecond}
|
|
|
/> : <TimeForLostFocus
|
|
|
key={'row' + rowID}
|
|
|
time={rowData.time}
|
|
|
now={rowData.now}
|
|
|
over={rowData.over}
|
|
|
wait={rowData.wait}
|
|
|
/>
|
|
|
}
|
|
|
|
|
|
</TouchableOpacity>
|
...
|
...
|
@@ -260,39 +229,6 @@ let styles = StyleSheet.create({ |
|
|
flexDirection: 'row',
|
|
|
backgroundColor:'white',
|
|
|
},
|
|
|
rowContainer: {
|
|
|
flexDirection: 'column',
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
width: rowContainerWidth,
|
|
|
height: backgroundHeight,
|
|
|
backgroundColor:'white',
|
|
|
},
|
|
|
rowContainerFocus: {
|
|
|
flexDirection: 'column',
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
width: rowContainerFocusWidth,
|
|
|
height: backgroundHeight,
|
|
|
backgroundColor:'white',
|
|
|
},
|
|
|
tickTimeContainer: {
|
|
|
flexDirection: 'row',
|
|
|
},
|
|
|
tickTime: {
|
|
|
backgroundColor:'#d30018',
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
left:0,
|
|
|
marginLeft:5,
|
|
|
width:15,
|
|
|
height:15,
|
|
|
borderRadius:3,
|
|
|
},
|
|
|
tickTimeText: {
|
|
|
color: 'white',
|
|
|
fontSize: 9,
|
|
|
},
|
|
|
bottomToolBar: {
|
|
|
top: 200,
|
|
|
height: 44,
|
...
|
...
|
|