罗广聪

完成修改个人资料

@@ -27,7 +27,7 @@ export default class Home extends Component { @@ -27,7 +27,7 @@ export default class Home extends Component {
27 { 27 {
28 title: "平安保险第二个", 28 title: "平安保险第二个",
29 context: "600万医疗报废,自费药,进口药,器材费", 29 context: "600万医疗报废,自费药,进口药,器材费",
30 - url: "http://m.people.cn/n4/2017/0907/c190-9825877.html?admincptm=1504789835057", 30 + url: "https://mmbiz.qpic.cn/mmbiz_jpg/cdwcq52BJlibS0nnF7IFq72VPba2ZEEOPVbMX370LHt8gW5nEicvQ4zpyX626y4hYPdk7CUUrHwCOVc2nMicY0xcw/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1",
31 imgurl: require("../../assets/circle/newspic.png") 31 imgurl: require("../../assets/circle/newspic.png")
32 }, 32 },
33 { 33 {
@@ -152,7 +152,10 @@ const styles = StyleSheet.create({ @@ -152,7 +152,10 @@ const styles = StyleSheet.create({
152 // color: "#202020", 152 // color: "#202020",
153 }, 153 },
154 listContainer: { 154 listContainer: {
155 - height: 150 155 + // height: 150
  156 + flex: 1,
  157 + // paddingBottom: 64,
  158 + marginBottom: 49,
156 }, 159 },
157 itemContainer: { 160 itemContainer: {
158 height: 90, 161 height: 90,
@@ -190,6 +193,7 @@ const styles = StyleSheet.create({ @@ -190,6 +193,7 @@ const styles = StyleSheet.create({
190 color: "#7A7A7A", 193 color: "#7A7A7A",
191 fontSize: 13, 194 fontSize: 13,
192 marginTop: 10, 195 marginTop: 10,
193 - textAlign: "center" 196 + textAlign: "center",
  197 + marginBottom: 10
194 }, 198 },
195 }); 199 });
@@ -88,15 +88,18 @@ const styles = StyleSheet.create({ @@ -88,15 +88,18 @@ const styles = StyleSheet.create({
88 justifyContent: "flex-start", 88 justifyContent: "flex-start",
89 alignItems: "stretch", 89 alignItems: "stretch",
90 backgroundColor: "#EFEFEF", 90 backgroundColor: "#EFEFEF",
91 - paddingTop: 74 91 + paddingTop: 64
92 }, 92 },
93 scrollViewContainer: { 93 scrollViewContainer: {
94 - height: 300 94 + // height: 300
  95 + flex: 1,
  96 + marginBottom: 49,
95 }, 97 },
96 scrollViewText: { 98 scrollViewText: {
97 color: "#7A7A7A", 99 color: "#7A7A7A",
98 fontSize: 13, 100 fontSize: 13,
99 marginTop: 10, 101 marginTop: 10,
  102 + marginBottom: 10,
100 textAlign: "center" 103 textAlign: "center"
101 }, 104 },
102 itemContainer: { 105 itemContainer: {
@@ -157,15 +157,18 @@ const styles = StyleSheet.create({ @@ -157,15 +157,18 @@ const styles = StyleSheet.create({
157 justifyContent: "flex-start", 157 justifyContent: "flex-start",
158 alignItems: "stretch", 158 alignItems: "stretch",
159 backgroundColor: "#EFEFEF", 159 backgroundColor: "#EFEFEF",
160 - paddingTop: 74 160 + paddingTop: 64
161 }, 161 },
162 scrollViewContainer: { 162 scrollViewContainer: {
163 // height: 300 163 // height: 300
  164 + flex: 1,
  165 + marginBottom: 49,
164 }, 166 },
165 scrollViewText: { 167 scrollViewText: {
166 color: "#7A7A7A", 168 color: "#7A7A7A",
167 fontSize: 13, 169 fontSize: 13,
168 marginTop: 10, 170 marginTop: 10,
  171 + marginBottom: 10,
169 textAlign: "center" 172 textAlign: "center"
170 }, 173 },
171 itemContainer: { 174 itemContainer: {
@@ -5,7 +5,8 @@ import { @@ -5,7 +5,8 @@ import {
5 Text, 5 Text,
6 View, 6 View,
7 TouchableOpacity, 7 TouchableOpacity,
8 - Image 8 + Image,
  9 + AlertIOS
9 } from "react-native"; 10 } from "react-native";
10 import myQuestion from "./myQuestion"; 11 import myQuestion from "./myQuestion";
11 import MsgNotification from "./MsgNotification"; 12 import MsgNotification from "./MsgNotification";
@@ -16,25 +17,21 @@ export default class Mine extends Component { @@ -16,25 +17,21 @@ export default class Mine extends Component {
16 super(props); 17 super(props);
17 this.state = { 18 this.state = {
18 name: "哈哈哈", 19 name: "哈哈哈",
19 - identity: "职业代理人" 20 + identity: "职业代理人",
20 }; 21 };
  22 + this.saveResponse1 = this.saveResponse1.bind(this);
  23 + this.saveResponse2 = this.saveResponse2.bind(this);
  24 + }
  25 + saveResponse1(d) {
  26 + this.setState({ name: d });
  27 + }
  28 + saveResponse2(d) {
  29 + this.setState({ identity: d });
21 } 30 }
22 render() { 31 render() {
23 return ( 32 return (
24 <View style={styles.container}> 33 <View style={styles.container}>
25 - <TouchableOpacity 34 + <TouchableOpacity style={styles.header}>
26 - style={styles.header}  
27 - onPress={() => {  
28 - this.props.navigator.push({  
29 - component: PersonalInfo,  
30 - passProps: {  
31 - name: this.state.name,  
32 - identity: this.state.identity,  
33 - changeInfo: (type,text) => this.changeInfo(type,text),  
34 - }  
35 - });  
36 - }}  
37 - >  
38 <View style={styles.headerLeft}> 35 <View style={styles.headerLeft}>
39 <Image 36 <Image
40 source={require("../../assets/Mine/iconpic1.png")} 37 source={require("../../assets/Mine/iconpic1.png")}
@@ -42,19 +39,12 @@ export default class Mine extends Component { @@ -42,19 +39,12 @@ export default class Mine extends Component {
42 /> 39 />
43 <Text style={styles.mineName}>{this.state.name}</Text> 40 <Text style={styles.mineName}>{this.state.name}</Text>
44 </View> 41 </View>
45 - <Image  
46 - source={require("../../assets/Mine/rightArrow_white.png")}  
47 - style={styles.headerRight}  
48 - />  
49 </TouchableOpacity> 42 </TouchableOpacity>
50 <View style={styles.midContainer}> 43 <View style={styles.midContainer}>
51 <TouchableOpacity 44 <TouchableOpacity
52 style={styles.itemContainer} 45 style={styles.itemContainer}
53 onPress={() => { 46 onPress={() => {
54 - this.props.navigator.push({ 47 + AlertIOS.prompt("更改昵称", null, this.saveResponse1);
55 - component: MsgNotification,  
56 - passProps: {}  
57 - });  
58 }} 48 }}
59 > 49 >
60 <View style={styles.itemLeft}> 50 <View style={styles.itemLeft}>
@@ -62,21 +52,20 @@ export default class Mine extends Component { @@ -62,21 +52,20 @@ export default class Mine extends Component {
62 style={styles.leftIcon} 52 style={styles.leftIcon}
63 source={require("../../assets/tabbar/ic_circle_s.png")} 53 source={require("../../assets/tabbar/ic_circle_s.png")}
64 /> 54 />
65 - <Text style={styles.leftTitle}>消息通知</Text> 55 + <Text style={styles.leftTitle}>昵称</Text>
66 - <Text style={styles.leftNum}> (11)</Text>  
67 </View> 56 </View>
  57 + <View style={styles.itemRight}>
  58 + <Text style={styles.itemRightContent}>{this.state.name}</Text>
68 <Image 59 <Image
69 - style={styles.itemRight} 60 + style={styles.itemRightImg}
70 source={require("../../assets/Mine/rightArrow_gray.png")} 61 source={require("../../assets/Mine/rightArrow_gray.png")}
71 /> 62 />
  63 + </View>
72 </TouchableOpacity> 64 </TouchableOpacity>
73 <TouchableOpacity 65 <TouchableOpacity
74 style={styles.itemContainer} 66 style={styles.itemContainer}
75 onPress={() => { 67 onPress={() => {
76 - this.props.navigator.push({ 68 + AlertIOS.prompt("更改职业", null, this.saveResponse2);
77 - component: myQuestion,  
78 - passProps: {}  
79 - });  
80 }} 69 }}
81 > 70 >
82 <View style={styles.itemLeft}> 71 <View style={styles.itemLeft}>
@@ -84,14 +73,19 @@ export default class Mine extends Component { @@ -84,14 +73,19 @@ export default class Mine extends Component {
84 style={styles.leftIcon} 73 style={styles.leftIcon}
85 source={require("../../assets/tabbar/ic_circle_s.png")} 74 source={require("../../assets/tabbar/ic_circle_s.png")}
86 /> 75 />
87 - <Text style={styles.leftTitle}>我的提问</Text> 76 + <Text style={styles.leftTitle}>职业</Text>
88 </View> 77 </View>
  78 + <View style={styles.itemRight}>
  79 + <Text style={styles.itemRightContent}>{this.state.identity}</Text>
89 <Image 80 <Image
90 - style={styles.itemRight} 81 + style={styles.itemRightImg}
91 source={require("../../assets/Mine/rightArrow_gray.png")} 82 source={require("../../assets/Mine/rightArrow_gray.png")}
92 /> 83 />
  84 + </View>
93 </TouchableOpacity> 85 </TouchableOpacity>
94 </View> 86 </View>
  87 +
  88 + {/* 退出登录 */}
95 <TouchableOpacity 89 <TouchableOpacity
96 style={styles.loginOut} 90 style={styles.loginOut}
97 onLogin={this.props.onLogin} 91 onLogin={this.props.onLogin}
@@ -109,15 +103,15 @@ export default class Mine extends Component { @@ -109,15 +103,15 @@ export default class Mine extends Component {
109 console.log("看看this是什么", this); 103 console.log("看看this是什么", this);
110 this.props.onLogin(false); 104 this.props.onLogin(false);
111 } 105 }
112 - changeInfo(type,text) { 106 + changeInfo(type, text) {
113 if (type == "name") { 107 if (type == "name") {
114 this.setState({ 108 this.setState({
115 name: text 109 name: text
116 - }) 110 + });
117 } else { 111 } else {
118 this.setState({ 112 this.setState({
119 identity: text 113 identity: text
120 - }) 114 + });
121 } 115 }
122 } 116 }
123 } 117 }
@@ -216,6 +210,7 @@ const styles = StyleSheet.create({ @@ -216,6 +210,7 @@ const styles = StyleSheet.create({
216 justifyContent: "flex-start", 210 justifyContent: "flex-start",
217 alignItems: "center" 211 alignItems: "center"
218 }, 212 },
  213 +
219 leftIcon: { 214 leftIcon: {
220 marginRight: 11, 215 marginRight: 11,
221 width: 16, 216 width: 16,
@@ -225,11 +220,15 @@ const styles = StyleSheet.create({ @@ -225,11 +220,15 @@ const styles = StyleSheet.create({
225 fontSize: 15, 220 fontSize: 15,
226 color: "#242424" 221 color: "#242424"
227 }, 222 },
228 - leftNum: {  
229 - fontSize: 15,  
230 - color: "#EE6723"  
231 - },  
232 itemRight: { 223 itemRight: {
  224 + flexDirection: "row",
  225 + justifyContent: "flex-start",
  226 + alignItems: "center"
  227 + },
  228 + itemRightContent: {
  229 + marginRight: 5
  230 + },
  231 + itemRightImg: {
233 width: 14, 232 width: 14,
234 height: 14 233 height: 14
235 }, 234 },