mirror of
https://github.com/halo-dev/halo.git
synced 2025-12-20 16:44:38 +08:00
feat: add requests library as a global shared dependency
This commit is contained in:
@@ -8,23 +8,26 @@ import { createPinia } from "pinia";
|
||||
import { setupCoreModules, setupPluginModules } from "@uc/setup/setupModules";
|
||||
import router from "@uc/router";
|
||||
import { useUserStore } from "@/stores/user";
|
||||
import { apiClient } from "@/utils/api-client";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { useRoleStore } from "@/stores/role";
|
||||
import { hasPermission } from "@/utils/permission";
|
||||
import { useGlobalInfoStore } from "@/stores/global-info";
|
||||
import { setupApiClient } from "@/setup/setupApiClient";
|
||||
|
||||
const app = createApp(App);
|
||||
|
||||
setupComponents(app);
|
||||
setupI18n(app);
|
||||
setupVueQuery(app);
|
||||
setupApiClient();
|
||||
|
||||
app.use(createPinia());
|
||||
|
||||
async function loadUserPermissions() {
|
||||
const { data: currentPermissions } = await apiClient.user.getPermissions({
|
||||
name: "-",
|
||||
});
|
||||
const { data: currentPermissions } =
|
||||
await consoleApiClient.user.getPermissions({
|
||||
name: "-",
|
||||
});
|
||||
const roleStore = useRoleStore();
|
||||
roleStore.$patch({
|
||||
permissions: currentPermissions,
|
||||
|
||||
Reference in New Issue
Block a user