|
|
|
@ -2,6 +2,7 @@ import {defHttp} from '/@/utils/http/axios';
@@ -2,6 +2,7 @@ import {defHttp} from '/@/utils/http/axios';
|
|
|
|
|
import {GetCaptchaModel, GetUserInfoModel, LoginParams, LoginResultModel,} from './model/userModel'; |
|
|
|
|
import {encryptionLogin} from '/@/utils/cipher'; |
|
|
|
|
import qs from 'qs'; |
|
|
|
|
import {RequestOptions} from "/#/axios"; |
|
|
|
|
|
|
|
|
|
enum Api { |
|
|
|
|
Login = '/auth_proxy/oauth/token', |
|
|
|
@ -11,11 +12,8 @@ enum Api {
@@ -11,11 +12,8 @@ enum Api {
|
|
|
|
|
GetCaptcha = '/code', |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @description: user login api |
|
|
|
|
*/ |
|
|
|
|
export function loginApi(params: LoginParams) { |
|
|
|
|
|
|
|
|
|
/** 用户登录接口 */ |
|
|
|
|
export function loginApi(params: LoginParams, options?: boolean | RequestOptions) { |
|
|
|
|
// 非对称密钥ASE加密处理
|
|
|
|
|
const user = encryptionLogin({ |
|
|
|
|
data: params, |
|
|
|
@ -38,7 +36,7 @@ export function loginApi(params: LoginParams) {
@@ -38,7 +36,7 @@ export function loginApi(params: LoginParams) {
|
|
|
|
|
}, |
|
|
|
|
params: { code, realKey, grant_type, scope }, |
|
|
|
|
data: data |
|
|
|
|
}); |
|
|
|
|
}, <RequestOptions>options); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|