From 7ed5f33e7bd9ca26fb41700e518234b973841921 Mon Sep 17 00:00:00 2001 From: AprilWind <2100166581@qq.com> Date: 星期三, 24 四月 2024 22:30:52 +0800 Subject: [PATCH] !107 add 新增岗位编码与部门编码 并将岗位放到部门下 * add 新增获取岗位选择框列表 * update 岗位查询树表和单表相互undefined * update 岗位查询增加单部门查询 * update 优化类别编码与后台一致性 * add 新增岗位部门树以及类别编码 * add 部门增加类别代码 --- src/api/login.ts | 27 ++++++++++++++++++--------- 1 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/api/login.ts b/src/api/login.ts index d4ceb49..100a5e9 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 = import.meta.env.VITE_APP_CLIENT_ID; /** * @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 @@ -26,13 +29,19 @@ // 娉ㄥ唽鏂规硶 export function register(data: any) { + const params = { + ...data, + clientId: clientId, + grantType: 'password' + }; return request({ url: '/auth/register', headers: { - isToken: false + isToken: false, + isEncrypt: true }, method: 'post', - data: data + data: params }); } @@ -51,7 +60,7 @@ */ export function getCodeImg(): AxiosPromise<VerifyCodeResult> { return request({ - url: '/code', + url: '/auth/code', headers: { isToken: false }, @@ -59,14 +68,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