/**
 * Created by zhouhuan on 2017/10/30.
 */
import React from 'react';
import { View, StyleSheet, FlatList, Text, ScrollView } from 'react-native';
import { Card, WingBlank, WhiteSpace } from 'antd-mobile';
import { connect } from 'react-redux';
import { createAction } from '../../../utils';

@connect(({ obligeeInfo }) => ({ obligeeInfo }))
class ObligeeInfo extends React.Component {
  componentDidMount() {
    this.props.dispatch(createAction('obligeeInfo/getObligeeInfo')());
  }
  render() {
    const { sourceData } = this.props.obligeeInfo;
    console.log(sourceData);
    return (
      <ScrollView >
        <WingBlank size="lg">
          <WhiteSpace size="lg" />
          <Card>
            <Card.Header
              title="张三"
              extra={<Text style={Styles.cardText}>&gt;&gt;详情</Text>}
            />
            <Card.Body>
              <Text style={Styles.cardBodyText}>性别:<Text style={Styles.cardBodyText2}>男</Text></Text>
              <Text style={Styles.cardBodyText}>证件号码:<Text style={Styles.cardBodyText2}>350502199210236034</Text></Text>
              <Text style={Styles.cardBodyText}>与户主关系:<Text style={Styles.cardBodyText2}>户主</Text></Text>
            </Card.Body>
          </Card>
          <WhiteSpace size="lg" />
        </WingBlank>
        <WingBlank size="lg">
          <WhiteSpace size="lg" />
          <Card>
            <Card.Header
              title="张三"
              extra={<Text style={Styles.cardText}>&gt;&gt;详情</Text>}
            />
            <Card.Body>
              <Text style={Styles.cardBodyText}>性别:男</Text>
              <Text style={Styles.cardBodyText}>证件号码:350502199210236034</Text>
              <Text style={Styles.cardBodyText}>与户主关系:户主</Text>
            </Card.Body>
          </Card>
          <WhiteSpace size="lg" />
        </WingBlank>
        <WingBlank size="lg">
          <WhiteSpace size="lg" />
          <Card>
            <Card.Header
              title="张三"
              extra={<Text style={Styles.cardText}>&gt;&gt;详情</Text>}
            />
            <Card.Body>
              <Text style={Styles.cardBodyText}>性别:男</Text>
              <Text style={Styles.cardBodyText}>证件号码:350502199210236034</Text>
              <Text style={Styles.cardBodyText}>与户主关系:户主</Text>
            </Card.Body>
          </Card>
          <WhiteSpace size="lg" />
        </WingBlank>
        <WingBlank size="lg">
          <WhiteSpace size="lg" />
          <Card>
            <Card.Header
              title="张三"
              extra={<Text style={Styles.cardText}>&gt;&gt;详情</Text>}
            />
            <Card.Body>
              <Text style={Styles.cardBodyText}>性别:男</Text>
              <Text style={Styles.cardBodyText}>证件号码:350502199210236034</Text>
              <Text style={Styles.cardBodyText}>与户主关系:户主</Text>
            </Card.Body>
          </Card>
          <WhiteSpace size="lg" />
        </WingBlank>
        <WingBlank size="lg">
          <WhiteSpace size="lg" />
          <Card>
            <Card.Header
              title="张三"
              extra={<Text style={Styles.cardText}>&gt;&gt;详情</Text>}
            />
            <Card.Body>
              <Text style={Styles.cardBodyText}>性别:男</Text>
              <Text style={Styles.cardBodyText}>证件号码:350502199210236034</Text>
              <Text style={Styles.cardBodyText}>与户主关系:户主</Text>
            </Card.Body>
          </Card>
          <WhiteSpace size="lg" />
        </WingBlank>
      </ScrollView >
    );
  }
}
const Styles = StyleSheet.create({
  cardText: {
    color: '#2196F3',
    textAlign: 'right',
  },
  cardBodyText: {
    marginBottom: 10,
    marginLeft: 13,
  },
});
export default ObligeeInfo;
