罗广聪

完成修改个人资料

... ... @@ -27,7 +27,7 @@ export default class Home extends Component {
{
title: "平安保险第二个",
context: "600万医疗报废,自费药,进口药,器材费",
url: "http://m.people.cn/n4/2017/0907/c190-9825877.html?admincptm=1504789835057",
url: "https://mmbiz.qpic.cn/mmbiz_jpg/cdwcq52BJlibS0nnF7IFq72VPba2ZEEOPVbMX370LHt8gW5nEicvQ4zpyX626y4hYPdk7CUUrHwCOVc2nMicY0xcw/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1",
imgurl: require("../../assets/circle/newspic.png")
},
{
... ... @@ -152,7 +152,10 @@ const styles = StyleSheet.create({
// color: "#202020",
},
listContainer: {
height: 150
// height: 150
flex: 1,
// paddingBottom: 64,
marginBottom: 49,
},
itemContainer: {
height: 90,
... ... @@ -190,6 +193,7 @@ const styles = StyleSheet.create({
color: "#7A7A7A",
fontSize: 13,
marginTop: 10,
textAlign: "center"
textAlign: "center",
marginBottom: 10
},
});
... ...
... ... @@ -88,15 +88,18 @@ const styles = StyleSheet.create({
justifyContent: "flex-start",
alignItems: "stretch",
backgroundColor: "#EFEFEF",
paddingTop: 74
paddingTop: 64
},
scrollViewContainer: {
height: 300
// height: 300
flex: 1,
marginBottom: 49,
},
scrollViewText: {
color: "#7A7A7A",
fontSize: 13,
marginTop: 10,
marginBottom: 10,
textAlign: "center"
},
itemContainer: {
... ...
... ... @@ -157,15 +157,18 @@ const styles = StyleSheet.create({
justifyContent: "flex-start",
alignItems: "stretch",
backgroundColor: "#EFEFEF",
paddingTop: 74
paddingTop: 64
},
scrollViewContainer: {
// height: 300
flex: 1,
marginBottom: 49,
},
scrollViewText: {
color: "#7A7A7A",
fontSize: 13,
marginTop: 10,
marginBottom: 10,
textAlign: "center"
},
itemContainer: {
... ...
... ... @@ -5,7 +5,8 @@ import {
Text,
View,
TouchableOpacity,
Image
Image,
AlertIOS
} from "react-native";
import myQuestion from "./myQuestion";
import MsgNotification from "./MsgNotification";
... ... @@ -16,25 +17,21 @@ export default class Mine extends Component {
super(props);
this.state = {
name: "哈哈哈",
identity: "职业代理人"
identity: "职业代理人",
};
this.saveResponse1 = this.saveResponse1.bind(this);
this.saveResponse2 = this.saveResponse2.bind(this);
}
saveResponse1(d) {
this.setState({ name: d });
}
saveResponse2(d) {
this.setState({ identity: d });
}
render() {
return (
<View style={styles.container}>
<TouchableOpacity
style={styles.header}
onPress={() => {
this.props.navigator.push({
component: PersonalInfo,
passProps: {
name: this.state.name,
identity: this.state.identity,
changeInfo: (type,text) => this.changeInfo(type,text),
}
});
}}
>
<TouchableOpacity style={styles.header}>
<View style={styles.headerLeft}>
<Image
source={require("../../assets/Mine/iconpic1.png")}
... ... @@ -42,19 +39,12 @@ export default class Mine extends Component {
/>
<Text style={styles.mineName}>{this.state.name}</Text>
</View>
<Image
source={require("../../assets/Mine/rightArrow_white.png")}
style={styles.headerRight}
/>
</TouchableOpacity>
<View style={styles.midContainer}>
<TouchableOpacity
style={styles.itemContainer}
onPress={() => {
this.props.navigator.push({
component: MsgNotification,
passProps: {}
});
AlertIOS.prompt("更改昵称", null, this.saveResponse1);
}}
>
<View style={styles.itemLeft}>
... ... @@ -62,21 +52,20 @@ export default class Mine extends Component {
style={styles.leftIcon}
source={require("../../assets/tabbar/ic_circle_s.png")}
/>
<Text style={styles.leftTitle}>消息通知</Text>
<Text style={styles.leftNum}> (11)</Text>
<Text style={styles.leftTitle}>昵称</Text>
</View>
<View style={styles.itemRight}>
<Text style={styles.itemRightContent}>{this.state.name}</Text>
<Image
style={styles.itemRightImg}
source={require("../../assets/Mine/rightArrow_gray.png")}
/>
</View>
<Image
style={styles.itemRight}
source={require("../../assets/Mine/rightArrow_gray.png")}
/>
</TouchableOpacity>
<TouchableOpacity
style={styles.itemContainer}
onPress={() => {
this.props.navigator.push({
component: myQuestion,
passProps: {}
});
AlertIOS.prompt("更改职业", null, this.saveResponse2);
}}
>
<View style={styles.itemLeft}>
... ... @@ -84,14 +73,19 @@ export default class Mine extends Component {
style={styles.leftIcon}
source={require("../../assets/tabbar/ic_circle_s.png")}
/>
<Text style={styles.leftTitle}>我的提问</Text>
<Text style={styles.leftTitle}>职业</Text>
</View>
<View style={styles.itemRight}>
<Text style={styles.itemRightContent}>{this.state.identity}</Text>
<Image
style={styles.itemRightImg}
source={require("../../assets/Mine/rightArrow_gray.png")}
/>
</View>
<Image
style={styles.itemRight}
source={require("../../assets/Mine/rightArrow_gray.png")}
/>
</TouchableOpacity>
</View>
{/* 退出登录 */}
<TouchableOpacity
style={styles.loginOut}
onLogin={this.props.onLogin}
... ... @@ -109,15 +103,15 @@ export default class Mine extends Component {
console.log("看看this是什么", this);
this.props.onLogin(false);
}
changeInfo(type,text) {
changeInfo(type, text) {
if (type == "name") {
this.setState({
name: text
})
});
} else {
this.setState({
identity: text
})
});
}
}
}
... ... @@ -216,6 +210,7 @@ const styles = StyleSheet.create({
justifyContent: "flex-start",
alignItems: "center"
},
leftIcon: {
marginRight: 11,
width: 16,
... ... @@ -225,11 +220,15 @@ const styles = StyleSheet.create({
fontSize: 15,
color: "#242424"
},
leftNum: {
fontSize: 15,
color: "#EE6723"
},
itemRight: {
flexDirection: "row",
justifyContent: "flex-start",
alignItems: "center"
},
itemRightContent: {
marginRight: 5
},
itemRightImg: {
width: 14,
height: 14
},
... ...