diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js b/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js index a92fd378..a9006367 100644 --- a/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js +++ b/pc4mobx/hrmSalary/pages/mobilePayroll/secondaryVerify.js @@ -8,7 +8,6 @@ * @description: */ import React, { Component } from "react"; -import ReactDom from "react-dom"; import { WeaLocaleProvider } from "ecCom"; import { WeaForm, WeaSwitch } from "comsMobx"; import { message } from "antd"; @@ -24,7 +23,7 @@ const getLabel = WeaLocaleProvider.getLabel; class SecondaryVerify extends Component { constructor(props) { super(props); - this.state = { notSetting: false }; + this.state = { notSetting: false, visible: false }; } componentDidMount() { @@ -36,7 +35,7 @@ class SecondaryVerify extends Component { } componentWillUnmount() { - form.resetForm(); + this.setState({ notSetting: false, visible: false }, () => form.resetForm()); } doSecondAuth = () => { @@ -57,12 +56,10 @@ class SecondaryVerify extends Component { } }); }; - handleSetSecondaryPassword = () => { - ReactDom.render(, document.getElementById("container")); - }; + handleSetSecondaryPassword = () => this.setState({ visible: false }); render() { - const { notSetting } = this.state; + const { notSetting, visible } = this.state; const itemRender = { authCode: (field, textAreaProps, form, formParams) => { return ( @@ -80,6 +77,9 @@ class SecondaryVerify extends Component { return ( + { + visible && + } ); } }