SureBankCardModal.js 4.09 KB
'use strict';

import React from 'react';
import ReactNative from 'react-native';

const {
    AppRegistry,
    StyleSheet,
    Text,
    View,
    Dimensions,
    TouchableOpacity,
    Modal,
} = ReactNative;


export default class SureBankCardModal extends React.Component {
    constructor(props) {
        super(props);
    }

    render() {
        return (
            <Modal
                visible={this.props.isShow}
                animationType={'none'}
                transparent={true}
                onRequestClose={() => {
                }}>
                <View style={styles.modalContainer}>
                    <View style={styles.modalView}>
                        <View style={styles.confirmTitleContainer}>
                            <Text style={[styles.sure, {marginTop: 20}]}>提示</Text>
                            <Text style={[styles.confirmContent, {marginTop: 8}]}>请确认您填写的银行信息,提交后只能致电客服修改</Text>
                        </View>
                        <Text style={styles.confirmInfo}>持卡人:{this.props.checkBankCardResult.name}</Text>
                        <Text style={styles.confirmInfo}>身份证号:{this.props.checkBankCardResult.idCardNo}</Text>
                        <Text style={styles.confirmInfo}>银行卡号:{this.props.checkBankCardResult.bankCardNo}</Text>
                        <View style={{width: '100%', height: 0.5, marginTop: 20, backgroundColor: '#e0e0e0'}}/>
                        <View style={styles.confirmBtnContainer}>
                            <TouchableOpacity
                                style={{width: '49%', alignItems: 'center', justifyContent: 'center', height: 45.5}}
                                onPress={() => {
                                    this.props.hiddenSureDialog && this.props.hiddenSureDialog();
                                    this.props.bindBankCard && this.props.bindBankCard(this.props.checkBankCardResult);
                                }}>
                                <Text style={styles.sure}>确定</Text>
                            </TouchableOpacity>
                            <View style={{width: 0.5, height: 45, backgroundColor: '#e0e0e0'}}/>
                            <TouchableOpacity
                                style={{width: '49%', alignItems: 'center', justifyContent: 'center', height: 45.5}}
                                onPress={() => {
                                    this.props.hiddenSureDialog && this.props.hiddenSureDialog();
                                }}>
                                <Text style={styles.cancel}>取消</Text>
                            </TouchableOpacity>
                        </View>
                    </View>
                </View>
            </Modal>
        );
    }
};

let {width, height} = Dimensions.get('window');

let styles = StyleSheet.create({
    modalContainer: {
        flex: 1,
        width: width,
        height: height,
        alignItems: 'center',
        justifyContent: 'center',
        backgroundColor: 'rgba(0, 0, 0, 0.4)',
    },
    modalView: {
        width: 270,
        borderRadius: 5,
        backgroundColor: '#ffffff',
    },
    confirmBtnContainer: {
        width: '100%',
        height: 44.5,
        flexDirection: 'row',
    },
    confirmTitleContainer: {
        alignItems: 'center'
    },
    confirmInfo: {
        color: '#B0B0B0',
        fontSize: 12,
        paddingLeft: 44,
        letterSpacing: -0.07,
        fontFamily: 'PingFang-SC-Regular',
    },
    confirmContent: {
        marginLeft: 30,
        marginRight: 30,
        marginBottom: 20,
        color: '#444444',
        fontSize: 14,
        lineHeight: 23,
        textAlign: 'center',
        letterSpacing: -0.09,
        fontFamily: 'PingFang-SC-Regular',
        includeFontPadding: false,
    },
    cancel: {
        fontSize: 17,
        color: '#444444',
        letterSpacing: -0.41,
        fontFamily: 'PingFang-SC-Regular',
    },
    sure: {
        fontSize: 17,
        color: '#D0021B',
        letterSpacing: -0.41,
        fontWeight: 'bold',
        fontFamily: 'PingFang-SC-Regular',
    },
});