diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/FilterChainUtils.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/FilterChainUtils.java index 7a7c114c34..680925e6b4 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/FilterChainUtils.java +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/FilterChainUtils.java @@ -13,8 +13,12 @@ public class FilterChainUtils { filterChainDefinitionMap.put("/authentication/get-list", "anon"); filterChainDefinitionMap.put("/we_com/info", "anon"); filterChainDefinitionMap.put("/ding_talk/info", "anon"); + filterChainDefinitionMap.put("/lark/info", "anon"); + filterChainDefinitionMap.put("/lark_suite/info", "anon"); filterChainDefinitionMap.put("/sso/callback/we_com", "anon"); filterChainDefinitionMap.put("/sso/callback/ding_talk", "anon"); + filterChainDefinitionMap.put("/sso/callback/lark", "anon"); + filterChainDefinitionMap.put("/sso/callback/lark_suite", "anon"); filterChainDefinitionMap.put("/setting/get/platform/param", "anon"); filterChainDefinitionMap.put("/signout", "anon"); filterChainDefinitionMap.put("/is-login", "anon"); diff --git a/frontend/src/api/modules/user/index.ts b/frontend/src/api/modules/user/index.ts index 6819165b24..42ffaa584e 100644 --- a/frontend/src/api/modules/user/index.ts +++ b/frontend/src/api/modules/user/index.ts @@ -8,10 +8,14 @@ import { EnableAPIKEYUrl, EnableLocalConfigUrl, GeDingInfoUrl, + GeLarkInfoUrl, + GeLarkSuiteInfoUrl, GetAPIKEYListUrl, getAuthenticationUrl, GetDingCallbackUrl, GetInfoUrl, + GetLarkCallbackUrl, + GetLarkSuiteCallbackUrl, GetLocalConfigUrl, GetMenuListUrl, GetPlatformAccountUrl, @@ -48,7 +52,7 @@ import type { UpdateLocalConfigParams, UpdatePswParams, } from '@/models/user'; -import { DingInfo, WecomInfo } from '@/models/user'; +import { DingInfo, LarkInfo, WecomInfo } from '@/models/user'; import type { RouteRecordNormalized } from 'vue-router'; @@ -89,6 +93,23 @@ export function getDingInfo() { export function getDingCallback(code: string) { return MSR.get({ url: GetDingCallbackUrl, params: { code } }); } + +export function getLarkInfo() { + return MSR.get({ url: GeLarkInfoUrl }, { ignoreCancelToken: true, errorMessageMode: 'none' }); +} + +export function getLarkCallback(code: string) { + return MSR.get({ url: GetLarkCallbackUrl, params: { code } }); +} + +export function getLarkSuiteInfo() { + return MSR.get({ url: GeLarkSuiteInfoUrl }, { ignoreCancelToken: true, errorMessageMode: 'none' }); +} + +export function getLarkSuiteCallback(code: string) { + return MSR.get({ url: GetLarkSuiteCallbackUrl, params: { code } }); +} + export function logout() { return MSR.get({ url: LogoutUrl }); } diff --git a/frontend/src/api/requrls/user.ts b/frontend/src/api/requrls/user.ts index 6c3ab64430..b02fdf6c4d 100644 --- a/frontend/src/api/requrls/user.ts +++ b/frontend/src/api/requrls/user.ts @@ -31,3 +31,7 @@ export const GetWeComCallbackUrl = '/sso/callback/we_com'; // 获取企业微信 export const GetPlatformParamUrl = '/setting/get/platform/param'; export const GeDingInfoUrl = '/ding_talk/info'; // 获取企业微信登陆的配置信息 export const GetDingCallbackUrl = '/sso/callback/ding_talk'; // 获取企业微信登陆的回调信息 +export const GeLarkInfoUrl = '/lark/info'; // 获取飞书登陆的配置信息 +export const GetLarkCallbackUrl = '/sso/callback/lark'; // 获取飞书登陆的回调信息 +export const GeLarkSuiteInfoUrl = '/lark_suite/info'; // 获取国际飞书登陆的配置信息 +export const GetLarkSuiteCallbackUrl = '/sso/callback/lark_suite'; // 获取国际飞书登陆的回调信息 diff --git a/frontend/src/models/user.ts b/frontend/src/models/user.ts index 9037925324..9f39abcfbb 100644 --- a/frontend/src/models/user.ts +++ b/frontend/src/models/user.ts @@ -28,6 +28,13 @@ export interface DingInfo { callBack?: string; } +// 飞书对接信息 +export interface LarkInfo { + agentId?: string; + state?: string; + callBack?: string; +} + // 更新本地执行配置 export interface UpdateLocalConfigParams { id: string; diff --git a/frontend/src/router/constants.ts b/frontend/src/router/constants.ts index b4914ee808..6fca4e1327 100644 --- a/frontend/src/router/constants.ts +++ b/frontend/src/router/constants.ts @@ -3,6 +3,7 @@ export const WHITE_LIST = [ { name: 'notFound', path: '/notFound', children: [] }, { name: 'invite', path: '/invite', children: [] }, { name: 'index', path: '/index', children: [] }, + { name: 'loginRedirect', path: '/qrcode/transition', children: [] }, { name: 'share', path: '/share', diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 5952bf26b3..d58c97cff2 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -6,6 +6,7 @@ import appRoutes from './routes'; import { INDEX_ROUTE, INVITE_ROUTE, + LOGIN_REDIRECT, NO_PROJECT, NO_RESOURCE, NOT_FOUND_RESOURCE, @@ -39,6 +40,7 @@ const router = createRouter({ NO_PROJECT, NO_RESOURCE, INDEX_ROUTE, + LOGIN_REDIRECT, ], scrollBehavior() { return { top: 0 }; diff --git a/frontend/src/router/routes/base.ts b/frontend/src/router/routes/base.ts index c2ff99e38a..63f4deb9cb 100644 --- a/frontend/src/router/routes/base.ts +++ b/frontend/src/router/routes/base.ts @@ -75,3 +75,9 @@ export const NOT_FOUND_RESOURCE: RouteRecordRaw = { name: 'notResourceScreen', component: () => import('@/views/base/not-resource-screen/not-resource-screen.vue'), }; + +export const LOGIN_REDIRECT: RouteRecordRaw = { + path: '/qrcode/transition', + name: 'loginRedirect', + component: () => import('@/views/base/login-redirect/index.vue'), +}; diff --git a/frontend/src/views/base/login-redirect/index.vue b/frontend/src/views/base/login-redirect/index.vue new file mode 100644 index 0000000000..e54fced70b --- /dev/null +++ b/frontend/src/views/base/login-redirect/index.vue @@ -0,0 +1,68 @@ + + + diff --git a/frontend/src/views/login/components/larkQrCode.vue b/frontend/src/views/login/components/larkQrCode.vue new file mode 100644 index 0000000000..e3ee10abbb --- /dev/null +++ b/frontend/src/views/login/components/larkQrCode.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/frontend/src/views/login/components/larkSuiteQrCode.vue b/frontend/src/views/login/components/larkSuiteQrCode.vue new file mode 100644 index 0000000000..46a9f74749 --- /dev/null +++ b/frontend/src/views/login/components/larkSuiteQrCode.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/frontend/src/views/login/components/tabQrCode.vue b/frontend/src/views/login/components/tabQrCode.vue index 230aa196a9..d02ca131f8 100644 --- a/frontend/src/views/login/components/tabQrCode.vue +++ b/frontend/src/views/login/components/tabQrCode.vue @@ -26,17 +26,16 @@ - +