首先你需要import { Link, routerRedux } from 'dva/router';
在方法里跳转用
function applyJobHandler(){
dispatch(routerRedux.push(`/jobapply?jid=${jobinfo.id}&jtype=${jobinfo.zptype}&jname=${jobinfo.name}&jrtime=${jobinfo.releasetime}&jcity=${jobinfo.city}`));
}
参数可以用
import queryString from 'query-string';
const query = queryString.parse(location.search);
在render里面跳转用
<Link to={{ pathname: (item.type == "1" ? "/cv/school/" : "/cv/society/") + item.id, search: "view=true" }}><span className={styles.iconview}>预览</span></Link>
const view = queryString.parse(location.search).view == "true" ? true : false;