import React, { Component } from 'react' import { StyleSheet, View, Text, StatusBar, TouchableOpacity, PixelRatio, FlatList, } from 'react-native' import { connect } from 'react-redux' import Icon from '../../../components/Iconfont/Iconfont' import { NavigationActions, createAction } from '../../../utils' import Collapsible from 'react-native-collapsible' import * as Animatable from 'react-native-animatable' @connect(({ theme, mine }) => ({ ...theme, ...mine })) class CustomerContact extends Component { constructor(props) { super(props) this.state = { collapsed: 'dsadsa', } // console.disableYellowBox = true; } // 头部 header() { return ( this.props.dispatch(NavigationActions.back())} > 返回 客户联系人 ) } contactList(item, key) { return ( this.state.collapsed == item.id ? this.setState({ collapsed: 'dsadsa' }) : this.setState({ collapsed: item.id }) } style={{ padding: 10, backgroundColor: '#FFF', flexDirection: 'row', }} > {item.name && item.name.slice(0, 1)} {item.name} {item.phone} {item.contactTypeName} {/* 阴影效果 -----*/} {/* 阴影效果 ^^^^ */} 电话:{item.tel} 传真:{item.fax} 邮箱:{item.email} 地址:{item.address} ) } render() { const { appTheme, ContactInfo } = this.props return ( {this.header()} item.id + index} ItemSeparatorComponent={() => ( )} data={ContactInfo} renderItem={({ item, index }) => this.contactList(item, index)} // legacyImplementation={true} /> ) } } const styles = StyleSheet.create({ container: { flex: 1, }, }) export default CustomerContact