Birth.js
6.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
'use strict';
import React, {Component} from 'react';
import ReactNative, {
View,
Text,
Image,
Button,
ListView,
ScrollView,
StyleSheet,
Dimensions,
TouchableOpacity,
Platform,
InteractionManager,
} from 'react-native';
import CouponAlertView from './CouponAlertView';
export default class Birth extends Component {
constructor(props) {
super(props);
}
render() {
let {showAlert, notSupportReasons, notSupportReasonsTitle, notSupportReasonsMessage} = this.props;
return (
<View style={styles.container}>
<Image source={require('../../images/birth_bg.png')} style={styles.contentBg} />
<TouchableOpacity style={styles.getCouponContainer} activeOpacity={1} onPress={() => { this.props.onPressGetCoupon && this.props.onPressGetCoupon()}}>
<Text style={styles.getCouponText}>立即领取生日福利券</Text>
</TouchableOpacity>
<View style={styles.tipContainer}>
<Text style={styles.tipTitle}>- 领 取 说 明 -</Text>
<View style={styles.tipContentContainer}>
<Text style={styles.tipContentTitle}>领取时间:</Text>
<Text style={[styles.tipContentDescContainer, styles.tipContentDesc]}>生日当月可领取,以您个人信息填写的生日为准。</Text>
</View>
<View style={styles.tipContentContainer}>
<Text style={styles.tipContentTitle}>领取详情:</Text>
<Text style={[styles.tipContentDescContainer, styles.tipContentDesc]}>生日券,领取之日起15天内有效,过期不补偿,领取后请尽快使用。</Text>
</View>
<View style={styles.tipContentContainer}>
<Text style={styles.tipContentTitle}>领取资格:</Text>
<Text style={[styles.tipContentDescContainer, styles.tipContentDesc]}>您在领取时,必须是有货VIP银卡、金卡、白金卡</Text>
</View>
<View style={styles.tipContentContainer}>
<Text style={styles.tipContentTitle}></Text>
<View style={styles.tipContentDescContainer}>
<Text style={styles.tipContentDesc}>用户</Text>
<TouchableOpacity activeOpacity={1} onPress={() => { this.props.onPressGoVip && this.props.onPressGoVip() }}>
<Text style={styles.tipContentLinkDesc}>(了解您当前的VIP级别),</Text>
</TouchableOpacity>
<Text style={styles.tipContentDesc}>且在个人信息中已</Text>
</View>
</View>
<View style={styles.tipContentContainer}>
<Text style={styles.tipContentTitle}></Text>
<View style={styles.tipContentDescContainer}>
<Text style={styles.tipContentDesc}>完善生日信息</Text>
<TouchableOpacity activeOpacity={1} onPress={() => { this.props.onPressComplete && this.props.onPressComplete()}}>
<Text style={styles.tipContentLinkDesc}>(查看/完善个人信息)。</Text>
</TouchableOpacity>
</View>
</View>
</View>
<Text style={styles.tipBottomMsg}>温馨提示:同一用户一年内(365天)仅可领取一次生日特惠哦!</Text>
{
showAlert ?
<CouponAlertView
notSupportReasons={notSupportReasons}
notSupportReasonsTitle={notSupportReasonsTitle}
notSupportReasonsMessage={notSupportReasonsMessage}
onPressClose={this.props.onPressClose} />
: null
}
</View>
);
}
}
let {width, height} = Dimensions.get('window');
const DEVICE_WIDTH_RATIO = width / 320;
const radio = 942 / 640;
let styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#c30d23',
},
contentBg: {
width: width,
height: Math.ceil(width*radio),
},
getCouponContainer:{
position: 'absolute',
width: width,
top: Math.ceil(width*radio*(525 / 942)) - (Platform.OS === 'ios'? 10 : 15),
alignItems: 'center',
justifyContent: 'center',
backgroundColor: 'transparent',
},
getCouponText:{
fontSize: 20,
color: '#ee9815',
fontWeight: 'bold',
},
tipContainer:{
position: 'absolute',
top: 310 * DEVICE_WIDTH_RATIO,
width: width,
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
paddingLeft: 25 * DEVICE_WIDTH_RATIO,
paddingRight: 18 * DEVICE_WIDTH_RATIO,
},
tipTitle:{
fontSize: 20,
color: '#ffffff',
fontWeight: 'bold',
fontStyle: 'italic',
backgroundColor: 'transparent',
},
tipContentContainer:{
width: width - 43 * DEVICE_WIDTH_RATIO,
flexDirection: 'row',
flexWrap: 'wrap',
},
tipContentTitle:{
fontSize: 12,
color: '#ffffff',
fontWeight: 'bold',
width: 50 * DEVICE_WIDTH_RATIO,
lineHeight: Math.ceil(18 * DEVICE_WIDTH_RATIO),
},
tipContentDescContainer:{
width: width - 93 * DEVICE_WIDTH_RATIO,
flexDirection: 'row',
},
tipContentDesc:{
fontSize: 12,
color: '#ffffff',
lineHeight: Math.ceil(18 * DEVICE_WIDTH_RATIO),
},
tipContentLinkDesc:{
fontSize: 12,
color: '#ffffff',
lineHeight: Math.ceil(18 * DEVICE_WIDTH_RATIO),
textDecorationLine: 'underline',
fontWeight: 'bold',
},
tipBottomMsg:{
position: 'absolute',
bottom: 10 * DEVICE_WIDTH_RATIO,
width: width,
fontSize: 9,
color: '#000000',
fontWeight: 'bold',
textAlign: 'center',
textDecorationLine: 'underline',
},
});