|
|
@ -1,6 +1,6 @@ |
|
|
|
import React from "react"; |
|
|
|
import React from "react"; |
|
|
|
import {Button, Col, Container, Form, FormControl, Image, Row} from "react-bootstrap"; |
|
|
|
import {Button, Col, Container, Form, FormControl, Image, Row} from "react-bootstrap"; |
|
|
|
import {UserEdit} from "../entity"; |
|
|
|
import {UserEdit, UserType} from "../entity"; |
|
|
|
import {Input} from "../ui/InputGroup"; |
|
|
|
import {Input} from "../ui/InputGroup"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -14,6 +14,8 @@ export class MyInfo extends React.Component< |
|
|
|
userId?:string; |
|
|
|
userId?:string; |
|
|
|
isMyFriend:boolean; |
|
|
|
isMyFriend:boolean; |
|
|
|
isAdd:boolean; |
|
|
|
isAdd:boolean; |
|
|
|
|
|
|
|
//更新用户信息回调
|
|
|
|
|
|
|
|
onUserUpdate?:Function; |
|
|
|
}, UserEdit>{ |
|
|
|
}, UserEdit>{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -61,6 +63,7 @@ export class MyInfo extends React.Component< |
|
|
|
email:"admin@qq.com", |
|
|
|
email:"admin@qq.com", |
|
|
|
address:"上海高新区", |
|
|
|
address:"上海高新区", |
|
|
|
info:"个人简介", |
|
|
|
info:"个人简介", |
|
|
|
|
|
|
|
userType:UserType.help.toString() |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -103,6 +106,9 @@ export class MyInfo extends React.Component< |
|
|
|
contentEditable:false |
|
|
|
contentEditable:false |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this.props.onUserUpdate) { |
|
|
|
|
|
|
|
this.props.onUserUpdate({userType: this.state.userType}) |
|
|
|
|
|
|
|
} |
|
|
|
console.debug(this.state) |
|
|
|
console.debug(this.state) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -153,6 +159,14 @@ export class MyInfo extends React.Component< |
|
|
|
<FormControl value={this.state.email} onChange={(e)=>this.setState({email:e.target.value})}/> |
|
|
|
<FormControl value={this.state.email} onChange={(e)=>this.setState({email:e.target.value})}/> |
|
|
|
:this.state.email} |
|
|
|
:this.state.email} |
|
|
|
</Col> |
|
|
|
</Col> |
|
|
|
|
|
|
|
<Col className="border-info border p-3 text-center"> |
|
|
|
|
|
|
|
{this.state.contentEditable? |
|
|
|
|
|
|
|
<FormControl value={this.state.userType} as={"select"} onChange={(e)=>this.setState({userType:e.target.value})}> |
|
|
|
|
|
|
|
<option value={UserType.help}>服务发起者</option> |
|
|
|
|
|
|
|
<option value={UserType.seekHelp}>服务接受者</option> |
|
|
|
|
|
|
|
</FormControl>: |
|
|
|
|
|
|
|
this.state.userType===UserType.help?"等待接受帮助":"等待前往帮助"} |
|
|
|
|
|
|
|
</Col> |
|
|
|
</Row> |
|
|
|
</Row> |
|
|
|
<Row> |
|
|
|
<Row> |
|
|
|
<Col className="border-info border p-3 text-center"> |
|
|
|
<Col className="border-info border p-3 text-center"> |
|
|
|