React 跳转页面的时候携带参数
方法很多,后边接着更细吧,现在是记录自己遇到使用过的方式
1、通过state,在跳转的时候

router.push({
pathname: '/track',
state: { isNewIndex:2 },
});

track 页面接收数据

console.log('传递过来的isNewIndex',this.props.location.state.isNewIndex)