feat(website): 资讯详情双栏重设计+互动体系+全局UI优化
- 详情页:左正文右「更多文章」独立玻璃卡(悬浮、全类型按优先级/时间排序);发布者徽章;导读展示;头像有则显示 - 点赞(计数)/留言/分享(复制+toast) 真实接入;动作纯图标并入留言行;留言框浅色玻璃 - 全局按钮收小一档;卡片统一毛玻璃材质(card/form-card/auth/flow/timeline) - 页脚品牌统一:云南省超级个体服务平台 · 云南派音人工智能科技有限公司 + 标准 logo - 活动封面上传 dir=event;导读独立编辑不限字数
This commit is contained in:
@@ -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() {
|
||||
<footer className="site-footer">
|
||||
<div className="footer-grid">
|
||||
<div className="footer-brand">
|
||||
<span className="footer-logo">OPC</span>
|
||||
<span className="footer-slogan">一个人 · 也可以是一家公司</span>
|
||||
<span className="footer-corp">云南派音人工智能科技有限公司 × 云南汇浙青创科技有限公司</span>
|
||||
<span className="footer-logo"><img src="/logo.png" alt="" style={{ width: 34, height: 34, objectFit: 'contain', display: 'block' }} /></span>
|
||||
<span className="footer-slogan">云南省超级个体服务平台</span>
|
||||
<span className="footer-corp">一个人 · 也可以是一家公司</span>
|
||||
</div>
|
||||
{FOOT_COLS.map((c) => (
|
||||
<div className="footer-col" key={c.t}>
|
||||
@@ -141,7 +145,7 @@ export function SiteFooter() {
|
||||
))}
|
||||
</div>
|
||||
<div className="footer-bottom">
|
||||
<span>© 昆明市大学生创业园 · 云超服</span>
|
||||
<span>© 云南省超级个体服务平台(云超服OPC) · 云南派音人工智能科技有限公司</span>
|
||||
<span>诊断 · 陪跑 · OPC 体系设计</span>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -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); }
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -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(() => {}),
|
||||
|
||||
Reference in New Issue
Block a user