From f801f4fb11ff8ca08417a9ddf0231fb570fa26e3 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期一, 24 七月 2023 16:47:51 +0800 Subject: [PATCH] fix 修复 固定页面header穿模问题 --- src/api/login.ts | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/api/login.ts b/src/api/login.ts index d4ceb49..ef7346b 100644 --- a/src/api/login.ts +++ b/src/api/login.ts @@ -2,7 +2,9 @@ import { AxiosPromise } from 'axios'; import { LoginData, LoginResult, VerifyCodeResult, TenantInfo } from './types'; import { UserInfo } from '@/api/system/user/types'; -import { da } from 'element-plus/es/locale'; + +// pc绔浐瀹氬鎴风鎺堟潈id +const clientId = 'e5cd7e4891bf95d1d19206ce24a7b32e'; /** * @param data {LoginData} @@ -11,13 +13,14 @@ export function login(data: LoginData): AxiosPromise<LoginResult> { const params = { ...data, - clientId: data.clientId || 'e5cd7e4891bf95d1d19206ce24a7b32e', + clientId: data.clientId || clientId, grantType: data.grantType || 'password' }; return request({ url: '/auth/login', headers: { - isToken: false + isToken: false, + isEncrypt: true }, method: 'post', data: params @@ -51,7 +54,7 @@ */ export function getCodeImg(): AxiosPromise<VerifyCodeResult> { return request({ - url: '/code', + url: '/auth/code', headers: { isToken: false }, @@ -59,14 +62,14 @@ timeout: 20000 }); } + /** * 绗笁鏂圭櫥褰� - * @param source 绗笁鏂圭櫥褰曠被鍨� - * */ + */ export function callback(data: LoginData): AxiosPromise<any> { const LoginData = { ...data, - clientId: 'e5cd7e4891bf95d1d19206ce24a7b32e', + clientId: clientId, grantType: 'social' }; return request({ -- Gitblit v1.9.3