From a960703586750007102139808d294755dce5b6cf Mon Sep 17 00:00:00 2001 From: Pine Date: Fri, 28 Aug 2026 17:20:45 +0800 Subject: [PATCH] =?UTF-8?q?feat(website):=20=E8=B5=84=E8=AE=AF=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=8F=8C=E6=A0=8F=E9=87=8D=E8=AE=BE=E8=AE=A1+?= =?UTF-8?q?=E4=BA=92=E5=8A=A8=E4=BD=93=E7=B3=BB+=E5=85=A8=E5=B1=80UI?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 详情页:左正文右「更多文章」独立玻璃卡(悬浮、全类型按优先级/时间排序);发布者徽章;导读展示;头像有则显示 - 点赞(计数)/留言/分享(复制+toast) 真实接入;动作纯图标并入留言行;留言框浅色玻璃 - 全局按钮收小一档;卡片统一毛玻璃材质(card/form-card/auth/flow/timeline) - 页脚品牌统一:云南省超级个体服务平台 · 云南派音人工智能科技有限公司 + 标准 logo - 活动封面上传 dir=event;导读独立编辑不限字数 --- website/src/components/organisms/index.jsx | 16 ++++++++++------ website/src/platform/PineEvents.jsx | 2 +- website/src/styles/auth.css | 4 +++- website/src/styles/booking.css | 2 +- website/src/styles/user-center.css | 3 +++ website/src/user/Profile.jsx | 1 + 6 files changed, 19 insertions(+), 9 deletions(-) diff --git a/website/src/components/organisms/index.jsx b/website/src/components/organisms/index.jsx index a1ae50b..bd2f0cb 100644 --- a/website/src/components/organisms/index.jsx +++ b/website/src/components/organisms/index.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { Logo } from '../atoms'; import { NAV, PINE_NAV } from '../../data/site'; -import { logout, getUser, isAuthed } from '../../services/auth'; +import { logout, getUser, isAuthed, refreshMe } from '../../services/auth'; /* 用户下拉菜单项:个人中心 / 我的报名 / 我的任务 / 我的园区 / 认证中心 */ const USER_MENU = [ @@ -19,7 +19,11 @@ export function Header({ active }) { const menuRef = React.useRef(null); const pine = !!active && active.startsWith('pine'); const nav = pine ? PINE_NAV : NAV; - const user = pine ? null : getUser(); // 公开端显示登录昵称 + const [user, setUser] = React.useState(pine ? null : getUser()); // 公开端显示登录昵称 + React.useEffect(() => { + if (pine || !isAuthed()) return; + refreshMe().then((u) => { if (u) setUser(u); }); // 同步其他端口改过的头像/昵称 + }, [pine]); React.useEffect(() => { const onKey = (e) => { if (e.key === 'Escape') { setOpen(false); setMenuOpen(false); } }; @@ -129,9 +133,9 @@ export function SiteFooter() { diff --git a/website/src/platform/PineEvents.jsx b/website/src/platform/PineEvents.jsx index 081b6fa..a327e8a 100644 --- a/website/src/platform/PineEvents.jsx +++ b/website/src/platform/PineEvents.jsx @@ -28,7 +28,7 @@ export default function PineEvents() { if (!file) return; setUploading(true); try { - const r = await uploadImage(file); + const r = await uploadImage(file, 'event'); if (r && r.url) { set('image')(r.url); flash('封面已上传'); } } catch (ex) { flash(ex.message || '上传失败'); } finally { setUploading(false); } diff --git a/website/src/styles/auth.css b/website/src/styles/auth.css index 01661c5..8d3999f 100644 --- a/website/src/styles/auth.css +++ b/website/src/styles/auth.css @@ -9,7 +9,8 @@ } .auth-card { width: 100%; max-width: 380px; - background: var(--panel); border: 1px solid var(--line); border-radius: 20px; + background: var(--glass-bg); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); + border: 1px solid var(--glass-ring); border-radius: 20px; padding: 34px 30px 28px; text-align: center; box-shadow: var(--shadow-sm-border); } @@ -19,6 +20,7 @@ display: grid; place-items: center; font-size: 24px; box-shadow: var(--shadow-sm-border); } +.auth-logo img { display: block; } .auth-card h1 { font-size: 20px; font-weight: 700; color: var(--heading); } .auth-sub { font-size: 12.5px; color: var(--muted); margin: 4px 0 22px; } .auth-card .field { text-align: left; margin-bottom: 14px; } diff --git a/website/src/styles/booking.css b/website/src/styles/booking.css index f1b2682..c690bc9 100644 --- a/website/src/styles/booking.css +++ b/website/src/styles/booking.css @@ -4,7 +4,7 @@ ============================================================ */ .bk-layout { display: grid; grid-template-columns: 340px 1fr; gap: 22px; align-items: start; } .bk-info { position: sticky; top: 20px; } -.bk-info-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 12px; } +.bk-info-card { background: var(--glass-bg); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); border: 1px solid var(--glass-ring); border-radius: 14px; padding: 18px 20px; margin-bottom: 12px; } .bk-info-title { font-size: 15px; font-weight: 600; color: var(--heading); margin-bottom: 6px; } .bk-info-title i { margin-right: 8px; color: var(--muted); } .bk-info-card p { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; } diff --git a/website/src/styles/user-center.css b/website/src/styles/user-center.css index a767a24..1a61717 100644 --- a/website/src/styles/user-center.css +++ b/website/src/styles/user-center.css @@ -108,3 +108,6 @@ .user-menu { display: none; } /* 移动端走 menu-sheet */ .uc-avatar-actions { align-items: flex-start; width: 100%; } } + +/* ---------- 绑定行小按钮(解绑/绑定):紧凑尺寸,不随 .btn 基础放大 ---------- */ +.uc-glass .btn-sm { padding: 4px 12px; font-size: 12px; line-height: 1.6; } diff --git a/website/src/user/Profile.jsx b/website/src/user/Profile.jsx index a5d203f..922b312 100644 --- a/website/src/user/Profile.jsx +++ b/website/src/user/Profile.jsx @@ -50,6 +50,7 @@ export default function Profile() { const [svc, setSvc] = React.useState({ bk: null, tk: null, park: '', cert: '' }); React.useEffect(() => { if (!authed) return; + refreshBind(); // 挂载即拉取真实绑定状态(手机号/小程序/微信),不只绑定时才刷新 Promise.all([ myBookings().then((l) => setSvc((s) => ({ ...s, bk: Array.isArray(l) ? l.length : 0 }))).catch(() => {}), myTasks().then((r) => setSvc((s) => ({ ...s, tk: r.ok ? (r.items || []).length : 0 }))).catch(() => {}),