/** * Title: 地产详情 * Routes: * - ./src/pages/routes */ import React, { useState } from 'react'; import { connect, DispatchProp, routerRedux } from 'dva'; import { formatMessage } from 'umi-plugin-locale'; import { Button, Modal, Input } from 'antd'; import Header from '@/components/Header'; import ChoiceModal from '@/components/ChoiceModal'; import AccountItem from '@/components/AccountItem'; import { UserModelState } from '@/models/user'; import styles from './style.less'; import { IdentityModelState } from './model'; const idtypes = [ {key:'idcard', value:'身份证'}, {key:'passport', value:'护照'}] const IdentityPage: React.FC = ({ dispatch, user, nameEditable, nameInput, nameSubmitting, real1Submitting }) => { const [idtypesVisible, setIdtypesVisible] = useState(false); const onItemSelected = (key: string) => { setIdtypesVisible(false); // dispatch({ type: 'user/changeIdtype', payload: key }); }; const idtypeModal = ( setIdtypesVisible(false)} title={formatMessage({ id: 'identity.chooseIdtype' })} /> ); return (
{user &&
dispatch({ type: 'identity/onUpdateState', nameEditable: true, nameInput: user.realname, })} /> setNationsVisible(true)} /> setIdtypesVisible(true)} /> dispatch(routerRedux.push('/chphone'))} /> dispatch(routerRedux.push('/lgpwd'))} /> // 此处应当加一个label,显示后台驳回理由
}
); }; export default connect( ({ user, account }: any) => ({ ...user, ...account }), )(IdentityPage);