From ffc194a1c1e35a209b6bc8c1532c095ada17bef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E5=BF=B5?= Date: Fri, 25 Jul 2025 17:05:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A3=9E=E4=B9=A6=E6=8E=88=E6=9D=83=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=B3=BB=E7=BB=9F=E7=A0=81=20=20=E5=8F=8A=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E8=BF=9B=E5=85=A5=E9=A1=B5=E9=9D=A2=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 3 +++ src/api/usersApi.ts | 2 +- src/store/modules/user.ts | 3 ++- src/views/auth/feishu-callback.vue | 3 ++- src/views/auth/login/index.vue | 34 ++++++++++++++++++++++++------ 5 files changed, 36 insertions(+), 9 deletions(-) diff --git a/src/App.vue b/src/App.vue index 7e8ddf8..8353481 100644 --- a/src/App.vue +++ b/src/App.vue @@ -20,8 +20,11 @@ const params = new URLSearchParams(window.location.search) const companyid = params.get('corp_id') const companyabbr = params.get('corp_abbr') + const systemid = params.get('system_id') + const system_code = params.get('system_code') if (companyid) { userStore.setCompany(companyid, companyabbr || '') + userStore.setSystems(systemid || '', system_code || '') // 你也可以加 localStorage/sessionStorage 备份 } } diff --git a/src/api/usersApi.ts b/src/api/usersApi.ts index 96d7f0a..9af6fe3 100644 --- a/src/api/usersApi.ts +++ b/src/api/usersApi.ts @@ -22,7 +22,7 @@ export class UserService { }) } //获取 飞书信息 - static getfeishuAppList(params: { corp_id: string }) { + static getfeishuAppList(params: any) { return request.get({ url: '/common/preset/feishu/app', params diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 462d73d..81ba270 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -138,7 +138,8 @@ export const useUserStore = defineStore( // 清空所有本地缓存 localStorage.clear() sessionStorage.clear() - + systemsabbr.value = '' + systemsid.value = '' companyabbr.value = '' companyid.value = '' info.value = {} diff --git a/src/views/auth/feishu-callback.vue b/src/views/auth/feishu-callback.vue index 5489a59..a3da0f5 100644 --- a/src/views/auth/feishu-callback.vue +++ b/src/views/auth/feishu-callback.vue @@ -35,7 +35,8 @@ onMounted(async () => { const userInfo = await UserService.getUserInfo() userStore.setUserInfo(userInfo) userStore.setLoginStatus(true) - router.replace('/') + router.push(data.home_url) + // router.replace('/') } catch (e: any) { error.value = e?.response?.data?.message || '登录失败,请重试' router.replace('/') diff --git a/src/views/auth/login/index.vue b/src/views/auth/login/index.vue index b8da14c..5c9add8 100644 --- a/src/views/auth/login/index.vue +++ b/src/views/auth/login/index.vue @@ -36,11 +36,11 @@