first commit

This commit is contained in:
2026-06-03 10:09:03 +08:00
commit 81f5039458
6266 changed files with 188236 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
import { useAuthStore } from '@/stores/auth';
import { onMounted } from 'vue';
// 使用 auth store 获取用户信息
const authStore = useAuthStore();
// 获取租户ID
const tenantId = (authStore.user as any)?.tid;
// 获取用户信息
const userInfo = authStore.user;
if (userInfo && userInfo.id) {
console.log('用户名:', userInfo.username || userInfo.nickname);
console.log('用户ID:', userInfo.id);
console.log('角色:', userInfo.role);
} else {
console.log('未找到用户信息或用户未登录');
}
onMounted(() => {
getUserInfo();
});