登录注册、手机号、邮箱

This commit is contained in:
2025-11-03 13:37:55 +08:00
parent 16754b527e
commit 35aee59178
26 changed files with 4292 additions and 163 deletions

View File

@@ -23,7 +23,7 @@
<span class="avatar-placeholder" v-else>{{ avatarText }}</span>
</div>
<div class="user-details" v-if="!collapsed">
<div class="user-name">{{ user?.realName || user?.username }}</div>
<div class="user-name">{{ user?.fullName || user?.username }}</div>
<div class="user-role">{{ primaryRole }}</div>
</div>
<i class="dropdown-icon" :class="{ 'open': dropdownVisible }"></i>
@@ -113,13 +113,13 @@ const userAvatar = computed(() => {
});
const avatarText = computed(() => {
const name = props.user?.realName || props.user?.username || '';
const name = props.user?.fullName || props.user?.username || '';
return name.charAt(0).toUpperCase();
});
const primaryRole = computed(() => {
// 这里可以从store中获取用户角色信息
return '管理员'; // 暂时硬编码
return store.getters['auth/userRoles'][0].roleName || '';
});
// 获取用户下拉菜单(个人中心和账号中心)