Skip to content

Commit

Permalink
fix: 兼容没有parent_id的分类表结构数据
Browse files Browse the repository at this point in the history
  • Loading branch information
czyzeyong committed Nov 9, 2020
1 parent b07ad35 commit 93ec83a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ class InterfaceMenu extends Component {

async getList() {
let r = await this.props.fetchInterfaceListMenu(this.props.projectId);
r.payload.data.data.forEach(item => {
item.parent_id = item.parent_id || 0
})
this.setState({
list: r.payload.data.data
});
Expand Down

0 comments on commit 93ec83a

Please sign in to comment.