dev_forum
hjm 5 years ago
parent 80e189b353
commit 762f3a413d

@ -101,7 +101,11 @@ class AccountBasic extends Component {
this.props.form.validateFieldsAndScroll((err, values) => {
console.log(values);
let {basicInfo}=this.props;
if(!err){
// TODO 为什么modal里的form影响到这里的了
if (err) {
delete err.depart
}
if(!err || Object.keys(err).length == 0){
let url=`/users/accounts/${basicInfo.id}.json`
axios.put((url),{
nickname:values.nickname,
@ -117,7 +121,9 @@ class AccountBasic extends Component {
department_id:this.state.department_id
}).then((result)=>{
if(result){
this.props.showNotification('保存成功')
this.props.getBasicInfo();
this.props.history.push('/account/profile')
}
}).catch((error)=>{
console.log(error);

Loading…
Cancel
Save