feat: 创建企业逻辑对接
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user