import React, { Component } from 'react' import { StyleSheet, View, Text, Dimensions, StatusBar, TouchableOpacity, PixelRatio, FlatList, } from 'react-native' import { connect } from 'react-redux' import Collapsible from 'react-native-collapsible' import Icon from '../../../components/Iconfont/Iconfont' import { NavigationActions, createAction } from '../../../utils' const { width, height } = Dimensions.get('window') @connect(({ theme, mine }) => ({ ...theme, ...mine })) class CustomerAddress extends Component { constructor(props) { super(props) this.state = { collapsed: 'dsadsa' } // console.disableYellowBox = true; } // 头部 header() { return ( this.props.dispatch(NavigationActions.back())} > 返回 客户收货地址 ) } AddressList(item) { return ( {item.customerName} {item.countryName + item.provinceCode + item.cityName + item.countyName + item.townName + item.detailAddr} this.state.collapsed == item.id ? this.setState({ collapsed: 'dsadsa' }) : this.setState({ collapsed: item.id }) } style={{ flex: 16, marginTop: 3, flexDirection: 'row' }} > 联系人一:{item.firstReceiver} {item.firstReceiverPhone} {item.firstReceiverTel} 联系人二:{item.secondReceiver} {item.secondReceiverPhone} {item.secondReceiverTel} 联系人三:{item.thirdReceiver} {item.thirdReceiverPhone} {item.thirdReceiverTel} ) } render() { const { appTheme, AddressInfo } = this.props return ( {this.header()} index} data={AddressInfo} renderItem={({ item, index }) => this.AddressList(item, index)} // legacyImplementation={true} /> ) } } const styles = StyleSheet.create({ container: { flex: 1, }, pngstyle: { width: width, }, buttonStyle: { backgroundColor: 'transparent', flexDirection: 'column', alignItems: 'center', }, buttonText: { marginTop: 9, fontSize: 14, color: '#FFF', }, }) export default CustomerAddress