mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-24 13:14:16 +08:00
feat: 修复新建分组后跳转到其他分组的问题
This commit is contained in:
parent
b60ef889b9
commit
11db5f6108
@ -142,10 +142,9 @@ export default class GroupList extends Component {
|
||||
});
|
||||
await this.props.fetchGroupList();
|
||||
this.setState({ groupList: this.props.groupList });
|
||||
console.log('add', res.data.data);
|
||||
console.log('groupList', this.state.groupList);
|
||||
// this.props.setCurrGroup(res.data.data);
|
||||
this.props.setCurrGroup(this.state.groupList[1]);
|
||||
const id = res.data.data._id;
|
||||
const currGroup = _.find(this.props.groupList, (group) => { return +group._id === +id });
|
||||
this.props.setCurrGroup(currGroup);
|
||||
this.props.fetchGroupMsg(this.props.currGroup._id);
|
||||
this.props.fetchNewsData(this.props.currGroup._id, "group", 1, 10)
|
||||
} else {
|
||||
@ -167,6 +166,7 @@ export default class GroupList extends Component {
|
||||
|
||||
this.setState({ groupList: this.props.groupList });
|
||||
const currGroup = _.find(this.props.groupList, (group) => { return +group._id === +id });
|
||||
|
||||
this.props.setCurrGroup(currGroup);
|
||||
// this.props.setCurrGroup({ group_name, group_desc, _id: id });
|
||||
this.props.fetchGroupMsg(this.props.currGroup._id);
|
||||
|
@ -118,7 +118,6 @@ class ProjectList extends Component {
|
||||
return b.up_time - a.up_time;
|
||||
})
|
||||
projectData = [...followProject, ...noFollow]
|
||||
console.log('role', this.props.currGroup.role);
|
||||
return (
|
||||
<div style={{ paddingTop: '24px' }} className="m-panel card-panel card-panel-s project-list" >
|
||||
<Row className="project-list-header">
|
||||
|
Loading…
Reference in New Issue
Block a user