|
@@ -2,6 +2,7 @@ import request from '@/utils/request';
|
|
|
import { AxiosPromise } from 'axios';
|
|
|
import { LoginData, LoginResult, VerifyCodeResult, TenantInfo } from './types';
|
|
|
import { UserInfo } from '@/api/system/user/types';
|
|
|
+import { encryptWithAes, parseAesKey } from '@/utils/crypto';
|
|
|
|
|
|
// pc端固定客户端授权id
|
|
|
const clientId = import.meta.env.VITE_APP_CLIENT_ID;
|
|
@@ -16,6 +17,8 @@ export function login(data: LoginData): AxiosPromise<LoginResult> {
|
|
|
clientId: data.clientId || clientId,
|
|
|
grantType: data.grantType || 'password'
|
|
|
};
|
|
|
+ params.password = encryptWithAes(params.password, parseAesKey(params.uuid));
|
|
|
+
|
|
|
return request({
|
|
|
url: '/api/auth/login',
|
|
|
headers: {
|