...
|
...
|
@@ -64,11 +64,10 @@ export default class GroupDetailHeader extends React.Component { |
|
|
this.timer && TimerMixin.clearTimeout(this.timer);
|
|
|
}
|
|
|
|
|
|
_renderTip(tipTitle,tipDetail) {
|
|
|
_renderTip(tipTitle) {
|
|
|
return(
|
|
|
<View style={styles.container}>
|
|
|
<Text style={styles.tipTitle}>{tipTitle}</Text>
|
|
|
<Text style={styles.tipDetail}>{tipDetail}</Text>
|
|
|
</View>
|
|
|
);
|
|
|
}
|
...
|
...
|
@@ -80,7 +79,7 @@ export default class GroupDetailHeader extends React.Component { |
|
|
<View style={styles.productdetailTimeCountView}>
|
|
|
<Text style={styles.productdetailTimeCount}>还差</Text>
|
|
|
<Text style={styles.productdetailTimeRedCount}>{lackNum}</Text>
|
|
|
<Text style={styles.productdetailTimeCount}>人加入,剩余时间</Text>
|
|
|
<Text style={styles.productdetailTimeCount}>人拼团成功,剩余时间</Text>
|
|
|
</View>
|
|
|
<View style={styles.productdetailTimeCountView1}>
|
|
|
<Text style={styles.timeItem}>{formatTime.h1 ? formatTime.h1 : 0}</Text>
|
...
|
...
|
@@ -96,7 +95,7 @@ export default class GroupDetailHeader extends React.Component { |
|
|
);
|
|
|
}
|
|
|
render() {
|
|
|
let { groupDetail } = this.props;
|
|
|
let { groupDetail, activityId} = this.props;
|
|
|
let resource = groupDetail ? groupDetail.toJS():null;
|
|
|
if(!resource){
|
|
|
return null;
|
...
|
...
|
@@ -113,9 +112,10 @@ export default class GroupDetailHeader extends React.Component { |
|
|
let productDetail = membershipItems ? membershipItems[0]: '';
|
|
|
let joinLimit = resource.joinLimit;
|
|
|
let perpleNum = membershipItems.length + lackNum;
|
|
|
let productSkn = productDetail ? productDetail.productSkn : '';
|
|
|
|
|
|
let buttonText = '';
|
|
|
let tipTitle = '';
|
|
|
let tipDetail = '';
|
|
|
let tipTitlecolor = '#D0021B';
|
|
|
if(diffTime == 0 ){
|
|
|
diffTime = parseInt(leftTime);
|
...
|
...
|
@@ -135,26 +135,21 @@ export default class GroupDetailHeader extends React.Component { |
|
|
buttonText = '邀请小伙伴拼团' + subtext;
|
|
|
}else if (pageGo == 4) {
|
|
|
tipTitle = '拼团成功';
|
|
|
tipDetail = '我们会尽快安排发货';
|
|
|
buttonText = '查看更多拼团活动';
|
|
|
tipTitlecolor = '#000000';
|
|
|
}else if (pageGo == 5) {
|
|
|
tipTitle = '你来晚了';
|
|
|
tipDetail = '你的好友已经拼团成功';
|
|
|
buttonText = '查看更多拼团活动';
|
|
|
tipTitlecolor = '#000000';
|
|
|
}else if (pageGo == 6) {
|
|
|
tipTitle = '拼团失败';
|
|
|
tipDetail = '购买人数不足,我们会尽快安排退款';
|
|
|
buttonText = '查看更多拼团活动';
|
|
|
}else if (pageGo == 7) {
|
|
|
tipTitle = '拼团失败';
|
|
|
tipDetail = '购买人数不足,我们会尽快安排退款';
|
|
|
buttonText = '查看更多拼团活动';
|
|
|
tipTitlecolor = '#000000';
|
|
|
}else {
|
|
|
tipTitle = '拼团失败';
|
|
|
tipDetail = '购买人数不足,我们会尽快安排退款';
|
|
|
buttonText = '查看更多拼团活动';
|
|
|
tipTitlecolor = '#000000';
|
|
|
}
|
...
|
...
|
@@ -170,7 +165,7 @@ export default class GroupDetailHeader extends React.Component { |
|
|
?
|
|
|
this._renderTime(lackNum,this.state.formatTime)
|
|
|
:
|
|
|
this._renderTip(tipTitle,tipDetail)
|
|
|
this._renderTip(tipTitle)
|
|
|
}
|
|
|
<TouchableOpacity activeOpacity={0.5} style={[styles.button,{backgroundColor: tipTitlecolor}]} onPress={() => {
|
|
|
this.props.didTouchButton && this.props.didTouchButton(resource);
|
...
|
...
|
@@ -186,9 +181,11 @@ export default class GroupDetailHeader extends React.Component { |
|
|
</TouchableOpacity>
|
|
|
</View>
|
|
|
</View>
|
|
|
<View style={styles.product}>
|
|
|
<GroupDetailProduct resource={productDetail} pageGo={pageGo} perpleNum={perpleNum}/>
|
|
|
</View>
|
|
|
<TouchableOpacity activeOpacity={0.5} style={styles.product} onPress={() => {
|
|
|
this.props.didTouchProduct && this.props.didTouchProduct(productSkn,activityId);
|
|
|
}}>
|
|
|
<GroupDetailProduct resource={productDetail} pageGo={pageGo} perpleNum={perpleNum}/>
|
|
|
</TouchableOpacity>
|
|
|
<View style={styles.bottomLine}/>
|
|
|
</View>
|
|
|
);
|
...
|
...
|
@@ -310,11 +307,6 @@ let styles = StyleSheet.create({ |
|
|
marginTop: 23*DEVICE_WIDTH_RATIO,
|
|
|
fontWeight: 'bold',
|
|
|
},
|
|
|
tipDetail: {
|
|
|
fontSize: 12,
|
|
|
color: '#B0B0B0',
|
|
|
marginTop: 8*DEVICE_WIDTH_RATIO,
|
|
|
},
|
|
|
productdetailTimeCountView: {
|
|
|
width,
|
|
|
height: 22,
|
...
|
...
|
|