feat(frontend): Align admin and user API integration

This commit is contained in:
2026-04-18 18:21:31 +08:00
parent 3adb088eca
commit 2247d235ec
74 changed files with 8626 additions and 647 deletions
@@ -151,9 +151,12 @@ const goToNotifications = () => {
// 跳转到个人主页
const goToProfile = () => {
showUserPopover.value = false
if (userStore.userId) {
router.push(`/user/${userStore.userId}`)
const id = userStore.userId || userStore.userInfo?.id || userStore.authUser?.id
if (!id) {
showToast('用户信息加载中,请稍后重试')
return
}
router.push(`/user/${id}`)
}
// 退出登录
@@ -186,18 +189,20 @@ onMounted(() => {
left: 0;
right: 0;
height: var(--header-height);
background: var(--bg-secondary);
box-shadow: var(--shadow-sm);
background: rgba(255, 255, 255, 0.92);
box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
backdrop-filter: blur(18px);
z-index: 100;
border-bottom: 1px solid rgba(15, 23, 42, 0.04);
.header-content {
max-width: var(--max-content-width);
max-width: 1400px;
height: 100%;
margin: 0 auto;
padding: 0 var(--spacing-md);
padding: 0 18px;
display: flex;
align-items: center;
gap: var(--spacing-lg);
gap: 18px;
}
}
@@ -213,12 +218,9 @@ onMounted(() => {
}
.logo-text {
font-size: 20px;
font-weight: bold;
background: linear-gradient(to right, var(--primary-color), var(--pink-color));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
font-size: 22px;
font-weight: 800;
color: #18191c;
@media (max-width: 768px) {
display: none;
@@ -228,14 +230,23 @@ onMounted(() => {
.search-box {
flex: 1;
max-width: 400px;
max-width: 520px;
:deep(.van-search) {
padding: 0;
background: transparent;
.van-search__content {
background: var(--bg-tertiary);
background: #f1f2f3;
border-radius: 999px;
border: 1px solid transparent;
transition: all 0.2s ease;
}
.van-search__content:hover,
.van-field__control:focus + .van-field__body .van-search__content {
background: #fff;
border-color: #e3e5e7;
}
}
}
@@ -243,14 +254,14 @@ onMounted(() => {
.header-actions {
display: flex;
align-items: center;
gap: var(--spacing-md);
gap: 16px;
.action-icon {
cursor: pointer;
color: var(--text-secondary);
color: #61666d;
&:hover {
color: var(--primary-color);
color: #fb7299;
}
}
@@ -260,9 +271,15 @@ onMounted(() => {
transition: border-color 0.3s;
&:hover {
border-color: var(--primary-color);
border-color: #fb7299;
}
}
:deep(.van-button--primary) {
background: linear-gradient(135deg, #fb7299, #ff8fab);
border: none;
box-shadow: 0 10px 24px rgba(251, 114, 153, 0.24);
}
}
.message-popover,