mirror of
https://github.com/timepill/timepill-app.git
synced 2025-05-25 19:59:13 +08:00
修复bug: 用户头像上传不更新问题
This commit is contained in:
parent
01991e9293
commit
4cf622c40d
2 changed files with 12 additions and 2 deletions
|
@ -8,7 +8,13 @@ export default class UserIcon extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
iconUrl : props.iconUrl
|
iconUrl: props.iconUrl
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
static getDerivedStateFromProps(nextProps, prevState) {
|
||||||
|
return {
|
||||||
|
iconUrl: nextProps.iconUrl
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -241,12 +241,16 @@ export default class WritePage extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
saveDiary() {
|
saveDiary() {
|
||||||
|
if(!this.state.content) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let photoUri = this.state.photoUri;
|
let photoUri = this.state.photoUri;
|
||||||
let topic = this.props.topic ? 1 : 0;
|
let topic = this.props.topic ? 1 : 0;
|
||||||
|
|
||||||
let waitingToast = Msg.showMsg('正在保存中', {
|
let waitingToast = Msg.showMsg('正在保存中', {
|
||||||
duration: 10000,
|
duration: 10000,
|
||||||
position: -150,
|
position: -75,
|
||||||
shadow: false,
|
shadow: false,
|
||||||
hideOnPress: false
|
hideOnPress: false
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue