feat: 创建企业逻辑对接

This commit is contained in:
rd
2025-09-10 17:57:42 +08:00
parent 25f74691c6
commit 32bc0c4b95
8 changed files with 90 additions and 50 deletions

View File

@ -27,20 +27,21 @@ export const getUserEnterpriseInfo = async () => {
export async function initApp() {
const userStore = useUserStore();
const chatStore = useChatStore();
await chatStore.getAgentInfo(); // 初始化智能体信息
const sidebarStore = useSidebarStore();
await userStore.getUserInfo(); // 初始化用户信息
if (!userStore.isOpenEnterprise) return;
await getUserEnterpriseInfo(); // 初始化企业信息、navbar菜单、允许访问的路由
await chatStore.getAgentInfo(); // 初始化智能体信息
sidebarStore.startUnreadInfoPolling(); // 初始化未读信息
}
// 登录处理
export async function handleUserLogin() {
const sidebarStore = useSidebarStore();
await initApp();
sidebarStore.startUnreadInfoPolling(); // 初始化未读信息
handleUserHome();
}