继承自React.Component的
this.props.location.query对象下
有当前url的各种查询参数。
简单的例子:在控制台打印这个对象
import React from 'react'; class Hello extends React.Component{ constructor(props) { super(props); console.log(this.props.location.query); } render() { return(<div>我是hello页面</div>); } } module.exports = Hello;