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 @@