style: 按毛玻璃设计稿重做广场/附近/发布/汪友/我的五大页面视觉

参照 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),保持程序可运行。
This commit is contained in:
2026-06-08 11:36:38 +08:00
parent b02e26f602
commit 2c3c2653fa
10 changed files with 697 additions and 399 deletions

View File

@@ -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);
}