import React from 'react'; import { Input, Button, Select, Form, Radio, Upload, Icon, DatePicker, Spin } from 'antd'; import './base.less'; const FormItem = Form.Item; const Option = Select.Option; const RadioGroup = Radio.Group; import weixin from '../../../../image/weixin-w.png'; import qq from '../../../../image/qq-w.png'; import weibo from '../../../../image/weibo-w.png'; import card1 from '../../../../image/idcard1.jpg'; import card2 from '../../../../image/idcard2.jpg'; const BaseFrom = Form.create()(React.createClass({ handleSubmit(e) { e.preventDefault(); this.props.form.validateFields((err, values) => { if (!err) { console.log('Received values of form: ', values); } }); }, normFile(e) { if (Array.isArray(e)) { return e; } return e && e.fileList; }, checkidNum(rule, value, callback) { const form = this.props.form; if (value && value !== form.getFieldValue('password')) { callback('Two passwords that you enter is inconsistent!'); } else { callback(); } }, checkUpload(file) { const isJPG = file.type === 'image/jpeg'; if (!isJPG) { callback('You can only upload JPG file!'); } const isLt2M = file.size / 1024 / 1024 < 2; if (!isLt2M) { callback('Image must smaller than 2MB!'); } return isJPG && isLt2M; }, checkPhone(rule, value, callback) { const form = this.props.form; if (!(/^1[34578]\d{9}$/.test(value))) { callback('请输入正确的手机号码!'); } else { callback(); } }, render() { const { getFieldDecorator } = this.props.form; const formItemLayout = { labelCol: { span: 3 }, wrapperCol: { span: 12 }, }; return (
); }, })); const Base = React.createClass({ getInitialState() { return { loading: false, userid: '1234567', userphone: '13512345678', zoneState: '0' }; }, render() { return (