Authored by 张丽霞

样式,review by redding

... ... @@ -28,6 +28,7 @@ export default class TimeForFocus extends Component {
tickHour,
tickMinute,
tickSecond,
lastNowTime,
} = this.props;
let colorStyle = {color: '#3e3e3e'};
... ... @@ -39,16 +40,17 @@ export default class TimeForFocus extends Component {
} else if (wait) {
TimeComponent = TimeForWait;
}
return (
<View style={styles.rowContainerFocus}>
{TimeComponent ?
<TimeComponent
<TimeComponent
time={time}
tickTimeOut={tickTimeOut}
tickHour={tickHour}
tickMinute={tickMinute}
tickSecond={tickSecond}
lastNowTime={lastNowTime}
/>
: null}
</View>
... ...
... ... @@ -35,7 +35,7 @@ export default class TimeForLostFocus extends Component {
return (
<View style={styles.rowContainer}>
<Text style={[colorStyle, {fontSize: 13, marginTop:15}]}>{time}</Text>
<Text style={[colorStyle, {fontSize: 13, marginTop:15, fontWeight:'bold'}]}>{time}</Text>
<Text style={[colorStyle, {fontSize: 10, marginTop:1}]}>{text}</Text>
</View>
);
... ...
... ... @@ -23,22 +23,30 @@ export default class TimeForNow extends Component {
tickHour,
tickMinute,
tickSecond,
lastNowTime,
} = this.props;
let colorStyle = {color: '#d30018'};
return (
<View style={styles.rowContainerFocus}>
<Text style={[colorStyle,{fontSize: 13, marginTop:16}]}>{time} 抢购中</Text>
{tickTimeOut ? null :
<View style={styles.tickTimeContainer}>
<Text style={[colorStyle,{fontSize: 10}]}>剩余:</Text>
<TimeNumber text={tickHour} />
<TimeNumber text={tickMinute} />
<TimeNumber text={tickSecond} />
</View>}
</View>
);
if (lastNowTime) {
return(
<View style={[styles.rowContainerFocus,{justifyContent: 'center'}]}>
<Text style={[colorStyle,{fontSize: 13}]}>{time} 抢购中</Text>
</View>
);
}else {
return (
<View style={styles.rowContainerFocus}>
<Text style={[colorStyle,{fontSize: 13, marginTop:16, fontWeight:'bold'}]}>{time} 抢购中</Text>
{tickTimeOut ? null :
<View style={styles.tickTimeContainer}>
<Text style={[colorStyle,{fontSize: 10}]}>剩余:</Text>
<TimeNumber text={tickHour} />
<TimeNumber text={tickMinute} />
<TimeNumber text={tickSecond} />
</View>}
</View>
);
}
}
}
... ... @@ -50,7 +58,6 @@ let styles = StyleSheet.create({
rowContainerFocus: {
flexDirection: 'column',
alignItems: 'center',
width: rowContainerFocusWidth,
height: backgroundHeight,
backgroundColor:'white',
... ...
... ... @@ -29,7 +29,7 @@ export default class TimeForWait extends Component {
return (
<View style={styles.rowContainerFocus}>
<Text style={[colorStyle,{fontSize: 13, marginTop:16}]}>{time} 即将开抢</Text>
<Text style={[colorStyle,{fontSize: 13, marginTop:16, fontWeight:'bold'}]}>{time} 即将开抢</Text>
{tickTimeOut ? null :
<View style={styles.tickTimeContainer}>
<Text style={[colorStyle, {fontSize: 10}]}>距开抢:</Text>
... ...
... ... @@ -165,6 +165,7 @@ export default class SeckillTimeListView extends Component {
tickHour={this.state.tickHour}
tickMinute={this.state.tickMinute}
tickSecond={this.state.tickSecond}
lastNowTime={(rowID == this.secKillProductVoList.length -1) ? true : false}
/> : <TimeForLostFocus
key={'row' + rowID}
time={rowData.time}
... ...