import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; import { WeaDialogFooter, WeaLocaleProvider } from 'ecCom'; import {Spin} from 'antd'; import FormInfo from '../../coms/FormInfo'; import { i18n } from '../../public/i18n'; import '../../style/index.css'; const { getLocaleLabelByLang } = WeaLocaleProvider; @inject('hrmForgetPassword') @observer export default class ForgetPassword extends Component { constructor(props) { super(props); this.state = { show: false } } componentDidMount() { const { location } = this.props; setTimeout(() => { getLocaleLabelByLang('common,hrm', location.query.langid).then(() => { this.init(); }) }, 500) } componentWillReceiveProps(nextProps) { this.init(); } getDialogInfo = () => { return top.window.getParentDialog(); } init = () => { const { hrmForgetPassword: store, location } = this.props; store.initData(location.query.langid, this.getDialogInfo, () => this.setState({show:true})); } render() { const { hrmForgetPassword: store, } = this.props const { refreshForm, formTarget, itemRender, step, topBtnAndMenu, spinning } = store; const { findPasswordForm, findPasswordFormFields, checkForm, checkFormFields, passwordForm, passwordFormFields } = formTarget; const { btns, menus } = topBtnAndMenu(); return (
{ step === 1 && } { step === 2 &&
} { step === 3 && }
{ this.state.show && }
) } }