(fix) 修复修改密码问题 (#2060)
Some checks are pending
supersonic CentOS CI / build (21) (push) Waiting to run
supersonic mac CI / build (21) (push) Waiting to run
supersonic ubuntu CI / build (21) (push) Waiting to run
supersonic windows CI / build (21) (push) Waiting to run

Co-authored-by: williamhliu <williamhliu@tencent.com>
This commit is contained in:
williamhliu
2025-02-16 10:56:51 +08:00
committed by GitHub
parent d6620e6ea7
commit f804371134
5 changed files with 13 additions and 25 deletions

View File

@@ -3,7 +3,8 @@ import { Form, Input, message, Modal } from 'antd';
import { useBoolean } from 'ahooks';
import { changePassword } from '@/services/user';
import { pick } from 'lodash';
import { encryptPassword, encryptKey } from '@/utils/utils';
import { encryptPassword } from '@/utils/utils';
import CryptoJS from 'crypto-js';
export interface IRef {
open: () => void;
@@ -14,6 +15,7 @@ const ChangePasswordModal = forwardRef<IRef>((_, ref) => {
const [form] = Form.useForm();
const [open, { setTrue: openModal, setFalse: closeModal }] = useBoolean(false);
const [confirmLoading, { set: setConfirmLoading }] = useBoolean(false);
const encryptKey = CryptoJS.enc.Utf8.parse('supersonic@2024');
useImperativeHandle(ref, () => ({
open: () => {