liu
昨天 c62517daefcc52624f6eece28a2693fa8f4b9b41
src/bootstrap.ts
@@ -18,6 +18,9 @@
import App from './app.vue';
import { router } from './router';
import { getCompanyConfig } from '#/api/system/company-config';
import { applyCompanyConfig } from '#/utils/company-config';
async function bootstrap(namespace: string) {
  // 初始化组件适配器
  await initComponentAdapter();
@@ -49,6 +52,17 @@
  // 配置 pinia-store
  await initStores(app, { namespace });
  // 加载公司品牌信息(从后端,免登录接口),联动登录页/菜单栏/网页标题。
  // 注:此时 pinia 尚未在组件外激活,这里用纯函数,不依赖 store。
  try {
    const companyConfig = await getCompanyConfig();
    if (companyConfig) {
      applyCompanyConfig(companyConfig);
    }
  } catch {
    // 后端不可用或未配置,保持编译期默认
  }
  // 安装权限指令
  registerAccessDirective(app);