From 2c3c2653faa0e22f5e55227234c3038a17b3c276 Mon Sep 17 00:00:00 2001 From: chenwu Date: Mon, 8 Jun 2026 11:36:38 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E6=8C=89=E6=AF=9B=E7=8E=BB=E7=92=83?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E7=A8=BF=E9=87=8D=E5=81=9A=E5=B9=BF=E5=9C=BA?= =?UTF-8?q?/=E9=99=84=E8=BF=91/=E5=8F=91=E5=B8=83/=E6=B1=AA=E5=8F=8B/?= =?UTF-8?q?=E6=88=91=E7=9A=84=E4=BA=94=E5=A4=A7=E9=A1=B5=E9=9D=A2=E8=A7=86?= =?UTF-8?q?=E8=A7=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 参照 wangquan_glass_redesign_mockup.html 的玻璃拟态(glassmorphism)设计语言重写前端展示样式: - app.wxss: 引入 coral/tangerine/lemon/mint/sky/lilac 色板与 .glass/.glass-strong/.sticker-tag 毛玻璃工具类,背景改为纯白 - custom-tab-bar: 改为悬浮玻璃浮岛(.tab-dock),含液态光泽动画与渐变发布按钮(FAB) - feed: 故事条改为方形圆角描边+conic渐变,顶部操作按钮、骨架屏改为玻璃质感 - post-card 组件: 卡片/贴纸标签/操作按钮全面玻璃化,点赞按钮改为渐变高亮 - nearby: 地图控件、宠物弹窗、列表项、预览条统一为毛玻璃卡片 - post: 上传区/输入框/标签pill/心情选择器改为玻璃质感+渐变选中态 - friends: 空态与好友列表项改为玻璃卡片 - profile: 用户信息区改为带渐变光斑的玻璃英雄卡,统计/宠物卡/动态网格同步玻璃化 未改动页面结构(WXML)与业务逻辑(TS),仅升级视觉样式(WXSS),保持程序可运行。 --- miniprogram/app.wxss | 98 ++++++--- .../components/post-card/post-card.wxss | 77 ++++--- miniprogram/custom-tab-bar/index.wxml | 12 +- miniprogram/custom-tab-bar/index.wxss | 164 ++++++++++----- miniprogram/pages/feed/feed.wxss | 85 ++++---- miniprogram/pages/friends/friends.wxss | 105 +++++++--- miniprogram/pages/nearby/nearby.wxss | 187 ++++++++++------- miniprogram/pages/post/post.wxss | 175 +++++++++------- miniprogram/pages/profile/profile.wxml | 2 + miniprogram/pages/profile/profile.wxss | 191 +++++++++++------- 10 files changed, 697 insertions(+), 399 deletions(-) diff --git a/miniprogram/app.wxss b/miniprogram/app.wxss index 02da22a..23ffb1b 100644 --- a/miniprogram/app.wxss +++ b/miniprogram/app.wxss @@ -1,28 +1,39 @@ -/* ── 全局设计令牌 ── */ +/* ── 全局设计令牌:毛玻璃配色系统 ── */ page { - --pink: #ff4f91; - --pink-light: #ffe5f0; - --orange: #ff9f1c; - --yellow: #ffe15a; - --green: #2fd37a; - --mint: #67e8c9; - --blue: #4d8dff; - --violet: #8c5cff; - --ink: #272235; + --coral: #ff2d6e; + --tangerine: #ff7a1a; + --lemon: #ffd400; + --mint: #00d9a0; + --sky: #1f9bff; + --lilac: #8b5cf6; - --bg-primary: #fff9fb; - --bg-page: linear-gradient(180deg, #fff8f2 0%, #fff4fb 50%, #f5f0ff 100%); + /* 兼容旧变量名,逐步迁移 */ + --pink: var(--coral); + --pink-light: rgba(255, 45, 110, 0.14); + --orange: var(--tangerine); + --yellow: var(--lemon); + --green: var(--mint); + --blue: var(--sky); + --violet: var(--lilac); + --ink: #2b2438; - --text-primary: #272235; - --text-secondary: #6a6178; - --text-tertiary: #9b8fa8; + --bg-primary: #ffffff; + --bg-page: #ffffff; + + --text-primary: #2b2438; + --text-secondary: #6e6480; + --text-tertiary: #a59cb5; + + --glass: rgba(255, 255, 255, 0.40); + --glass-strong: rgba(255, 255, 255, 0.58); + --glass-edge: rgba(255, 255, 255, 0.78); --border-card: rgba(255, 255, 255, 0.72); --border-subtle: rgba(43, 37, 61, 0.08); - --shadow-soft: 0 18rpx 40rpx rgba(95, 49, 104, 0.12); - --shadow-card: 0 10rpx 28rpx rgba(78, 56, 96, 0.10); - --shadow-pop: 0 10rpx 22rpx rgba(255, 79, 145, 0.28); + --shadow-soft: 0 22rpx 48rpx rgba(120, 70, 140, 0.16); + --shadow-card: 0 22rpx 48rpx rgba(120, 70, 140, 0.16); + --shadow-pop: 0 14rpx 32rpx rgba(255, 45, 110, 0.30); --radius-sm: 16rpx; --radius-md: 28rpx; @@ -57,7 +68,7 @@ button::after { border: none; } -/* ── 通用卡片 ── */ +/* ── 通用卡片(兼容旧用法) ── */ .card { background: rgba(255, 255, 255, 0.86); border: 1rpx solid var(--border-card); @@ -66,12 +77,50 @@ button::after { overflow: hidden; } +/* ── 真毛玻璃工具类:背景模糊 + 折射边缘 + 内高光 + 低端 Android 对 backdrop-filter 支持有限,已叠加半透明底色兜底 ── */ +.glass { + background: var(--glass); + backdrop-filter: blur(28rpx) saturate(170%); + -webkit-backdrop-filter: blur(28rpx) saturate(170%); + border: 1rpx solid var(--glass-edge); + box-shadow: var(--shadow-soft), inset 0 1rpx 0 rgba(255, 255, 255, 0.65), inset 0 -1rpx 0 rgba(255, 255, 255, 0.12); +} + +.glass-strong { + background: var(--glass-strong); + backdrop-filter: blur(34rpx) saturate(180%); + -webkit-backdrop-filter: blur(34rpx) saturate(180%); + border: 1rpx solid var(--glass-edge); + box-shadow: var(--shadow-soft), inset 0 1rpx 0 rgba(255, 255, 255, 0.7); +} + +/* ── 贴纸式标签:略微旋转,像贴上去的 ── */ +.sticker-tag { + position: absolute; + background: rgba(255, 255, 255, 0.55); + backdrop-filter: blur(20rpx) saturate(180%); + -webkit-backdrop-filter: blur(20rpx) saturate(180%); + color: var(--ink); + font-size: 22rpx; + font-weight: 800; + padding: 10rpx 22rpx; + border-radius: 24rpx; + border: 1rpx solid rgba(255, 255, 255, 0.7); + box-shadow: 0 14rpx 30rpx rgba(120, 70, 150, 0.18); + transform: rotate(-3deg); +} + +.sticker-tag.tilt-r { + transform: rotate(3deg); +} + /* ── 渐变按钮 ── */ .btn-primary { display: flex; align-items: center; justify-content: center; - background: linear-gradient(135deg, var(--pink), var(--orange)); + background: linear-gradient(135deg, var(--coral), var(--tangerine)); color: #fff; border-radius: var(--radius-full); font-size: 28rpx; @@ -95,8 +144,9 @@ button::after { align-items: center; font-size: 22rpx; font-weight: 800; - color: #8b3cff; - background: #f0e8ff; + color: #8a3fe0; + background: rgba(167, 139, 250, 0.16); + border: 1rpx solid rgba(167, 139, 250, 0.28); border-radius: var(--radius-full); padding: 6rpx 14rpx; } @@ -106,9 +156,9 @@ button::after { width: 14rpx; height: 14rpx; border-radius: 50%; - background: var(--green); + background: var(--mint); flex-shrink: 0; - box-shadow: 0 0 0 5rpx rgba(47, 211, 122, 0.18); + box-shadow: 0 0 0 5rpx rgba(0, 217, 160, 0.18); } /* ── 骨架屏占位 ── */ diff --git a/miniprogram/components/post-card/post-card.wxss b/miniprogram/components/post-card/post-card.wxss index 9a0e1a4..109527c 100644 --- a/miniprogram/components/post-card/post-card.wxss +++ b/miniprogram/components/post-card/post-card.wxss @@ -1,10 +1,12 @@ .post-card { margin: 0 28rpx 32rpx; - background: rgba(255, 255, 255, 0.88); - border-radius: 48rpx; - border: 1rpx solid rgba(255, 255, 255, 0.72); + background: rgba(255, 255, 255, 0.40); + backdrop-filter: blur(28rpx) saturate(170%); + -webkit-backdrop-filter: blur(28rpx) saturate(170%); + border-radius: 56rpx; + border: 1rpx solid rgba(255, 255, 255, 0.78); overflow: hidden; - box-shadow: 0 18rpx 40rpx rgba(95, 49, 104, 0.12); + box-shadow: 0 22rpx 48rpx rgba(120, 70, 140, 0.16), inset 0 1rpx 0 rgba(255, 255, 255, 0.65); } /* 头部 */ @@ -16,17 +18,18 @@ } .post-avatar { - width: 76rpx; - height: 76rpx; - border-radius: 28rpx; + width: 80rpx; + height: 80rpx; + border-radius: 30rpx; display: flex; align-items: center; justify-content: center; font-size: 32rpx; font-weight: 800; - color: rgba(39, 34, 53, 0.72); + color: rgba(43, 36, 56, 0.72); flex-shrink: 0; - box-shadow: inset 0 0 0 2rpx rgba(255, 255, 255, 0.8); + border: 3rpx solid rgba(255, 255, 255, 0.85); + box-shadow: 0 10rpx 22rpx rgba(120, 70, 150, 0.16); } .post-meta { @@ -38,7 +41,7 @@ display: block; font-size: 28rpx; font-weight: 800; - color: #272235; + color: #2b2438; } .post-loc { @@ -52,7 +55,7 @@ .loc-text { font-size: 22rpx; - color: #9b8fa8; + color: #a59cb5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -60,7 +63,7 @@ .post-time { font-size: 22rpx; - color: #9b8fa8; + color: #a59cb5; flex-shrink: 0; } @@ -78,14 +81,19 @@ .post-tag-chip { position: absolute; - top: 20rpx; - left: 20rpx; - background: rgba(39, 34, 53, 0.88); - color: #fff; - font-size: 20rpx; + top: 22rpx; + left: 22rpx; + background: rgba(255, 255, 255, 0.55); + backdrop-filter: blur(20rpx) saturate(180%); + -webkit-backdrop-filter: blur(20rpx) saturate(180%); + color: #2b2438; + font-size: 21rpx; font-weight: 800; - padding: 8rpx 18rpx; - border-radius: 999rpx; + padding: 10rpx 22rpx; + border-radius: 24rpx; + border: 1rpx solid rgba(255, 255, 255, 0.7); + box-shadow: 0 14rpx 30rpx rgba(120, 70, 150, 0.18); + transform: rotate(-3deg); } .post-img-grid { @@ -127,7 +135,7 @@ .post-caption { display: block; font-size: 28rpx; - color: #272235; + color: #2b2438; line-height: 1.6; margin-bottom: 16rpx; } @@ -144,8 +152,9 @@ align-items: center; font-size: 22rpx; font-weight: 800; - color: #8b3cff; - background: #f0e8ff; + color: #8a3fe0; + background: rgba(167, 139, 250, 0.16); + border: 1rpx solid rgba(167, 139, 250, 0.28); border-radius: 999rpx; padding: 6rpx 14rpx; } @@ -153,9 +162,9 @@ /* 操作栏 */ .post-actions { display: flex; - gap: 16rpx; - padding-top: 18rpx; - border-top: 1rpx solid rgba(43, 37, 61, 0.07); + gap: 14rpx; + padding-top: 20rpx; + border-top: 1rpx solid rgba(255, 255, 255, 0.55); } .action-btn { @@ -164,15 +173,23 @@ gap: 8rpx; font-size: 24rpx; font-weight: 800; - color: #6a6178; - background: #f7f3ff; + color: #6e6480; + background: rgba(255, 255, 255, 0.42); + border: 1rpx solid rgba(255, 255, 255, 0.62); border-radius: 999rpx; - padding: 10rpx 18rpx; + padding: 12rpx 22rpx; + transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease; +} + +.action-btn:active { + transform: scale(0.95); } .action-btn.liked { - color: #ff4f91; - background: #ffe5f0; + color: #fff; + background: linear-gradient(135deg, #ff2d6e, #ff7a1a); + border-color: transparent; + box-shadow: 0 12rpx 26rpx rgba(255, 45, 110, 0.32); } .action-icon { diff --git a/miniprogram/custom-tab-bar/index.wxml b/miniprogram/custom-tab-bar/index.wxml index 1f953f2..961cf02 100644 --- a/miniprogram/custom-tab-bar/index.wxml +++ b/miniprogram/custom-tab-bar/index.wxml @@ -1,7 +1,8 @@ - + + - + @@ -12,7 +13,7 @@ - + @@ -25,12 +26,13 @@ + - + @@ -43,7 +45,7 @@ - + diff --git a/miniprogram/custom-tab-bar/index.wxss b/miniprogram/custom-tab-bar/index.wxss index 290697d..5f6582c 100644 --- a/miniprogram/custom-tab-bar/index.wxss +++ b/miniprogram/custom-tab-bar/index.wxss @@ -1,43 +1,83 @@ -/* ── 底部导航栏 ── */ -.tab-bar { +/* ── 底部导航:悬浮玻璃浮岛 ── + 绝对定位浮在内容上方,左右下三边露出底层内容; + 分层折射高光 + 缓慢流动的光泽,模拟液态玻璃透镜质感 */ +.tab-dock { + position: fixed; + left: 16rpx; + right: 16rpx; + bottom: 28rpx; + z-index: 999; display: flex; align-items: center; - border-top: 1rpx solid rgba(255, 255, 255, 0.65); - background: rgba(255, 255, 255, 0.90); - padding: 10rpx 0 calc(10rpx + env(safe-area-inset-bottom)); - box-shadow: 0 -10rpx 24rpx rgba(110, 78, 131, 0.08); - position: fixed; - bottom: 0; - left: 0; - right: 0; - z-index: 999; + justify-content: space-around; + border-radius: 64rpx; + padding: 14rpx 8rpx calc(14rpx + env(safe-area-inset-bottom) * 0.6); + overflow: hidden; + isolation: isolate; + background: + radial-gradient(130% 160% at 16% -40%, rgba(255, 255, 255, 0.6), transparent 56%), + radial-gradient(110% 140% at 92% 145%, rgba(255, 255, 255, 0.16), transparent 60%), + rgba(255, 255, 255, 0.30); + backdrop-filter: blur(26rpx) saturate(200%); + -webkit-backdrop-filter: blur(26rpx) saturate(200%); + border: 1rpx solid rgba(255, 255, 255, 0.55); + box-shadow: + 0 20rpx 50rpx rgba(120, 70, 140, 0.18), + inset 0 1.5rpx 0 rgba(255, 255, 255, 0.7), + inset 0 -10rpx 22rpx rgba(255, 255, 255, 0.10), + inset 10rpx 0 22rpx rgba(255, 255, 255, 0.08), + inset -10rpx 0 22rpx rgba(180, 150, 210, 0.10); +} + +/* 流动光泽:缓慢左右扫过的液态高光带 */ +.dock-sheen { + position: absolute; + top: -60%; + left: -15%; + right: -15%; + height: 220%; + background: linear-gradient(102deg, transparent 32%, rgba(255, 255, 255, 0.40) 48%, transparent 64%); + filter: blur(14rpx); + animation: liquid-sheen 8s ease-in-out infinite; + pointer-events: none; + z-index: 0; + transform: translateX(-14%) rotate(-2deg); +} + +@keyframes liquid-sheen { + 0%, 100% { transform: translateX(-14%) rotate(-2deg); opacity: 0.45; } + 50% { transform: translateX(14%) rotate(2deg); opacity: 0.85; } } /* ── Tab 项 ── */ -.tab-item { +.tab-pill { + position: relative; + z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; - gap: 5rpx; - border-radius: 22rpx; - padding: 8rpx 0 6rpx; - position: relative; + gap: 6rpx; + border-radius: 36rpx; + padding: 12rpx 0 8rpx; + transition: transform 0.25s cubic-bezier(.34, 1.56, .64, 1), background 0.25s ease, color 0.25s ease; } -.tab-item.active { - background: linear-gradient(180deg, rgba(255, 79, 145, 0.12), rgba(255, 225, 90, 0.08)); +.tab-pill.active { + background: rgba(255, 45, 110, 0.14); + transform: translateY(-6rpx) scale(1.04); } .tab-label { font-size: 20rpx; font-weight: 700; - color: #9b8fa8; + color: #a59cb5; line-height: 1; + transition: color 0.2s; } -.tab-item.active .tab-label { - color: #ff4f91; +.tab-pill.active .tab-label { + color: #ff2d6e; font-weight: 900; } @@ -61,13 +101,13 @@ } .icon-grid .sq { - background: #9b8fa8; + background: #a59cb5; border-radius: 4rpx; transition: background 0.2s; } -.tab-item.active .icon-grid .sq { - background: #ff4f91; +.tab-pill.active .icon-grid .sq { + background: #ff2d6e; } /* ── 附近图标:地图 Pin ── */ @@ -82,7 +122,7 @@ width: 22rpx; height: 22rpx; border-radius: 50% 50% 50% 0; - background: #9b8fa8; + background: #a59cb5; transform: rotate(-45deg); transition: background 0.2s; } @@ -90,15 +130,15 @@ .pin-tail { width: 4rpx; height: 8rpx; - background: #9b8fa8; + background: #a59cb5; border-radius: 0 0 4rpx 4rpx; margin-top: -2rpx; transition: background 0.2s; } -.tab-item.active .pin-head, -.tab-item.active .pin-tail { - background: #ff4f91; +.tab-pill.active .pin-head, +.tab-pill.active .pin-tail { + background: #ff2d6e; } /* ── 汪友图标:双人轮廓 ── */ @@ -113,7 +153,7 @@ width: 14rpx; height: 14rpx; border-radius: 50%; - background: #9b8fa8; + background: #a59cb5; top: 0; transition: background 0.2s; } @@ -127,14 +167,14 @@ left: 0; right: 0; height: 14rpx; - background: #9b8fa8; + background: #a59cb5; border-radius: 8rpx 8rpx 0 0; transition: background 0.2s; } -.tab-item.active .ppl-head, -.tab-item.active .ppl-body { - background: #ff4f91; +.tab-pill.active .ppl-head, +.tab-pill.active .ppl-body { + background: #ff2d6e; } /* ── 我的图标:单人轮廓 ── */ @@ -151,7 +191,7 @@ width: 18rpx; height: 18rpx; border-radius: 50%; - background: #9b8fa8; + background: #a59cb5; transition: background 0.2s; } @@ -159,39 +199,63 @@ width: 28rpx; height: 14rpx; border-radius: 8rpx 8rpx 0 0; - background: #9b8fa8; + background: #a59cb5; transition: background 0.2s; } -.tab-item.active .user-head, -.tab-item.active .user-body { - background: #ff4f91; +.tab-pill.active .user-head, +.tab-pill.active .user-body { + background: #ff2d6e; } -/* ── 发布 FAB ── */ +/* ── 发布 FAB:液态玻璃凸透镜质感 ── */ .tab-fab-wrap { - flex: 1; + flex: 0 0 auto; display: flex; align-items: center; justify-content: center; - padding-bottom: 4rpx; + padding: 0 8rpx; } .tab-fab { - width: 92rpx; - height: 92rpx; + position: relative; + overflow: hidden; + isolation: isolate; + width: 100rpx; + height: 100rpx; border-radius: 50%; - background: linear-gradient(135deg, #ff4f91, #ff9f1c 55%, #ffe15a); - border: 4rpx solid rgba(255, 255, 255, 0.90); - box-shadow: 0 10rpx 22rpx rgba(255, 79, 145, 0.28); + background: linear-gradient(140deg, #ff2d6e, #ff7a1a 55%, #ffd400); + border: 5rpx solid rgba(255, 255, 255, 0.85); + box-shadow: 0 16rpx 36rpx rgba(255, 45, 110, 0.40), inset 0 1rpx 0 rgba(255, 255, 255, 0.6); display: flex; align-items: center; justify-content: center; - margin-bottom: 4rpx; + transform: translateY(-18rpx); + transition: transform 0.2s ease; +} + +.tab-fab:active { + transform: translateY(-18rpx) scale(0.92); +} + +/* 液态高光:左上角玻璃透镜光斑 */ +.fab-shine { + position: absolute; + top: 6%; + left: 14%; + width: 46%; + height: 38%; + border-radius: 50%; + background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.85), transparent 72%); + filter: blur(4rpx); + pointer-events: none; + z-index: 0; } .fab-plus { - font-size: 52rpx; + position: relative; + z-index: 1; + font-size: 56rpx; color: #fff; font-weight: 300; line-height: 1; @@ -206,7 +270,7 @@ min-width: 30rpx; height: 30rpx; border-radius: 15rpx; - background: #ff4f91; + background: #ff2d6e; color: #fff; font-size: 18rpx; font-weight: 800; diff --git a/miniprogram/pages/feed/feed.wxss b/miniprogram/pages/feed/feed.wxss index 0ba7d7b..48d3fd7 100644 --- a/miniprogram/pages/feed/feed.wxss +++ b/miniprogram/pages/feed/feed.wxss @@ -1,6 +1,6 @@ .feed-page { min-height: 100vh; - background: linear-gradient(180deg, #fff8f2 0%, #fff4fb 50%, #f5f0ff 100%); + background: #ffffff; display: flex; flex-direction: column; } @@ -24,13 +24,19 @@ } .topbar-logo { - font-size: 44rpx; - font-weight: 900; - color: #272235; + font-size: 46rpx; + font-weight: 800; + letter-spacing: -0.5rpx; + color: #2b2438; flex-shrink: 0; } -.logo-accent { color: #ff4f91; } +.logo-accent { + background: linear-gradient(120deg, #ff2d6e, #ff7a1a); + -webkit-background-clip: text; + background-clip: text; + color: transparent; +} .topbar-tabs { flex: 1; @@ -42,15 +48,15 @@ .feed-tab { font-size: 26rpx; font-weight: 700; - color: #9b8fa8; + color: #a59cb5; padding: 8rpx 20rpx; border-radius: 999rpx; transition: all 0.2s; } .feed-tab-active { - color: #ff4f91; - background: rgba(255, 79, 145, 0.10); + color: #ff2d6e; + background: rgba(255, 45, 110, 0.12); font-weight: 900; } @@ -61,27 +67,31 @@ } .topbar-btn { - width: 60rpx; - height: 60rpx; - border-radius: 50%; - background: rgba(255, 255, 255, 0.72); - box-shadow: 0 8rpx 18rpx rgba(78, 56, 96, 0.10); + width: 64rpx; + height: 64rpx; + border-radius: 26rpx; + background: var(--glass); + backdrop-filter: blur(28rpx) saturate(170%); + -webkit-backdrop-filter: blur(28rpx) saturate(170%); + border: 1rpx solid var(--glass-edge); + box-shadow: var(--shadow-soft); display: flex; align-items: center; justify-content: center; - font-size: 32rpx; + font-size: 30rpx; + color: #6e6480; position: relative; } .has-badge::after { content: ''; position: absolute; - top: 6rpx; - right: 6rpx; + top: 8rpx; + right: 8rpx; width: 14rpx; height: 14rpx; border-radius: 50%; - background: #ff4f91; + background: #ff2d6e; border: 2rpx solid #fff; } @@ -102,42 +112,42 @@ } .story-ring { - width: 112rpx; - height: 112rpx; - border-radius: 50%; - padding: 5rpx; + width: 116rpx; + height: 116rpx; + border-radius: 40rpx; + padding: 6rpx; box-sizing: border-box; - background: conic-gradient(from 120deg, #ff4f91, #ff9f1c, #ffe15a, #67e8c9, #4d8dff, #8c5cff, #ff4f91); - box-shadow: 0 10rpx 18rpx rgba(96, 60, 115, 0.16); + background: conic-gradient(from 130deg, #ff2d6e, #ff7a1a, #ffd400, #00d9a0, #1f9bff, #8b5cf6, #ff2d6e); + box-shadow: 0 18rpx 36rpx rgba(120, 70, 150, 0.20); } .story-ring-seen { - background: #e8e4f0; + background: rgba(165, 156, 181, 0.35); } .story-ring-me { - background: linear-gradient(135deg, #ff4f91, #ff9f1c); + background: linear-gradient(135deg, #ff2d6e, #ff7a1a); } .story-inner { width: 100%; height: 100%; - border-radius: 50%; + border-radius: 32rpx; display: flex; align-items: center; justify-content: center; - border: 4rpx solid rgba(255, 255, 255, 0.90); + border: 5rpx solid rgba(255, 255, 255, 0.92); } .story-emoji { - font-size: 44rpx; + font-size: 46rpx; line-height: 1; } .story-name { - font-size: 22rpx; + font-size: 21rpx; font-weight: 700; - color: #6a6178; + color: #6e6480; } /* 信息流 */ @@ -153,8 +163,11 @@ .skeleton-card { margin: 0 28rpx 32rpx; - background: rgba(255, 255, 255, 0.8); - border-radius: 48rpx; + background: var(--glass); + backdrop-filter: blur(28rpx) saturate(170%); + -webkit-backdrop-filter: blur(28rpx) saturate(170%); + border: 1rpx solid var(--glass-edge); + border-radius: 56rpx; overflow: hidden; padding-bottom: 20rpx; } @@ -218,7 +231,7 @@ width: 16rpx; height: 16rpx; border-radius: 50%; - background: #ff4f91; + background: #ff2d6e; animation: bounce 1.2s infinite; } @@ -234,7 +247,7 @@ .end-tip { text-align: center; font-size: 24rpx; - color: #c4b8d0; + color: #a59cb5; padding: 32rpx; } @@ -255,12 +268,12 @@ .empty-title { font-size: 34rpx; font-weight: 900; - color: #272235; + color: #2b2438; } .empty-desc { font-size: 26rpx; - color: #9b8fa8; + color: #a59cb5; text-align: center; line-height: 1.6; } diff --git a/miniprogram/pages/friends/friends.wxss b/miniprogram/pages/friends/friends.wxss index fc550d9..0ea294f 100644 --- a/miniprogram/pages/friends/friends.wxss +++ b/miniprogram/pages/friends/friends.wxss @@ -1,6 +1,6 @@ .friends-page { min-height: 100vh; - background: linear-gradient(180deg, #fff8f2 0%, #f5f0ff 100%); + background: #ffffff; display: flex; flex-direction: column; } @@ -21,36 +21,46 @@ flex-shrink: 0; } -.topbar-logo { font-size: 44rpx; font-weight: 900; color: #272235; } +.topbar-logo { + font-size: 46rpx; + font-weight: 800; + letter-spacing: -0.5rpx; + color: #2b2438; +} -.logo-accent { color: #ff4f91; } +.logo-accent { + background: linear-gradient(120deg, #ff2d6e, #ff7a1a); + -webkit-background-clip: text; + background-clip: text; + color: transparent; +} .topbar-tabs { flex: 1; display: flex; gap: 6rpx; } .ftab { font-size: 28rpx; font-weight: 700; - color: #9b8fa8; + color: #a59cb5; padding: 10rpx 20rpx; border-radius: 999rpx; } -.ftab-active { color: #ff4f91; background: rgba(255, 79, 145, 0.10); font-weight: 900; } +.ftab-active { color: #ff2d6e; background: rgba(255, 45, 110, 0.12); font-weight: 900; } .ftab-count { font-size: 22rpx; font-weight: 800; } .topbar-btn { - width: 60rpx; - height: 60rpx; - border-radius: 50%; - background: linear-gradient(135deg, #ff4f91, #ff9f1c); + width: 64rpx; + height: 64rpx; + border-radius: 26rpx; + background: linear-gradient(135deg, #ff2d6e, #ff7a1a); color: #fff; font-size: 40rpx; font-weight: 200; display: flex; align-items: center; justify-content: center; - box-shadow: 0 8rpx 16rpx rgba(255, 79, 145, 0.28); + box-shadow: 0 12rpx 24rpx rgba(255, 45, 110, 0.30); } /* 空态 */ @@ -65,17 +75,36 @@ display: flex; flex-direction: column; align-items: center; - gap: 16rpx; - padding: 0 60rpx; + gap: 18rpx; + padding: 48rpx 60rpx; + text-align: center; } -.empty-emoji { font-size: 80rpx; } +.empty-emoji { + font-size: 64rpx; + color: #8b5cf6; + background: var(--glass); + backdrop-filter: blur(28rpx) saturate(170%); + -webkit-backdrop-filter: blur(28rpx) saturate(170%); + border: 1rpx solid var(--glass-edge); + border-radius: 40rpx; + padding: 28rpx; + box-shadow: var(--shadow-soft); +} -.empty-title { font-size: 34rpx; font-weight: 900; color: #272235; } +.empty-title { font-size: 34rpx; font-weight: 900; color: #2b2438; } -.empty-desc { font-size: 26rpx; color: #9b8fa8; text-align: center; line-height: 1.6; } +.empty-desc { font-size: 26rpx; color: #6e6480; text-align: center; line-height: 1.6; } -.go-btn { margin-top: 20rpx; padding: 22rpx 60rpx; font-size: 28rpx; font-weight: 800; } +.go-btn { + margin-top: 12rpx; + padding: 22rpx 60rpx; + font-size: 26rpx; + font-weight: 800; + border: 1.5rpx solid rgba(255, 255, 255, 0.7); + background: linear-gradient(135deg, #ff2d6e, #8b5cf6); + box-shadow: 0 18rpx 36rpx rgba(139, 92, 246, 0.32); +} /* 好友列表 */ .friends-scroll { flex: 1; } @@ -84,21 +113,27 @@ display: flex; align-items: center; gap: 20rpx; - padding: 20rpx 28rpx; - background: rgba(255, 255, 255, 0.80); - border-bottom: 1rpx solid rgba(43, 37, 61, 0.05); + padding: 22rpx; + margin: 0 28rpx 20rpx; + background: var(--glass); + backdrop-filter: blur(28rpx) saturate(170%); + -webkit-backdrop-filter: blur(28rpx) saturate(170%); + border: 1rpx solid var(--glass-edge); + border-radius: 44rpx; + box-shadow: var(--shadow-soft), inset 0 1rpx 0 rgba(255, 255, 255, 0.6); } .friend-avatar { - width: 88rpx; - height: 88rpx; - border-radius: 28rpx; + width: 92rpx; + height: 92rpx; + border-radius: 32rpx; display: flex; align-items: center; justify-content: center; font-size: 36rpx; font-weight: 800; - color: rgba(39, 34, 53, 0.72); + color: rgba(43, 36, 56, 0.72); + border: 3rpx solid rgba(255, 255, 255, 0.8); flex-shrink: 0; } @@ -111,20 +146,20 @@ margin-bottom: 6rpx; } -.friend-name { font-size: 28rpx; font-weight: 800; color: #272235; } +.friend-name { font-size: 28rpx; font-weight: 800; color: #2b2438; } .online-tag { font-size: 20rpx; font-weight: 800; - color: #2fd37a; - background: rgba(47, 211, 122, 0.12); + color: #00a87a; + background: rgba(0, 217, 160, 0.14); border-radius: 999rpx; padding: 4rpx 12rpx; } .friend-bio { font-size: 24rpx; - color: #9b8fa8; + color: #a59cb5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -132,17 +167,25 @@ } .follow-btn { - background: linear-gradient(135deg, #ff4f91, #ff9f1c); + background: linear-gradient(135deg, #ff2d6e, #ff7a1a); color: #fff; + border: 1.5rpx solid rgba(255, 255, 255, 0.7); border-radius: 999rpx; padding: 14rpx 28rpx; font-size: 24rpx; font-weight: 800; flex-shrink: 0; + box-shadow: 0 12rpx 24rpx rgba(255, 45, 110, 0.28); + transition: transform 0.18s ease; +} + +.follow-btn:active { + transform: scale(0.94); } .follow-btn.following { - background: rgba(255, 255, 255, 0.80); - border: 1rpx solid rgba(43, 37, 61, 0.12); - color: #9b8fa8; + background: rgba(255, 255, 255, 0.55); + border: 1rpx solid rgba(43, 36, 56, 0.12); + color: #a59cb5; + box-shadow: none; } diff --git a/miniprogram/pages/nearby/nearby.wxss b/miniprogram/pages/nearby/nearby.wxss index 6f1bbd1..b8598b1 100644 --- a/miniprogram/pages/nearby/nearby.wxss +++ b/miniprogram/pages/nearby/nearby.wxss @@ -2,7 +2,7 @@ display: flex; flex-direction: column; height: 100vh; - background: linear-gradient(180deg, #c9f7df 0%, #d8efff 40%, #fff1a6 100%); + background: #ffffff; overflow: hidden; } @@ -13,36 +13,44 @@ padding-left: 28rpx; flex-shrink: 0; box-sizing: border-box; - background: rgba(255, 255, 255, 0.72); + background: #ffffff; } /* 次级菜单栏:胶囊下方,全宽 */ .subbar { display: flex; align-items: center; - padding: 8rpx 28rpx 12rpx; + padding: 8rpx 28rpx 16rpx; gap: 16rpx; flex-shrink: 0; - background: rgba(255, 255, 255, 0.72); + background: #ffffff; } .topbar-logo { - font-size: 44rpx; - font-weight: 900; - color: #272235; + font-size: 46rpx; + font-weight: 800; + letter-spacing: -0.5rpx; + color: #2b2438; flex-shrink: 0; } -.logo-accent { color: #ff4f91; } +.logo-accent { + background: linear-gradient(120deg, #ff2d6e, #ff7a1a); + -webkit-background-clip: text; + background-clip: text; + color: transparent; +} .view-toggle { flex: 1; display: flex; - background: rgba(255, 255, 255, 0.60); + background: var(--glass); + backdrop-filter: blur(28rpx) saturate(170%); + -webkit-backdrop-filter: blur(28rpx) saturate(170%); border-radius: 999rpx; - padding: 4rpx; + padding: 6rpx; gap: 4rpx; - border: 1rpx solid rgba(255, 255, 255, 0.80); + border: 1rpx solid var(--glass-edge); } .toggle-btn { @@ -50,28 +58,33 @@ text-align: center; font-size: 24rpx; font-weight: 700; - color: #9b8fa8; + color: #a59cb5; padding: 12rpx 0; border-radius: 999rpx; + transition: all 0.2s ease; } .toggle-active { - background: rgba(255, 255, 255, 0.90); - color: #272235; + background: rgba(255, 255, 255, 0.85); + color: #2b2438; font-weight: 900; - box-shadow: 0 4rpx 10rpx rgba(78, 56, 96, 0.10); + box-shadow: 0 8rpx 18rpx rgba(120, 70, 140, 0.14); } .topbar-btn { - width: 60rpx; - height: 60rpx; - border-radius: 50%; - background: rgba(255, 255, 255, 0.72); - box-shadow: 0 8rpx 18rpx rgba(78, 56, 96, 0.10); + width: 64rpx; + height: 64rpx; + border-radius: 26rpx; + background: var(--glass); + backdrop-filter: blur(28rpx) saturate(170%); + -webkit-backdrop-filter: blur(28rpx) saturate(170%); + border: 1rpx solid var(--glass-edge); + box-shadow: var(--shadow-soft); display: flex; align-items: center; justify-content: center; - font-size: 30rpx; + font-size: 28rpx; + color: #6e6480; } /* 地图 */ @@ -98,18 +111,20 @@ } .map-ctrl-btn { - width: 72rpx; - height: 72rpx; - background: rgba(255, 255, 255, 0.90); - border: 1rpx solid rgba(255, 255, 255, 0.80); - border-radius: 22rpx; - box-shadow: 0 10rpx 20rpx rgba(82, 66, 105, 0.16); + width: 76rpx; + height: 76rpx; + background: var(--glass-strong); + backdrop-filter: blur(34rpx) saturate(180%); + -webkit-backdrop-filter: blur(34rpx) saturate(180%); + border: 1rpx solid var(--glass-edge); + border-radius: 26rpx; + box-shadow: var(--shadow-soft); display: flex; align-items: center; justify-content: center; font-size: 30rpx; font-weight: 800; - color: #4d8dff; + color: #1f9bff; } /* 宠物弹窗 */ @@ -118,14 +133,16 @@ bottom: 300rpx; left: 50%; transform: translateX(-50%); - background: rgba(255, 255, 255, 0.92); - border: 1rpx solid rgba(255, 255, 255, 0.72); - border-radius: 30rpx; - padding: 20rpx 24rpx; + background: var(--glass-strong); + backdrop-filter: blur(34rpx) saturate(180%); + -webkit-backdrop-filter: blur(34rpx) saturate(180%); + border: 1rpx solid var(--glass-edge); + border-radius: 36rpx; + padding: 22rpx 26rpx; display: flex; align-items: center; gap: 18rpx; - box-shadow: 0 18rpx 40rpx rgba(95, 49, 104, 0.18); + box-shadow: var(--shadow-soft), inset 0 1rpx 0 rgba(255, 255, 255, 0.7); min-width: 520rpx; z-index: 20; } @@ -147,13 +164,13 @@ display: block; font-size: 28rpx; font-weight: 800; - color: #272235; + color: #2b2438; } .popup-sub { display: block; font-size: 22rpx; - color: #9b8fa8; + color: #a59cb5; margin-top: 4rpx; } @@ -170,13 +187,16 @@ position: absolute; top: 20rpx; left: 20rpx; - background: rgba(255, 255, 255, 0.90); + background: var(--glass-strong); + backdrop-filter: blur(28rpx) saturate(170%); + -webkit-backdrop-filter: blur(28rpx) saturate(170%); + border: 1rpx solid var(--glass-edge); border-radius: 999rpx; - padding: 10rpx 20rpx; + padding: 10rpx 22rpx; font-size: 22rpx; font-weight: 800; - color: #ff4f91; - box-shadow: 0 8rpx 16rpx rgba(78, 56, 96, 0.12); + color: #ff2d6e; + box-shadow: var(--shadow-soft); z-index: 10; } @@ -187,8 +207,10 @@ left: 0; right: 0; z-index: 15; - background: rgba(255, 255, 255, 0.85); - border-top: 1rpx solid rgba(255, 255, 255, 0.72); + background: var(--glass-strong); + backdrop-filter: blur(34rpx) saturate(180%); + -webkit-backdrop-filter: blur(34rpx) saturate(180%); + border-top: 1rpx solid var(--glass-edge); padding: 20rpx 0; } @@ -201,12 +223,12 @@ display: inline-flex; align-items: center; gap: 12rpx; - background: rgba(255, 255, 255, 0.80); + background: rgba(255, 255, 255, 0.50); border: 1rpx solid rgba(255, 255, 255, 0.72); - border-radius: 24rpx; + border-radius: 26rpx; padding: 14rpx 18rpx; margin-right: 16rpx; - box-shadow: 0 8rpx 16rpx rgba(78, 56, 96, 0.08); + box-shadow: 0 12rpx 26rpx rgba(120, 70, 140, 0.12); } .preview-avatar { @@ -229,19 +251,19 @@ .preview-name { font-size: 26rpx; font-weight: 800; - color: #272235; + color: #2b2438; } .preview-dist { font-size: 20rpx; - color: #4d8dff; + color: #1f9bff; font-weight: 700; } /* 列表视图 */ .list-scroll { flex: 1; - background: linear-gradient(180deg, #fff9fb 0%, #f5f0ff 100%); + background: #ffffff; } .list-header { @@ -252,18 +274,19 @@ } .list-title { - font-size: 30rpx; - font-weight: 900; - color: #272235; + font-size: 32rpx; + font-weight: 800; + color: #2b2438; } .online-chip { font-size: 24rpx; - font-weight: 700; - color: #ff4f91; - background: #ffe5f0; + font-weight: 800; + color: #fff; + background: linear-gradient(135deg, #ff2d6e, #ff7a1a); border-radius: 999rpx; - padding: 8rpx 16rpx; + padding: 10rpx 22rpx; + box-shadow: 0 12rpx 24rpx rgba(255, 45, 110, 0.30); } /* 列表项 */ @@ -271,23 +294,26 @@ display: flex; align-items: center; gap: 18rpx; - background: rgba(255, 255, 255, 0.80); - border: 1rpx solid rgba(255, 255, 255, 0.72); - border-radius: 40rpx; + background: var(--glass); + backdrop-filter: blur(28rpx) saturate(170%); + -webkit-backdrop-filter: blur(28rpx) saturate(170%); + border: 1rpx solid var(--glass-edge); + border-radius: 48rpx; margin: 0 28rpx 20rpx; - padding: 20rpx; - box-shadow: 0 12rpx 26rpx rgba(80, 58, 108, 0.09); + padding: 22rpx; + box-shadow: var(--shadow-soft), inset 0 1rpx 0 rgba(255, 255, 255, 0.6); } .nearby-avatar { - width: 88rpx; - height: 88rpx; - border-radius: 30rpx; + width: 92rpx; + height: 92rpx; + border-radius: 32rpx; display: flex; align-items: center; justify-content: center; font-size: 40rpx; flex-shrink: 0; + border: 3rpx solid rgba(255, 255, 255, 0.8); } .avatar-emoji { font-size: 40rpx; line-height: 1; } @@ -303,17 +329,17 @@ .nearby-pet-name { font-size: 28rpx; - font-weight: 900; - color: #272235; + font-weight: 800; + color: #2b2438; } .breed-chip { font-size: 20rpx; font-weight: 800; - background: #ffe5f0; - color: #a91d5b; + color: #fff; + background: #ff2d6e; border-radius: 999rpx; - padding: 4rpx 12rpx; + padding: 4rpx 14rpx; } .nearby-sub { @@ -321,16 +347,16 @@ align-items: center; gap: 8rpx; font-size: 22rpx; - color: #9b8fa8; + color: #a59cb5; } .online-dot { width: 14rpx; height: 14rpx; border-radius: 50%; - background: #2fd37a; + background: #00d9a0; flex-shrink: 0; - box-shadow: 0 0 0 4rpx rgba(47, 211, 122, 0.18); + box-shadow: 0 0 0 4rpx rgba(0, 217, 160, 0.18); } .nearby-right { @@ -344,18 +370,23 @@ .dist-text { font-size: 22rpx; font-weight: 800; - color: #4d8dff; + color: #1f9bff; } .say-hi { - background: linear-gradient(135deg, #fff, #fff4b7); - border: 1rpx solid rgba(255, 255, 255, 0.8); + background: linear-gradient(135deg, #ff2d6e, #ff7a1a); + border: 1.5rpx solid rgba(255, 255, 255, 0.7); border-radius: 999rpx; - padding: 12rpx 22rpx; + padding: 14rpx 26rpx; font-size: 22rpx; font-weight: 800; - color: #272235; - box-shadow: 0 8rpx 16rpx rgba(255, 159, 28, 0.14); + color: #fff; + box-shadow: 0 14rpx 28rpx rgba(255, 45, 110, 0.32); + transition: transform 0.18s ease; +} + +.say-hi:active { + transform: scale(0.94); } /* 骨架 */ @@ -387,12 +418,12 @@ .empty-title { font-size: 34rpx; font-weight: 900; - color: #272235; + color: #2b2438; } .empty-desc { font-size: 26rpx; - color: #9b8fa8; + color: #a59cb5; text-align: center; line-height: 1.6; } diff --git a/miniprogram/pages/post/post.wxss b/miniprogram/pages/post/post.wxss index f3c61f8..c80411d 100644 --- a/miniprogram/pages/post/post.wxss +++ b/miniprogram/pages/post/post.wxss @@ -1,6 +1,6 @@ .post-page { min-height: 100vh; - background: linear-gradient(180deg, #fff8f2 0%, #fff4fb 100%); + background: #ffffff; display: flex; flex-direction: column; } @@ -11,8 +11,11 @@ align-items: center; justify-content: space-between; padding-left: 28rpx; - border-bottom: 1rpx solid rgba(255, 255, 255, 0.72); - background: rgba(255, 255, 255, 0.60); + background: var(--glass-strong); + backdrop-filter: blur(34rpx) saturate(180%); + -webkit-backdrop-filter: blur(34rpx) saturate(180%); + border-bottom: 1rpx solid var(--glass-edge); + border-radius: 0 0 40rpx 40rpx; flex-shrink: 0; box-sizing: border-box; } @@ -20,29 +23,31 @@ .cancel-btn { font-size: 28rpx; font-weight: 700; - color: #9b8fa8; + color: #6e6480; padding: 10rpx; } .header-title { font-size: 32rpx; - font-weight: 900; - color: #272235; + font-weight: 800; + color: #2b2438; } .submit-btn { - background: linear-gradient(135deg, #ff4f91, #ff9f1c); + background: linear-gradient(135deg, #ff2d6e, #ff7a1a); color: #fff; + border: 1.5rpx solid rgba(255, 255, 255, 0.7); border-radius: 999rpx; padding: 14rpx 34rpx; font-size: 26rpx; - font-weight: 900; - box-shadow: 0 10rpx 22rpx rgba(255, 79, 145, 0.28); + font-weight: 800; + box-shadow: 0 14rpx 28rpx rgba(255, 45, 110, 0.32); } .submit-disabled { - background: #e8e4f0; - color: #9b8fa8; + background: rgba(165, 156, 181, 0.30); + color: #a59cb5; + border-color: transparent; box-shadow: none; } @@ -59,28 +64,39 @@ .upload-placeholder { width: 100%; height: 320rpx; - background: linear-gradient(135deg, #fff0a8, #ffd6e8 48%, #c9f7df); - border: 3rpx dashed rgba(39, 34, 53, 0.18); - border-radius: 48rpx; + background: + radial-gradient(60% 80% at 30% 20%, rgba(255, 217, 61, 0.28), transparent 60%), + radial-gradient(60% 80% at 80% 80%, rgba(0, 217, 160, 0.22), transparent 60%), + rgba(255, 255, 255, 0.34); + backdrop-filter: blur(28rpx) saturate(170%); + -webkit-backdrop-filter: blur(28rpx) saturate(170%); + border: 3rpx dashed rgba(43, 36, 56, 0.20); + border-radius: 56rpx; display: flex; flex-direction: column; align-items: center; justify-content: center; - gap: 16rpx; - box-shadow: inset 0 0 0 2rpx rgba(255, 255, 255, 0.65), 0 16rpx 32rpx rgba(83, 62, 100, 0.09); + gap: 18rpx; + box-shadow: var(--shadow-soft); } -.upload-icon { font-size: 64rpx; } +.upload-icon { + font-size: 56rpx; + color: #ff2d6e; + background: rgba(255, 255, 255, 0.6); + border-radius: 28rpx; + padding: 18rpx; +} .upload-hint { font-size: 28rpx; font-weight: 800; - color: #272235; + color: #2b2438; } .upload-sub { font-size: 22rpx; - color: #9b8fa8; + color: #a59cb5; } /* 图片网格 */ @@ -110,7 +126,9 @@ width: 44rpx; height: 44rpx; border-radius: 50%; - background: rgba(39, 34, 53, 0.72); + background: rgba(43, 36, 56, 0.65); + backdrop-filter: blur(12rpx); + -webkit-backdrop-filter: blur(12rpx); color: #fff; font-size: 28rpx; display: flex; @@ -131,8 +149,8 @@ .upload-spinner { width: 40rpx; height: 40rpx; - border: 4rpx solid rgba(255, 79, 145, 0.2); - border-top-color: #ff4f91; + border: 4rpx solid rgba(255, 45, 110, 0.2); + border-top-color: #ff2d6e; border-radius: 50%; animation: spin 0.8s linear infinite; } @@ -142,8 +160,10 @@ .image-add { aspect-ratio: 1; border-radius: 20rpx; - background: rgba(255, 255, 255, 0.72); - border: 3rpx dashed rgba(39, 34, 53, 0.18); + background: var(--glass); + backdrop-filter: blur(28rpx) saturate(170%); + -webkit-backdrop-filter: blur(28rpx) saturate(170%); + border: 3rpx dashed rgba(43, 36, 56, 0.20); display: flex; align-items: center; justify-content: center; @@ -151,7 +171,7 @@ .add-plus { font-size: 60rpx; - color: #9b8fa8; + color: #a59cb5; font-weight: 200; } @@ -159,15 +179,17 @@ .content-input { width: 100%; min-height: 160rpx; - background: rgba(255, 255, 255, 0.80); - border: 1rpx solid rgba(255, 255, 255, 0.72); - border-radius: 36rpx; + background: var(--glass); + backdrop-filter: blur(28rpx) saturate(170%); + -webkit-backdrop-filter: blur(28rpx) saturate(170%); + border: 1rpx solid var(--glass-edge); + border-radius: 40rpx; padding: 24rpx 28rpx; font-size: 30rpx; - color: #272235; + color: #2b2438; font-family: "PingFang SC", sans-serif; line-height: 1.6; - box-shadow: 0 10rpx 24rpx rgba(78, 56, 96, 0.07); + box-shadow: var(--shadow-soft); margin-bottom: 8rpx; } @@ -176,23 +198,22 @@ .word-count { text-align: right; font-size: 22rpx; - color: #9b8fa8; + color: #a59cb5; margin-bottom: 28rpx; } /* 通用 section */ .section-title { - font-size: 24rpx; - font-weight: 900; - color: #9b8fa8; - letter-spacing: 0.5rpx; - margin-bottom: 14rpx; - text-transform: uppercase; + font-size: 22rpx; + font-weight: 800; + color: #a59cb5; + letter-spacing: 0.6rpx; + margin-bottom: 16rpx; } .tag-row { display: flex; - gap: 14rpx; + gap: 16rpx; flex-wrap: wrap; margin-bottom: 28rpx; align-items: center; @@ -202,27 +223,30 @@ display: flex; align-items: center; gap: 10rpx; - background: rgba(255, 255, 255, 0.78); - border: 1rpx solid rgba(255, 255, 255, 0.72); + background: var(--glass); + backdrop-filter: blur(24rpx) saturate(170%); + -webkit-backdrop-filter: blur(24rpx) saturate(170%); + border: 1rpx solid var(--glass-edge); border-radius: 999rpx; - padding: 14rpx 24rpx; - font-size: 26rpx; + padding: 16rpx 26rpx; + font-size: 24rpx; font-weight: 800; - color: #6a6178; + color: #6e6480; } .tag-selected { - background: #ffe5f0; - border-color: #ffb6d0; - color: #a91d5b; + background: #ff2d6e; + border-color: #ff2d6e; + color: #fff; + box-shadow: 0 14rpx 30rpx rgba(255, 45, 110, 0.32); } .tag-remove { width: 44rpx; height: 44rpx; border-radius: 50%; - background: #ffe5f0; - color: #ff4f91; + background: rgba(255, 45, 110, 0.14); + color: #ff2d6e; display: flex; align-items: center; justify-content: center; @@ -242,22 +266,26 @@ .hashtag-input { flex: 1; height: 72rpx; - background: rgba(255, 255, 255, 0.80); - border: 1rpx solid rgba(255, 255, 255, 0.72); + background: var(--glass); + backdrop-filter: blur(24rpx) saturate(170%); + -webkit-backdrop-filter: blur(24rpx) saturate(170%); + border: 1rpx solid var(--glass-edge); border-radius: 999rpx; padding: 0 24rpx; font-size: 26rpx; - color: #272235; + color: #2b2438; } .hashtag-add-btn { - background: rgba(255, 255, 255, 0.80); - border: 1rpx solid rgba(255, 255, 255, 0.72); + background: var(--glass); + backdrop-filter: blur(24rpx) saturate(170%); + -webkit-backdrop-filter: blur(24rpx) saturate(170%); + border: 1rpx solid var(--glass-edge); border-radius: 999rpx; padding: 14rpx 28rpx; font-size: 26rpx; font-weight: 800; - color: #272235; + color: #2b2438; } .hashtag-chip { @@ -266,15 +294,16 @@ gap: 8rpx; font-size: 24rpx; font-weight: 800; - color: #8b3cff; - background: #f0e8ff; + color: #8a3fe0; + background: rgba(167, 139, 250, 0.16); + border: 1rpx solid rgba(167, 139, 250, 0.28); border-radius: 999rpx; padding: 8rpx 16rpx; } .chip-remove { font-size: 26rpx; - color: #8b3cff; + color: #8a3fe0; font-weight: 700; } @@ -288,14 +317,14 @@ .hot-tags-label { font-size: 22rpx; - color: #9b8fa8; + color: #a59cb5; } .hot-tag { font-size: 22rpx; - color: #9b8fa8; - background: rgba(255, 255, 255, 0.72); - border: 1rpx solid rgba(43, 37, 61, 0.10); + color: #a59cb5; + background: rgba(255, 255, 255, 0.5); + border: 1rpx solid rgba(43, 36, 56, 0.10); border-radius: 999rpx; padding: 6rpx 16rpx; } @@ -309,17 +338,25 @@ } .mood-pill { - background: rgba(255, 255, 255, 0.78); - border: 1rpx solid rgba(255, 255, 255, 0.72); + background: var(--glass); + backdrop-filter: blur(24rpx) saturate(170%); + -webkit-backdrop-filter: blur(24rpx) saturate(170%); + border: 1rpx solid var(--glass-edge); border-radius: 999rpx; - padding: 14rpx 26rpx; - font-size: 26rpx; + padding: 16rpx 28rpx; + font-size: 24rpx; font-weight: 800; - color: #6a6178; + color: #6e6480; + transition: transform 0.18s ease; +} + +.mood-pill:active { + transform: scale(0.95); } .mood-on { - background: #fff0a8; - border-color: #ffe15a; - color: #6f4b00; + background: #ffd400; + border-color: #ffd400; + color: #5b3d00; + box-shadow: 0 14rpx 30rpx rgba(255, 212, 0, 0.36); } diff --git a/miniprogram/pages/profile/profile.wxml b/miniprogram/pages/profile/profile.wxml index 2db520c..c021af5 100644 --- a/miniprogram/pages/profile/profile.wxml +++ b/miniprogram/pages/profile/profile.wxml @@ -19,6 +19,8 @@ > + + diff --git a/miniprogram/pages/profile/profile.wxss b/miniprogram/pages/profile/profile.wxss index 6b01b19..92582fc 100644 --- a/miniprogram/pages/profile/profile.wxss +++ b/miniprogram/pages/profile/profile.wxss @@ -1,6 +1,6 @@ .profile-page { min-height: 100vh; - background: linear-gradient(180deg, #fff8f2 0%, #fff4fb 50%, #f5f0ff 100%); + background: #ffffff; display: flex; flex-direction: column; } @@ -17,31 +17,55 @@ .navbar-title { font-size: 36rpx; - font-weight: 900; - color: #272235; + font-weight: 800; + color: #2b2438; } .settings-btn { - width: 60rpx; - height: 60rpx; - border-radius: 50%; - background: rgba(255, 255, 255, 0.72); - box-shadow: 0 8rpx 18rpx rgba(78, 56, 96, 0.10); + width: 64rpx; + height: 64rpx; + border-radius: 26rpx; + background: var(--glass); + backdrop-filter: blur(28rpx) saturate(170%); + -webkit-backdrop-filter: blur(28rpx) saturate(170%); + border: 1rpx solid var(--glass-edge); + box-shadow: var(--shadow-soft); display: flex; align-items: center; justify-content: center; - font-size: 30rpx; + font-size: 28rpx; } .profile-scroll { flex: 1; } -/* 用户信息区 */ +/* 用户信息区:玻璃英雄卡 + 漂浮渐变光斑 */ .profile-header { - padding: 16rpx 28rpx 28rpx; - background: linear-gradient(180deg, rgba(255, 225, 90, 0.18), transparent); + position: relative; + margin: 8rpx 28rpx 20rpx; + padding: 32rpx 28rpx 26rpx; + overflow: hidden; + border-radius: 56rpx; + background: var(--glass); + backdrop-filter: blur(28rpx) saturate(170%); + -webkit-backdrop-filter: blur(28rpx) saturate(170%); + border: 1rpx solid var(--glass-edge); + box-shadow: var(--shadow-soft), inset 0 1rpx 0 rgba(255, 255, 255, 0.65); } +.hero-blob { + position: absolute; + border-radius: 50%; + filter: blur(70rpx); + opacity: 0.5; + pointer-events: none; +} + +.hb1 { width: 260rpx; height: 260rpx; background: #ffd400; top: -100rpx; right: -60rpx; } +.hb2 { width: 200rpx; height: 200rpx; background: #00d9a0; bottom: -80rpx; left: -40rpx; } + .user-top { + position: relative; + z-index: 1; display: flex; align-items: flex-start; gap: 24rpx; @@ -54,30 +78,33 @@ } .user-avatar { - width: 128rpx; - height: 128rpx; - border-radius: 40rpx; + width: 132rpx; + height: 132rpx; + border-radius: 44rpx; display: flex; align-items: center; justify-content: center; - box-shadow: 0 12rpx 24rpx rgba(98, 60, 118, 0.18); + border: 4rpx solid rgba(255, 255, 255, 0.85); + box-shadow: 0 18rpx 36rpx rgba(120, 70, 150, 0.22); } .avatar-text { font-size: 56rpx; font-weight: 800; - color: rgba(39, 34, 53, 0.72); + color: rgba(43, 36, 56, 0.72); } .avatar-edit { position: absolute; bottom: -6rpx; right: -6rpx; - width: 44rpx; - height: 44rpx; + width: 46rpx; + height: 46rpx; border-radius: 50%; - background: #fff; - box-shadow: 0 4rpx 10rpx rgba(78, 56, 96, 0.16); + background: rgba(255, 255, 255, 0.85); + backdrop-filter: blur(16rpx); + -webkit-backdrop-filter: blur(16rpx); + box-shadow: 0 8rpx 18rpx rgba(120, 70, 150, 0.18); display: flex; align-items: center; justify-content: center; @@ -98,40 +125,41 @@ } .user-name { - font-size: 36rpx; - font-weight: 900; - color: #272235; + font-size: 34rpx; + font-weight: 800; + color: #2b2438; } .user-handle { display: block; font-size: 24rpx; - color: #9b8fa8; + color: #a59cb5; margin-bottom: 10rpx; } .user-bio { display: block; - font-size: 26rpx; - color: #6a6178; - line-height: 1.5; + font-size: 24rpx; + color: #6e6480; + line-height: 1.6; } .edit-profile-btn { - background: rgba(255, 255, 255, 0.80); - border: 1rpx solid rgba(255, 255, 255, 0.72); + background: rgba(255, 255, 255, 0.55); + border: 1.5rpx solid #8b5cf6; border-radius: 999rpx; padding: 14rpx 28rpx; font-size: 24rpx; font-weight: 800; - color: #272235; + color: #8b5cf6; flex-shrink: 0; - box-shadow: 0 8rpx 18rpx rgba(78, 56, 96, 0.08); align-self: flex-start; } /* 数据统计 */ .stats-row { + position: relative; + z-index: 1; display: flex; gap: 16rpx; align-items: center; @@ -139,26 +167,29 @@ .stat-item { flex: 1; - padding: 24rpx 0; + padding: 22rpx 0; text-align: center; - background: rgba(255, 255, 255, 0.78); - border: 1rpx solid rgba(255, 255, 255, 0.72); - border-radius: 30rpx; - box-shadow: 0 10rpx 22rpx rgba(78, 56, 96, 0.07); + background: var(--glass-strong); + backdrop-filter: blur(34rpx) saturate(180%); + -webkit-backdrop-filter: blur(34rpx) saturate(180%); + border: 1rpx solid var(--glass-edge); + border-radius: 36rpx; + box-shadow: var(--shadow-soft), inset 0 1rpx 0 rgba(255, 255, 255, 0.7); } .stat-num { display: block; - font-size: 40rpx; - font-weight: 900; - color: #ff4f91; + font-size: 38rpx; + font-weight: 800; + color: #ff2d6e; + font-variant-numeric: tabular-nums; } .stat-label { display: block; - font-size: 22rpx; + font-size: 21rpx; font-weight: 700; - color: #9b8fa8; + color: #a59cb5; margin-top: 4rpx; } @@ -175,18 +206,17 @@ } .section-title { - font-size: 26rpx; - font-weight: 900; - color: #9b8fa8; - letter-spacing: 0.5rpx; - text-transform: uppercase; + font-size: 22rpx; + font-weight: 800; + color: #a59cb5; + letter-spacing: 0.6rpx; } .add-pet-btn { font-size: 24rpx; font-weight: 800; - color: #ff4f91; - background: #ffe5f0; + color: #ff2d6e; + background: rgba(255, 45, 110, 0.12); border-radius: 999rpx; padding: 8rpx 20rpx; } @@ -201,33 +231,37 @@ display: inline-flex; align-items: center; gap: 18rpx; - background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(201, 247, 223, 0.72)); - border: 1rpx solid rgba(255, 255, 255, 0.72); - border-radius: 36rpx; + background: var(--glass); + backdrop-filter: blur(28rpx) saturate(170%); + -webkit-backdrop-filter: blur(28rpx) saturate(170%); + border: 1rpx solid var(--glass-edge); + border-radius: 40rpx; padding: 20rpx 24rpx; margin-right: 20rpx; - box-shadow: 0 12rpx 26rpx rgba(78, 56, 96, 0.09); + box-shadow: var(--shadow-soft), inset 0 1rpx 0 rgba(255, 255, 255, 0.6); white-space: normal; vertical-align: top; max-width: 560rpx; } .pet-card-empty { - background: rgba(255, 255, 255, 0.60); - border: 3rpx dashed rgba(43, 37, 61, 0.16); + background: rgba(255, 255, 255, 0.40); + border: 3rpx dashed rgba(43, 36, 56, 0.18); + box-shadow: none; } .pet-avatar { width: 84rpx; height: 84rpx; - border-radius: 28rpx; + border-radius: 30rpx; display: flex; align-items: center; justify-content: center; + border: 2.5rpx solid rgba(255, 255, 255, 0.8); flex-shrink: 0; } -.pet-avatar-add { background: rgba(255, 255, 255, 0.60); color: #9b8fa8; } +.pet-avatar-add { background: rgba(255, 255, 255, 0.55); border-style: dashed; color: #a59cb5; } .pet-emoji { font-size: 44rpx; line-height: 1; } @@ -236,45 +270,49 @@ .pet-name { display: block; font-size: 28rpx; - font-weight: 900; - color: #272235; + font-weight: 800; + color: #2b2438; margin-bottom: 6rpx; } .pet-breed { display: block; font-size: 22rpx; - color: #9b8fa8; + color: #a59cb5; } .pet-badge { - background: #ffe5f0; - border-radius: 999rpx; - padding: 8rpx 16rpx; + background: linear-gradient(135deg, #ff2d6e, #8b5cf6); + color: #fff; + border-radius: 24rpx; + padding: 10rpx 18rpx; font-size: 20rpx; - color: #a91d5b; - font-weight: 900; + font-weight: 800; flex-shrink: 0; + transform: rotate(3deg); + box-shadow: 0 12rpx 24rpx rgba(139, 92, 246, 0.3); } /* 视图切换 */ .view-toggle { display: flex; - background: rgba(255, 255, 255, 0.60); - border: 1rpx solid rgba(43, 37, 61, 0.10); - border-radius: 14rpx; + background: var(--glass); + backdrop-filter: blur(24rpx) saturate(170%); + -webkit-backdrop-filter: blur(24rpx) saturate(170%); + border: 1rpx solid var(--glass-edge); + border-radius: 18rpx; overflow: hidden; } .toggle-item { padding: 10rpx 20rpx; font-size: 24rpx; - color: #9b8fa8; + color: #a59cb5; } .toggle-item.active { - background: rgba(255, 79, 145, 0.12); - color: #ff4f91; + background: rgba(255, 45, 110, 0.14); + color: #ff2d6e; font-weight: 800; } @@ -282,15 +320,16 @@ .post-grid { display: grid; grid-template-columns: repeat(3, 1fr); - gap: 6rpx; + gap: 9rpx; padding: 0 28rpx 20rpx; } .grid-item { aspect-ratio: 1; - border-radius: 28rpx; + border-radius: 26rpx; overflow: hidden; - background: #f0eef5; + background: rgba(255, 255, 255, 0.45); + border: 1rpx solid rgba(255, 255, 255, 0.6); display: flex; align-items: center; justify-content: center; @@ -301,7 +340,7 @@ .grid-no-img { padding: 12rpx; font-size: 20rpx; - color: #9b8fa8; + color: #a59cb5; text-align: center; line-height: 1.4; } @@ -317,6 +356,6 @@ .empty-emoji { font-size: 72rpx; } -.empty-tip { font-size: 26rpx; color: #9b8fa8; } +.empty-tip { font-size: 26rpx; color: #a59cb5; } .post-btn { padding: 18rpx 48rpx; font-size: 26rpx; font-weight: 800; margin-top: 8rpx; }