mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-18 13:04:46 +08:00
Merge branch 'dev' of http://gitlab.corp.qunar.com/mfe/yapi into dev
This commit is contained in:
commit
9d2f4f96a6
@ -52,18 +52,19 @@ export default class InterfaceColContent extends Component {
|
||||
result.payload.data.data.find(item => +item._id === +currColId) && +currColId ||
|
||||
result.payload.data.data[0]._id;
|
||||
this.props.history.push('/project/' + params.id + '/interface/col/' + currColId)
|
||||
this.props.fetchCaseList(currColId);
|
||||
this.props.setColData({currColId: +currColId, isShowCol: true})
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
const { interfaceColList } = nextProps;
|
||||
const { actionId: oldCaseId, id } = this.props.match.params
|
||||
let newCaseId = nextProps.match.params.actionId
|
||||
if (!interfaceColList.find(item => +item._id === +newCaseId)) {
|
||||
const { actionId: oldColId, id } = this.props.match.params
|
||||
let newColId = nextProps.match.params.actionId
|
||||
if (!interfaceColList.find(item => +item._id === +newColId)) {
|
||||
this.props.history.push('/project/' + id + '/interface/col/' + interfaceColList[0]._id)
|
||||
} else if (oldCaseId !== newCaseId) {
|
||||
this.props.fetchCaseList(newCaseId);
|
||||
this.props.setColData({currColId: +newCaseId, isShowCol: true})
|
||||
} else if (oldColId !== newColId) {
|
||||
this.props.fetchCaseList(newColId);
|
||||
this.props.setColData({currColId: +newColId, isShowCol: true})
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user