|
@ -3,6 +3,7 @@ import React from 'react'; |
|
|
import { Menu } from 'antd'; |
|
|
import { Menu } from 'antd'; |
|
|
import { Link } from 'react-router-dom'; |
|
|
import { Link } from 'react-router-dom'; |
|
|
import { connect } from 'react-redux'; |
|
|
import { connect } from 'react-redux'; |
|
|
|
|
|
import CryptoJS from 'crypto-js'; |
|
|
import styles from './style.css'; |
|
|
import styles from './style.css'; |
|
|
import { |
|
|
import { |
|
|
MenuFoldOutlined, MenuUnfoldOutlined, UserOutlined, LogoutOutlined |
|
|
MenuFoldOutlined, MenuUnfoldOutlined, UserOutlined, LogoutOutlined |
|
@ -12,7 +13,12 @@ const Header = props => { |
|
|
const { dispatch, history, user, pathname, toggleCollapsed, collapsed, actions } = props |
|
|
const { dispatch, history, user, pathname, toggleCollapsed, collapsed, actions } = props |
|
|
|
|
|
|
|
|
const onFinish = async (values) => { |
|
|
const onFinish = async (values) => { |
|
|
const dataToSave = { ...values } |
|
|
const secretKey = "freesun"; |
|
|
|
|
|
const dataToSave = { |
|
|
|
|
|
...values, |
|
|
|
|
|
oldpassword: CryptoJS.AES.encrypt(values.oldpassword, secretKey).toString(), |
|
|
|
|
|
password: CryptoJS.AES.encrypt(values.password, secretKey).toString(), |
|
|
|
|
|
} |
|
|
return dispatch( |
|
|
return dispatch( |
|
|
actions.memberManagement.modifyUser(user.id, dataToSave, values?.msg || ''), |
|
|
actions.memberManagement.modifyUser(user.id, dataToSave, values?.msg || ''), |
|
|
).then((res) => { |
|
|
).then((res) => { |
|
|