罗广聪

选中图标

... ... @@ -73,9 +73,9 @@ const MainTabBar = TabNavigator(
title: "客户管理",
tabBarIcon: ({ focused }) =>
focused ? (
<Image source={require("./src/assets/tabbar/ic_discover_s.png")} />
<Image source={require("./src/assets/tabbar/ic_client_s.png")} />
) : (
<Image source={require("./src/assets/tabbar/ic_discover_n.png")} />
<Image source={require("./src/assets/tabbar/ic_client_n.png")} />
)
}
},
... ...
... ... @@ -37,9 +37,11 @@ export default class Import extends Component {
<ScrollView style={styles.mainSvcContainer}>
{customersList.map((item, index) => {
return (
<TouchableOpacity key={index}>
<View />
<Text>{item.name}</Text>
<TouchableOpacity key={index} style={styles.CustomerItemContaier}>
<View style={styles.itemSelectIconContainer}>
<Image style={styles.itemSelectIcon} source={require("../../assets/customer/ic1_n.png")} />
</View>
<Text style={styles.CustomerItemText}>{item.name}</Text>
</TouchableOpacity>
);
})}
... ... @@ -76,6 +78,31 @@ const styles = StyleSheet.create({
marginBottom: 50,
flex: 1
},
CustomerItemContaier: {
flexDirection: "row",
justifyContent: "flex-start",
alignItems: "center",
backgroundColor: "white",
paddingVertical: 12,
marginLeft: 16,
marginRight: 10,
borderStyle: "solid",
borderColor: "#F2F2F2",
borderBottomWidth: 1
},
itemSelectIconContainer: {
justifyContent: "center",
alignItems: "center",
marginRight: 10,
},
itemSelectIcon: {
width: 15,
height: 15,
},
CustomerItemText: {
fontSize: 16,
color: "#202020"
},
selectBtnContaier: {
position: "absolute",
bottom: 0,
... ... @@ -96,6 +123,7 @@ const styles = StyleSheet.create({
selectAllContainer: {
marginLeft: 20,
},
selectAllText: {},
selectedTextContaier: {
flexDirection: "row",
marginLeft: 20,
... ...
... ... @@ -64,11 +64,10 @@ export default class Customer extends Component {
contacts.forEach((item, index) => {
customersList.push({
name: item.familyName + item.givenName,
phone: item.phoneNumbers.map((phone, index2) => {
return phone.number;
})
phone: item.phoneNumbers[0] ? item.phoneNumbers[0].number: '',
});
});
// console.log("通信录", contacts);
console.log("通信录", customersList);
navigate("CustomerImport", { customersList: customersList });
}
... ...