|
@@ -20,8 +20,7 @@ import { RoleEnum } from '/@/enums/roleEnum';
|
|
|
import { useSso } from '/@/hooks/web/useSso';
|
|
|
import { getActions } from '/@/qiankun/state';
|
|
|
import { MOCK_LOGIN_PASSWORD, MOCK_LOGIN_UESRNAME } from '../constant';
|
|
|
-import { AesEncryption } from '/@/utils/cipher';
|
|
|
-import { loginCipher } from '/@/settings/encryptionSetting';
|
|
|
+import { encrypt } from '/@/utils/ventutil';
|
|
|
|
|
|
interface UserState {
|
|
|
userInfo: Nullable<UserInfo>;
|
|
@@ -149,8 +148,7 @@ export const useUserStore = defineStore({
|
|
|
try {
|
|
|
const { goHome = true, mode, successMode, ...loginParams } = params;
|
|
|
|
|
|
- const encryption = new AesEncryption({ key: loginCipher.key, iv: loginCipher.iv });
|
|
|
-
|
|
|
+ const { key, iv, encryptData } = await encrypt(loginParams.password);
|
|
|
const data = await loginApi(loginParams, mode, successMode);
|
|
|
const { token, userInfo } = data;
|
|
|
|
|
@@ -417,8 +415,7 @@ export const useUserStore = defineStore({
|
|
|
) {
|
|
|
const { goHome = true, mode, successMode = 'none', ...loginParams } = params;
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
const data = await autoLoginApi(loginParams, mode, successMode);
|
|
|
const { token, userInfo } = data;
|
|
|
|