Authored by huangyCode

Merge branch 'V6.9.5' of http://git.yoho.cn/mobile/YH_RNComponent into V6.9.5

... ... @@ -16,21 +16,17 @@ export default class CouponViewModal extends React.Component {
render() {
return (
<Modal visible={this.props.show} animationType={'none'} transparent={true} onRequestClose={() => { }}>
<TouchableOpacity activeOpacity={1} onPress={() => {
<TouchableOpacity style={styles.modalContainer} activeOpacity={1} onPress={() => {
this.props.showCouponView && this.props.showCouponView(false);
}}>
<View style={styles.modalContainer}>
<View style={styles.shareView}>
<TouchableOpacity activeOpacity={1} onPress={() => {
this.props.didTouchCouponBanner && this.props.didTouchCouponBanner();
}}>
<YH_Image resizeMode={'contain'} style={styles.shareView} url={this.props.data}></YH_Image>
</TouchableOpacity>
</View>
<View style={styles.shareView}>
<TouchableOpacity activeOpacity={1} onPress={() => {
this.props.didTouchCouponBanner && this.props.didTouchCouponBanner();
}}>
<YH_Image resizeMode={'contain'} style={styles.imageView} url={this.props.data}></YH_Image>
</TouchableOpacity>
</View>
</TouchableOpacity>
</Modal>
);
}
... ... @@ -41,16 +37,18 @@ const DEVICE_WIDTH_RATIO = width / 375;
let styles = StyleSheet.create({
modalContainer: {
width: width,
height: height,
flex: 1,
backgroundColor: 'rgba(0, 0, 0, 0.6)',
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
},
shareView: {
flex: 1,
alignItems: 'center',
},
imageView : {
width: 280*DEVICE_WIDTH_RATIO,
height: 402*DEVICE_WIDTH_RATIO,
alignItems: 'center',
},
});
... ...
... ... @@ -247,12 +247,12 @@ export function fetchCouponInfo() {
dispatch(couponInfoRequest());
return new GroupPurchaseService(host).fetchCouponInfo()
.then(json => {
if (json) {
if (typeof json === 'string' && json) {
dispatch(showCouponView());
dispatch(couponInfoSuccess(json));
} else {
dispatch(showShareView());
}
dispatch(couponInfoSuccess(json));
})
.catch(error => {
dispatch(showShareView());
... ...
... ... @@ -139,7 +139,6 @@ export default class groupPurchaseService {
return await this.api.get({
url: '/operations/api/v5/pop/getGroupOrderPopInfo',
body: {
debug: 'XYZ',
}
})
.then((json) => {
... ...