import React from 'react'; import { connect } from 'react-redux'; import router from 'umi/router'; import styles from './index.less'; @connect(({ dogGroup }) => ({ dogGroup })) class DogBreed extends React.PureComponent { componentWillMount = () => { this.props.dispatch({ type: 'dogGroup/getFciDogAll', payload: {}, }); }; componentDidMount = () => {}; componentWillUnmount = () => {}; onChange = () => e => { let value = e.target.value; this.props.dispatch({ type: 'dogGroup/getResultList', payload: { value, }, }); }; goDetail = typeNo => { router.push(`/breed/detail?typeNo=${typeNo}`); }; render() { const { value, resultList } = this.props.dogGroup; return (
{ window.scrollTo(0, 0); }} /> 搜索
{resultList ? resultList.map((data, index) => { return (
{ this.goDetail(data.type_no); }} className={styles.breed_l_tr} > {data.chinese_breed_name}
); }) : null}
); } } export default DogBreed;