import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Picker, DatePicker, Progress, Toast } from 'antd-mobile'; import router from 'umi/router'; import { formatDatetime } from '../../../utils/helper'; import 'antd-mobile/dist/antd-mobile.less'; import styles from './index.less'; const CustomChildren = props => { return (
{props.extra}
); }; @connect(({ info }) => ({ info })) class Index extends Component { constructor(props) { super(props); this.state = { progressFlag: false, percent: 0, }; } componentDidMount = () => { document.title = '猫只鉴定信息'; }; uploadImgs = e => { const name = e.target.name; this.props.dispatch({ type: 'info/updateState', payload: { [name + 'Value']: e.target.value, }, }); this.setState({ progressFlag: true, }); this.props.dispatch({ type: 'info/uploadImgs', payload: { name: name, files: e.target.files, }, progress: progressEvent => { if (progressEvent.lengthComputable) { this.setState({ percent: (progressEvent.loaded / progressEvent.total) * 100, }); } else { this.setState({ percent: 0.5, }); } }, callback: () => { this.setState({ percent: 0, progressFlag: false, }); }, }); }; delete = name => { this.props.dispatch({ type: 'info/updateState', payload: { [name]: null, [name + 'Url']: null, [name + 'Value']: '', }, }); }; uploadVod = e => { const name = e.target.name; this.props.dispatch({ type: 'info/updateState', payload: { [name + 'Value']: e.target.value, }, }); this.setState({ progressFlag: true, }); this.props.dispatch({ type: 'info/uploadVod', payload: { name: name, files: e.target.files, }, progress: progressEvent => { if (progressEvent.lengthComputable) { this.setState({ percent: (progressEvent.loaded / progressEvent.total) * 100, }); } else { this.setState({ percent: 0.5, }); } }, callback: flag => { if ('toBig' === flag) { Toast.fail('视频大于200M'); } this.setState({ percent: 0, progressFlag: false, }); }, }); }; save = () => { this.props.dispatch({ type: 'info/save', payload: {}, }); }; onChangeText = type => e => { this.props.dispatch({ type: 'info/updateState', payload: { [type]: e.target.value, }, }); }; onChangePicker = type => v => { let value = null; if (v instanceof Date) { value = formatDatetime(v, 'YYYY-MM-DD'); } else { value = v[0]; } this.props.dispatch({ type: 'info/updateState', payload: { [type]: value, }, }); }; render() { const { referee, dogOwnerName, mobile, wxcard, province, city, area, address, dogBreed, dogColor, dogGender, dogName, dogBirthdate, image1Url, image1Value, image2Url, image2Value, image3Url, image3Value, image4Url, image4Value, image5Url, image5Value, image6Url, image6Value, image7Url, image7Value, image8Url, image8Value, image9Url, image9Value, image10Url, image10Value, image11Url, image11Value, image12Url, image12Value, } = this.props.info; const { progressFlag, percent } = this.state; return (
{progressFlag ? (
) : null}
推荐人
猫主信息
姓名
手机号码
微信号
地址
{ router.push('/catAppraisals/info/locationPicker'); }} className={`${styles.select} ${styles.placeholder}`} > {province ? `${province}${city}${area}` : '请在地图选择地址'}
详细地址

鉴定通过我们将根据您填写的详细地址直接为您邮寄证书, 邮寄方式为顺丰到付,请您注意查收!

猫只信息
申请猫种
毛色
猫只性别
猫名
出生日期

报名鉴定猫只最小年龄为3月龄(以申请当天时间为准)

猫只静态照片
{image1Url ? (
{ this.delete('image1'); }} >
) : null} 头部-正面
{image2Url ? (
{ this.delete('image2'); }} >
) : null} 头部-侧面
{image3Url ? (
{ this.delete('image3'); }} >
) : null} 头部-额顶
{image4Url ? (
{ this.delete('image4'); }} >
) : null} 头部-牙齿
{image5Url ? (
{ this.delete('image5'); }} >
) : null} 身体-正面
{image6Url ? (
{ this.delete('image6'); }} >
) : null} 身体-侧面
{image7Url ? (
{ this.delete('image7'); }} >
) : null} 身体-前爪垫
{image8Url ? (
{ this.delete('image8'); }} >
) : null} 身体-后爪垫
{image9Url ? (
{ this.delete('image9'); }} >
) : null} 身体-尾巴
{image10Url ? (
{ this.delete('image10'); }} >
) : null} 身体-腹部
{image11Url ? (
{ this.delete('image11'); }} >
) : null} 毛发-背部
{image12Url ? (
{ this.delete('image12'); }} >
) : null} 毛发-毛质
); } } export default Index;