|
|
|
@ -41,8 +41,9 @@ class ChangeHeaderPicModal extends Component{
|
|
|
|
|
// cropper = new Cropper(image, options);
|
|
|
|
|
inputImage.value = null;
|
|
|
|
|
} else {
|
|
|
|
|
// TODO noti
|
|
|
|
|
window.alert('Please choose an image file.');
|
|
|
|
|
|
|
|
|
|
this.props.showNotification && this.props.showNotification("请选择一个图片格式的文件")
|
|
|
|
|
// window.alert('Please choose an image file.');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
@ -78,7 +79,9 @@ class ChangeHeaderPicModal extends Component{
|
|
|
|
|
.then((response) => {
|
|
|
|
|
// {"status":0,"message":"success","avatar_url":"avatars/User/15739"}
|
|
|
|
|
if (response.data.status == 0) {
|
|
|
|
|
// TODO noti
|
|
|
|
|
|
|
|
|
|
this.props.showNotification && this.props.showNotification("修改头像成功")
|
|
|
|
|
this.setVisible(false)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(function (error) {
|
|
|
|
|