Showing
2 changed files
with
84 additions
and
12 deletions
| @@ -33,7 +33,7 @@ export default class Edit extends Component { | @@ -33,7 +33,7 @@ export default class Edit extends Component { | ||
| 33 | <View style={styles.infoContaier}> | 33 | <View style={styles.infoContaier}> |
| 34 | <TouchableOpacity style={styles.itemContainer} onPress={() => {}}> | 34 | <TouchableOpacity style={styles.itemContainer} onPress={() => {}}> |
| 35 | <View style={styles.itemLeft}> | 35 | <View style={styles.itemLeft}> |
| 36 | - <Text style={styles.leftTitle}>昵称</Text> | 36 | + <Text style={styles.leftTitle}>姓名</Text> |
| 37 | </View> | 37 | </View> |
| 38 | <View style={styles.itemRight}> | 38 | <View style={styles.itemRight}> |
| 39 | <Text style={styles.itemRightContent}>周周周</Text> | 39 | <Text style={styles.itemRightContent}>周周周</Text> |
| @@ -45,10 +45,10 @@ export default class Edit extends Component { | @@ -45,10 +45,10 @@ export default class Edit extends Component { | ||
| 45 | </TouchableOpacity> | 45 | </TouchableOpacity> |
| 46 | <TouchableOpacity style={styles.itemContainer} onPress={() => {}}> | 46 | <TouchableOpacity style={styles.itemContainer} onPress={() => {}}> |
| 47 | <View style={styles.itemLeft}> | 47 | <View style={styles.itemLeft}> |
| 48 | - <Text style={styles.leftTitle}>昵称</Text> | 48 | + <Text style={styles.leftTitle}>年龄</Text> |
| 49 | </View> | 49 | </View> |
| 50 | <View style={styles.itemRight}> | 50 | <View style={styles.itemRight}> |
| 51 | - <Text style={styles.itemRightContent}>周周周</Text> | 51 | + <Text style={styles.itemRightContent}>18</Text> |
| 52 | <Image | 52 | <Image |
| 53 | style={styles.itemRightImg} | 53 | style={styles.itemRightImg} |
| 54 | source={require("../../assets/Mine/rightArrow_gray.png")} | 54 | source={require("../../assets/Mine/rightArrow_gray.png")} |
| @@ -57,10 +57,10 @@ export default class Edit extends Component { | @@ -57,10 +57,10 @@ export default class Edit extends Component { | ||
| 57 | </TouchableOpacity> | 57 | </TouchableOpacity> |
| 58 | <TouchableOpacity style={styles.itemContainer} onPress={() => {}}> | 58 | <TouchableOpacity style={styles.itemContainer} onPress={() => {}}> |
| 59 | <View style={styles.itemLeft}> | 59 | <View style={styles.itemLeft}> |
| 60 | - <Text style={styles.leftTitle}>昵称</Text> | 60 | + <Text style={styles.leftTitle}>手机号码</Text> |
| 61 | </View> | 61 | </View> |
| 62 | <View style={styles.itemRight}> | 62 | <View style={styles.itemRight}> |
| 63 | - <Text style={styles.itemRightContent}>周周周</Text> | 63 | + <Text style={styles.itemRightContent}>13570000000</Text> |
| 64 | <Image | 64 | <Image |
| 65 | style={styles.itemRightImg} | 65 | style={styles.itemRightImg} |
| 66 | source={require("../../assets/Mine/rightArrow_gray.png")} | 66 | source={require("../../assets/Mine/rightArrow_gray.png")} |
| @@ -69,10 +69,58 @@ export default class Edit extends Component { | @@ -69,10 +69,58 @@ export default class Edit extends Component { | ||
| 69 | </TouchableOpacity> | 69 | </TouchableOpacity> |
| 70 | <TouchableOpacity style={styles.itemContainer} onPress={() => {}}> | 70 | <TouchableOpacity style={styles.itemContainer} onPress={() => {}}> |
| 71 | <View style={styles.itemLeft}> | 71 | <View style={styles.itemLeft}> |
| 72 | - <Text style={styles.leftTitle}>昵称</Text> | 72 | + <Text style={styles.leftTitle}>性别</Text> |
| 73 | </View> | 73 | </View> |
| 74 | <View style={styles.itemRight}> | 74 | <View style={styles.itemRight}> |
| 75 | - <Text style={styles.itemRightContent}>周周周</Text> | 75 | + <Text style={styles.itemRightContent}>男</Text> |
| 76 | + <Image | ||
| 77 | + style={styles.itemRightImg} | ||
| 78 | + source={require("../../assets/Mine/rightArrow_gray.png")} | ||
| 79 | + /> | ||
| 80 | + </View> | ||
| 81 | + </TouchableOpacity> | ||
| 82 | + <TouchableOpacity style={styles.itemContainer} onPress={() => {}}> | ||
| 83 | + <View style={styles.itemLeft}> | ||
| 84 | + <Text style={styles.leftTitle}>客户状态</Text> | ||
| 85 | + </View> | ||
| 86 | + <View style={styles.itemRight}> | ||
| 87 | + <Text style={styles.itemRightContent}>已签单</Text> | ||
| 88 | + <Image | ||
| 89 | + style={styles.itemRightImg} | ||
| 90 | + source={require("../../assets/Mine/rightArrow_gray.png")} | ||
| 91 | + /> | ||
| 92 | + </View> | ||
| 93 | + </TouchableOpacity> | ||
| 94 | + <TouchableOpacity style={styles.itemContainer} onPress={() => {}}> | ||
| 95 | + <View style={styles.itemLeft}> | ||
| 96 | + <Text style={styles.leftTitle}>客户来源</Text> | ||
| 97 | + </View> | ||
| 98 | + <View style={styles.itemRight}> | ||
| 99 | + <Text style={styles.itemRightContent}>芒果钱包</Text> | ||
| 100 | + <Image | ||
| 101 | + style={styles.itemRightImg} | ||
| 102 | + source={require("../../assets/Mine/rightArrow_gray.png")} | ||
| 103 | + /> | ||
| 104 | + </View> | ||
| 105 | + </TouchableOpacity> | ||
| 106 | + <TouchableOpacity style={styles.itemContainer} onPress={() => {}}> | ||
| 107 | + <View style={styles.itemLeft}> | ||
| 108 | + <Text style={styles.leftTitle}>婚姻状态</Text> | ||
| 109 | + </View> | ||
| 110 | + <View style={styles.itemRight}> | ||
| 111 | + <Text style={styles.itemRightContent}>未婚</Text> | ||
| 112 | + <Image | ||
| 113 | + style={styles.itemRightImg} | ||
| 114 | + source={require("../../assets/Mine/rightArrow_gray.png")} | ||
| 115 | + /> | ||
| 116 | + </View> | ||
| 117 | + </TouchableOpacity> | ||
| 118 | + <TouchableOpacity style={styles.itemContainer} onPress={() => {}}> | ||
| 119 | + <View style={styles.itemLeft}> | ||
| 120 | + <Text style={styles.leftTitle}>是否生育</Text> | ||
| 121 | + </View> | ||
| 122 | + <View style={styles.itemRight}> | ||
| 123 | + <Text style={styles.itemRightContent}>否</Text> | ||
| 76 | <Image | 124 | <Image |
| 77 | style={styles.itemRightImg} | 125 | style={styles.itemRightImg} |
| 78 | source={require("../../assets/Mine/rightArrow_gray.png")} | 126 | source={require("../../assets/Mine/rightArrow_gray.png")} |
| @@ -93,7 +141,7 @@ const styles = StyleSheet.create({ | @@ -93,7 +141,7 @@ const styles = StyleSheet.create({ | ||
| 93 | backgroundColor: "#F0F0F0" | 141 | backgroundColor: "#F0F0F0" |
| 94 | }, | 142 | }, |
| 95 | infoContaier: { | 143 | infoContaier: { |
| 96 | - marginVertical: 10, | 144 | + marginVertical: 10 |
| 97 | }, | 145 | }, |
| 98 | itemContainer: { | 146 | itemContainer: { |
| 99 | height: 46, | 147 | height: 46, |
| @@ -8,7 +8,8 @@ import { | @@ -8,7 +8,8 @@ import { | ||
| 8 | TouchableOpacity, | 8 | TouchableOpacity, |
| 9 | ScrollView, | 9 | ScrollView, |
| 10 | ListView, | 10 | ListView, |
| 11 | - Dimensions | 11 | + Dimensions, |
| 12 | + AsyncStorage | ||
| 12 | } from "react-native"; | 13 | } from "react-native"; |
| 13 | import { StackNavigator, TabNavigator } from "react-navigation"; | 14 | import { StackNavigator, TabNavigator } from "react-navigation"; |
| 14 | import post from "../../utils/fetch"; | 15 | import post from "../../utils/fetch"; |
| @@ -17,6 +18,10 @@ export default class Customer extends Component { | @@ -17,6 +18,10 @@ export default class Customer extends Component { | ||
| 17 | constructor(props) { | 18 | constructor(props) { |
| 18 | super(props); | 19 | super(props); |
| 19 | this.state = { | 20 | this.state = { |
| 21 | + IS_LOGIN: "", | ||
| 22 | + USER_ID: "", | ||
| 23 | + NICKNAME: "", | ||
| 24 | + PROFESSION: "", | ||
| 20 | hasCustomer: true, | 25 | hasCustomer: true, |
| 21 | customersList: ["张某某", "周某某", "林某某", "李某某"] | 26 | customersList: ["张某某", "周某某", "林某某", "李某某"] |
| 22 | }; | 27 | }; |
| @@ -52,7 +57,26 @@ export default class Customer extends Component { | @@ -52,7 +57,26 @@ export default class Customer extends Component { | ||
| 52 | }); | 57 | }); |
| 53 | } | 58 | } |
| 54 | 59 | ||
| 60 | + getAsyncStorage() { | ||
| 61 | + const that = this; | ||
| 62 | + AsyncStorage.multiGet( | ||
| 63 | + ["IS_LOGIN", "USER_ID", "NICKNAME", "PROFESSION"], | ||
| 64 | + (err, result) => { | ||
| 65 | + if (err) { | ||
| 66 | + console.error(err); | ||
| 67 | + } | ||
| 68 | + that.setState({ | ||
| 69 | + IS_LOGIN: result[0][1], | ||
| 70 | + USER_ID: result[1][1] != null ? result[1][1] : "", | ||
| 71 | + NICKNAME: result[2][1] != null ? result[2][1] : "", | ||
| 72 | + PROFESSION: result[3][1] != null ? result[3][1] : "" | ||
| 73 | + }); | ||
| 74 | + } | ||
| 75 | + ); | ||
| 76 | + } | ||
| 77 | + | ||
| 55 | _renderBegin() { | 78 | _renderBegin() { |
| 79 | + const { navigate } = this.props.navigation; | ||
| 56 | return ( | 80 | return ( |
| 57 | <View style={styles.beginContaier}> | 81 | <View style={styles.beginContaier}> |
| 58 | <Image | 82 | <Image |
| @@ -60,7 +84,7 @@ export default class Customer extends Component { | @@ -60,7 +84,7 @@ export default class Customer extends Component { | ||
| 60 | style={styles.beginPic} | 84 | style={styles.beginPic} |
| 61 | /> | 85 | /> |
| 62 | <View style={styles.beginBtnContaier}> | 86 | <View style={styles.beginBtnContaier}> |
| 63 | - <TouchableOpacity style={styles.beginBtnLeft}> | 87 | + <TouchableOpacity style={styles.beginBtnLeft} onPress={() => {navigate("CustomerEdit")}}> |
| 64 | <Text style={styles.beginBtnLeftText}>手动选择</Text> | 88 | <Text style={styles.beginBtnLeftText}>手动选择</Text> |
| 65 | </TouchableOpacity> | 89 | </TouchableOpacity> |
| 66 | <TouchableOpacity style={styles.beginBtnRight}> | 90 | <TouchableOpacity style={styles.beginBtnRight}> |
| @@ -76,7 +100,7 @@ export default class Customer extends Component { | @@ -76,7 +100,7 @@ export default class Customer extends Component { | ||
| 76 | return ( | 100 | return ( |
| 77 | <View style={styles.mainContaier}> | 101 | <View style={styles.mainContaier}> |
| 78 | <View style={styles.mainBtnContaier}> | 102 | <View style={styles.mainBtnContaier}> |
| 79 | - <TouchableOpacity style={styles.mainBtnContaierLeft}> | 103 | + <TouchableOpacity style={styles.mainBtnContaierLeft} onPress={() => {navigate("CustomerEdit")}}> |
| 80 | <Image | 104 | <Image |
| 81 | style={styles.mainBtnLeftImg} | 105 | style={styles.mainBtnLeftImg} |
| 82 | source={require("../../assets/customer/ic_add.png")} | 106 | source={require("../../assets/customer/ic_add.png")} |
| @@ -114,7 +138,7 @@ export default class Customer extends Component { | @@ -114,7 +138,7 @@ export default class Customer extends Component { | ||
| 114 | 138 | ||
| 115 | render() { | 139 | render() { |
| 116 | const { navigate } = this.props.navigation; | 140 | const { navigate } = this.props.navigation; |
| 117 | - const { hasCustomer, customers } = this.state; | 141 | + const { IS_LOGIN,hasCustomer, customers } = this.state; |
| 118 | return ( | 142 | return ( |
| 119 | <View style={styles.container}> | 143 | <View style={styles.container}> |
| 120 | {hasCustomer ? ( | 144 | {hasCustomer ? ( |
-
Please register or login to post a comment