组件用withRouter包裹
获取url里面的数字id 进行查询
比如url是 localhost:3000/#/product/parts/265 输出['265'] 可以拿这个id进行查询
const { location } = this.props;
let pathSnippets = location.pathname.split('/').filter(i => i);
// 过滤数字类型
let componentId = pathSnippets.filter(i => {
return !isNaN(i);
});