密码规则获取方式

This commit is contained in:
2021-07-08 17:13:32 +08:00
parent 3b8271a204
commit e8c14697da

View File

@@ -23,13 +23,6 @@ export default class form extends Component {
open = () => { open = () => {
this.setState({ visible: true }) this.setState({ visible: true })
}
/**
* mount后回调
*/
componentDidMount() {
this.props.created && this.props.created(this)
api.getPwdRule({}).then(({ success, data, message }) => { api.getPwdRule({}).then(({ success, data, message }) => {
if (success) { if (success) {
const { pattern, descriptions } = data const { pattern, descriptions } = data
@@ -43,6 +36,13 @@ export default class form extends Component {
}) })
} }
/**
* mount后回调
*/
componentDidMount() {
this.props.created && this.props.created(this)
}
updatePwd(values) { updatePwd(values) {
let { password, newPassword } = values.current.getFieldsValue() let { password, newPassword } = values.current.getFieldsValue()
password = encryptByRSA(password, RSA_PUBLIC_KEY) password = encryptByRSA(password, RSA_PUBLIC_KEY)