调整vip在ios 上文字有背景色的问题。review by 孙凯。
Showing
1 changed file
with
12 additions
and
7 deletions
@@ -36,7 +36,7 @@ export default class Birth extends Component { | @@ -36,7 +36,7 @@ export default class Birth extends Component { | ||
36 | 36 | ||
37 | <TouchableOpacity style={styles.getCouponContainer} activeOpacity={1} onPress={() => { this.props.onPressGetCoupon && this.props.onPressGetCoupon()}}> | 37 | <TouchableOpacity style={styles.getCouponContainer} activeOpacity={1} onPress={() => { this.props.onPressGetCoupon && this.props.onPressGetCoupon()}}> |
38 | <Text style={styles.getCouponText}>立即领取生日福利券</Text> | 38 | <Text style={styles.getCouponText}>立即领取生日福利券</Text> |
39 | - </TouchableOpacity> | 39 | + </TouchableOpacity> |
40 | 40 | ||
41 | <View style={styles.tipContainer}> | 41 | <View style={styles.tipContainer}> |
42 | 42 | ||
@@ -82,12 +82,12 @@ export default class Birth extends Component { | @@ -82,12 +82,12 @@ export default class Birth extends Component { | ||
82 | <Text style={styles.tipBottomMsg}>温馨提示:同一用户一年内(365天)仅可领取一次生日特惠哦!</Text> | 82 | <Text style={styles.tipBottomMsg}>温馨提示:同一用户一年内(365天)仅可领取一次生日特惠哦!</Text> |
83 | 83 | ||
84 | { | 84 | { |
85 | - showAlert ? | ||
86 | - <CouponAlertView | 85 | + showAlert ? |
86 | + <CouponAlertView | ||
87 | notSupportReasons={notSupportReasons} | 87 | notSupportReasons={notSupportReasons} |
88 | notSupportReasonsTitle={notSupportReasonsTitle} | 88 | notSupportReasonsTitle={notSupportReasonsTitle} |
89 | notSupportReasonsMessage={notSupportReasonsMessage} | 89 | notSupportReasonsMessage={notSupportReasonsMessage} |
90 | - onPressClose={this.props.onPressClose} /> | 90 | + onPressClose={this.props.onPressClose} /> |
91 | : null | 91 | : null |
92 | } | 92 | } |
93 | 93 | ||
@@ -98,6 +98,7 @@ export default class Birth extends Component { | @@ -98,6 +98,7 @@ export default class Birth extends Component { | ||
98 | 98 | ||
99 | let {width, height} = Dimensions.get('window'); | 99 | let {width, height} = Dimensions.get('window'); |
100 | const DEVICE_WIDTH_RATIO = width / 320; | 100 | const DEVICE_WIDTH_RATIO = width / 320; |
101 | +const radio = 942 / 640; | ||
101 | 102 | ||
102 | 103 | ||
103 | let styles = StyleSheet.create({ | 104 | let styles = StyleSheet.create({ |
@@ -108,13 +109,16 @@ let styles = StyleSheet.create({ | @@ -108,13 +109,16 @@ let styles = StyleSheet.create({ | ||
108 | 109 | ||
109 | contentBg: { | 110 | contentBg: { |
110 | width: width, | 111 | width: width, |
111 | - height: 471 * DEVICE_WIDTH_RATIO, | 112 | + height: Math.ceil(width*radio), |
112 | }, | 113 | }, |
113 | 114 | ||
114 | getCouponContainer:{ | 115 | getCouponContainer:{ |
115 | position: 'absolute', | 116 | position: 'absolute', |
116 | - top: 250 * DEVICE_WIDTH_RATIO, | ||
117 | - left: 76 * DEVICE_WIDTH_RATIO, | 117 | + width: width, |
118 | + top: Math.ceil(width*radio*(525 / 942)) - (Platform.OS === 'ios'? 10 : 15), | ||
119 | + alignItems: 'center', | ||
120 | + justifyContent: 'center', | ||
121 | + backgroundColor: 'transparent', | ||
118 | }, | 122 | }, |
119 | 123 | ||
120 | getCouponText:{ | 124 | getCouponText:{ |
@@ -139,6 +143,7 @@ let styles = StyleSheet.create({ | @@ -139,6 +143,7 @@ let styles = StyleSheet.create({ | ||
139 | color: '#ffffff', | 143 | color: '#ffffff', |
140 | fontWeight: 'bold', | 144 | fontWeight: 'bold', |
141 | fontStyle: 'italic', | 145 | fontStyle: 'italic', |
146 | + backgroundColor: 'transparent', | ||
142 | }, | 147 | }, |
143 | 148 | ||
144 | tipContentContainer:{ | 149 | tipContentContainer:{ |
-
Please register or login to post a comment