|
@@ -39,6 +39,9 @@ export default class PersonalInfo extends BasePage {
|
|
|
cisys: "北京市",
|
|
|
grade_text: "七年级",
|
|
|
grade_index: 6,
|
|
|
+ birthday_year: 0,
|
|
|
+ birthday_month: 0,
|
|
|
+ birthday_day: 0,
|
|
|
birthday_time: 0
|
|
|
};
|
|
|
updateState(data) {
|
|
@@ -64,6 +67,9 @@ export default class PersonalInfo extends BasePage {
|
|
|
<BirthdayModal
|
|
|
ref={view => (this.birthdaymodal = view)}
|
|
|
birthdaycommit={this.birthdaycommit.bind(this)}
|
|
|
+ year={this.state.birthday_year}
|
|
|
+ month={this.state.birthday_month}
|
|
|
+ day={this.state.birthday_day}
|
|
|
/>
|
|
|
<StatusBar backgroundColor={"transparent"} translucent={true} />
|
|
|
|
|
@@ -520,11 +526,18 @@ export default class PersonalInfo extends BasePage {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- // userInfo123() {
|
|
|
- // return (
|
|
|
-
|
|
|
- // );
|
|
|
- // }
|
|
|
+ componentWillMount() {
|
|
|
+ var date = new Date();
|
|
|
+ var year = date.getFullYear().toString();
|
|
|
+ var month = (date.getMonth() + 1).toString();
|
|
|
+ var day = date.getDate().toString();
|
|
|
+ this.setState({
|
|
|
+ birthday_year: year,
|
|
|
+ birthday_month: month,
|
|
|
+ birthday_day: day,
|
|
|
+ birthday_time: year + "年" + month + "月" + day + "日"
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
getArraowImg(type) {
|
|
|
return (
|
|
@@ -618,7 +631,7 @@ export default class PersonalInfo extends BasePage {
|
|
|
|
|
|
cityscommit(provinces_name, citys_name) {
|
|
|
this.setState({
|
|
|
- cisys: provinces_name + citys_name
|
|
|
+ cisys: provinces_name + "-" + citys_name
|
|
|
});
|
|
|
}
|
|
|
commitGrade(text, index) {
|
|
@@ -627,9 +640,9 @@ export default class PersonalInfo extends BasePage {
|
|
|
grade_index: index
|
|
|
});
|
|
|
}
|
|
|
- birthdaycommit(time) {
|
|
|
+ birthdaycommit(year, month, day) {
|
|
|
this.setState({
|
|
|
- birthday_time: time
|
|
|
+ birthday_time: year + "年" + month + "月" + day + "日"
|
|
|
});
|
|
|
}
|
|
|
}
|