From 5e42db52b9851374086acc7be81d22c7ccfa7c12 Mon Sep 17 00:00:00 2001 From: chiyi Date: Tue, 27 Oct 2026 16:26:18 +0800 Subject: [PATCH] =?UTF-8?q?feat(nav):=20=E4=BD=99=E9=A2=9D=E4=B8=8E?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E5=85=A5=E5=8F=A3=E5=B9=B6=E5=85=A5=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=B8=8B=E6=8B=89=EF=BC=8C=E4=B8=8B=E6=8B=89=E9=87=8D?= =?UTF-8?q?=E6=96=B0=E8=AE=BE=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 顶栏右侧只留头像+用户名胶囊;下拉含用户信息头、 余额卡(点击去充值)、带图标的菜单项、管理后台、退出登录。 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- frontend/src/layouts/PublicLayout.vue | 154 ++++++++++++++++++-------- 1 file changed, 106 insertions(+), 48 deletions(-) diff --git a/frontend/src/layouts/PublicLayout.vue b/frontend/src/layouts/PublicLayout.vue index 0f420b6..b081cd6 100644 --- a/frontend/src/layouts/PublicLayout.vue +++ b/frontend/src/layouts/PublicLayout.vue @@ -28,10 +28,10 @@ const nav = computed(() => { // Avatar menu — only the surfaces the top nav doesn't already expose // (画图/图片 live in the bar, so they're intentionally left out here). const userMenu = [ - { to: '/mylogs', label: '生成日志' }, - { to: '/invite', label: '邀请返利' }, - { to: '/orders', label: '订单' }, - { to: '/settings', label: '设置' }, + { to: '/mylogs', label: '生成日志', icon: 'log' }, + { to: '/invite', label: '邀请返利', icon: 'team' }, + { to: '/orders', label: '订单', icon: 'receipt' }, + { to: '/settings', label: '设置', icon: 'config' }, ] const menuOpen = ref(false) // avatar dropdown @@ -47,6 +47,7 @@ onUnmounted(() => window.removeEventListener('scroll', onScroll)) // credits — the logged-in user's real server-side balance (auth.user.credits) const credits = computed(() => Number(auth.user?.credits || 0)) const creditsLabel = computed(() => pointsLabel(credits.value)) +const avatarChar = computed(() => Array.from(displayName.value)[0]?.toUpperCase() || '?') const displayName = computed(() => { const n = (auth.user?.name || '').trim() if (n) return n @@ -98,39 +99,46 @@ async function onLogout() {
- - - - - - - - - +
-
@@ -149,6 +157,7 @@ async function onLogout() {