import React, { Component } from 'react'; import { connect } from 'react-redux'; import DocumentTitle from 'react-document-title'; import 'antd-mobile/dist/antd-mobile.less'; import styles from './index.less'; import router from 'umi/router'; @connect(({ registrationCard }) => ({ registrationCard })) class Index extends Component { constructor(props) { super(props); this.state = { flag: false, }; } componentWillMount = () => {}; componentDidMount = () => { const { id } = this.props.location.query; if (id) { this.props.dispatch({ type: 'registrationCard/birthcertificateInfo', payload: { id, }, }); } }; componentWillUnmount = () => { this.props.dispatch({ type: 'registrationCard/clean', }); }; show = () => { const { flag } = this.state; this.setState({ flag: !flag, }); }; render() { const { flag } = this.state; const { id, dogGender, dogName, dogBreed, birthCerRegCode, snCode, colorFlag, dogBirthday, noseCode, identificationFlag, cabPassport, registerGrade, registerGradeDesc, canApplyPedigreeCertifiedFlag, } = this.props.registrationCard; return (
{id ? (
宠物身份电子登记卡
{dogName} {dogBreed} Alaska
{birthCerRegCode ? ( No.{birthCerRegCode} ) : null} {snCode ? (
识别码{flag ? snCode : '******'}
) : null}
犬只性别 {dogGender === '1' ? ( ) : ( )}
{colorFlag ? (
犬只毛色 {colorFlag}
) : null} {dogBirthday ? (
出生日期 {dogBirthday}
) : null} {noseCode ? (
鼻纹编号 {noseCode}
) : null} {identificationFlag ? (
芯片号码 {identificationFlag}
) : null} {cabPassport ? (
宠爱护照号 {cabPassport}
) : null} {registerGrade ? (
宠物等级 {registerGradeDesc} { router.push('/ckuh5/gradeDesc'); }} >
) : null}
) : null} {canApplyPedigreeCertifiedFlag === '1' ? (
{ router.push(`/ckuh5/ckuApply?birthCode=${birthCerRegCode}`); }} > 血统证书申请
) : null}
); } } export default Index;