dev_forum
hjm 5 years ago
parent a4910c2f8f
commit a107be221c

@ -102,7 +102,7 @@ class Cropper extends Component {
setTimeout(() => {
const image = document.getElementById(this.props.imageId || '__image');
this.cropper = new window.Cropper(image, this.options);
}, 1000)
}, 1200)
}
renew = (image) => {

@ -194,7 +194,7 @@ class UseBank extends Component{
display: -webkit-flex;
}
.setImgW .edu-nodata-img{
width:218px !important;
width: 170px !important;
}
.bankwidth{
width:24% !important;

@ -105,11 +105,16 @@ class ChangeHeaderPicModal extends Component{
.then((response) => {
// {"status":0,"message":"success","avatar_url":"avatars/User/15739"}
if (response.data.status == 0) {
// this.props.getBasicInfo()
this.props.fetchUser()
// 头像更新后会触发AccountPage的DidUpdate然后会调用getBasicInfo
this.props.showNotification && this.props.showNotification("修改头像成功")
this.setVisible(false)
// this.props.getBasicInfo()
// https://www.trustie.net/issues/22461
if ( this.props.current_user.image_url.indexOf('avatars/User/b') != -1
|| this.props.current_user.image_url.indexOf('avatars/User/g') != -1 ) {
this.setTimeout(() => {
this.doAfterUpdated()
}, 1000)
} else {
this.doAfterUpdated();
}
}
})
.catch(function (error) {
@ -117,6 +122,12 @@ class ChangeHeaderPicModal extends Component{
});
});
}
doAfterUpdated = () => {
this.props.fetchUser()
// 头像更新后会触发AccountPage的DidUpdate然后会调用getBasicInfo
this.props.showNotification && this.props.showNotification("修改头像成功")
this.setVisible(false)
}
render(){
const { course_lists } = this.state

Loading…
Cancel
Save