节点详情:照片灯箱浏览、参与人点击编辑、花销只记总计
1) 照片与附件不再新开窗口看 之前点缩略图直接 target=_blank 打开原始文件,看完还得切回来。 现在统一走当前页灯箱(templates/_lightbox.php,详情页照片墙与 照片管理页共用):左右箭头 / 键盘 ←→ / 手机滑动切上一张下一张, Esc 或点背景关闭,带「第几张 / 共几张」计数并预加载相邻两张。 非图片附件(PDF 等)仍保留直接打开与下载。 2) 参与人可以直接改了 之前加完只能移出重加。现在每个参与人旁有「编辑」,点开预填弹窗 (角色标签 / 心情 / 签到时间),保存仍走 members/store —— Members::save() 本来就是 upsert(同节点同人一条),服务端零改动。 失败回填按 user_id 精确匹配,只回填刚才没保存成的那个人。 3) 花销去掉预算,只记真实花费 明细上移,底部一行「总计(N 笔)¥X」。表单不再有「预算」选项, 查询一律 is_budget=0(历史预算行不再出现在列表与合计里); 活动页统计同步改成「共 N 笔 · 总计」。列保留在库里不删数据。 已验证:本地全链 11 步全绿(php -l / 渲染 286 项 / SQL / PDO / CSS / Mime / amap / 内联 JS×11 / 布局几何 / 表单交互 73 项);远端 e2e 296 项 0 失败(含灯箱、编辑弹窗、历史预算行排除的专项断言); 部署后双 PHP 渲染逐字节一致、60 文件哈希一致,线上 style.css 含新规则。
This commit is contained in:
+76
-15
@@ -641,6 +641,15 @@ input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; padding
|
||||
.member-emotion { font-size: 17px; line-height: 1; }
|
||||
.member-checkin { font-size: 12.5px; color: var(--text-mute); }
|
||||
.member-del-form { display: inline; margin-left: auto; }
|
||||
.member-edit {
|
||||
margin-left: auto;
|
||||
border: 1px solid var(--border-strong); background: var(--surface);
|
||||
color: var(--text-soft); font-size: 12.5px;
|
||||
padding: 3px 10px; border-radius: 999px; cursor: pointer;
|
||||
}
|
||||
.member-edit:hover { border-color: var(--accent); color: var(--accent); }
|
||||
/* 有「编辑」按钮时,移出按钮紧跟其后即可,不再负责把整行推到最右 */
|
||||
.member-row .member-edit + .member-del-form { margin-left: 0; }
|
||||
.member-del-form button {
|
||||
border: 0; background: none; color: var(--text-mute);
|
||||
font-size: 15px; cursor: pointer; padding: 2px 6px; border-radius: 6px;
|
||||
@@ -658,18 +667,7 @@ input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; padding
|
||||
.emotion-face { font-size: 16px; line-height: 1; }
|
||||
.emotion-text { font-size: 12.5px; color: var(--text-soft); }
|
||||
|
||||
/* ── 13. 花销 ────────────────────────────────────────────────────────────── */
|
||||
.expense-summary { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
|
||||
.expense-stat {
|
||||
flex: 1 1 130px;
|
||||
padding: 11px 14px;
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
.expense-stat > div:first-child { font-size: 12px; color: var(--text-mute); }
|
||||
.expense-stat strong { font-size: 16px; }
|
||||
|
||||
/* ── 13. 花销(只记真实花销:上面一笔一笔,下面总计) ────────────────────── */
|
||||
.expense-list { display: flex; flex-direction: column; gap: 10px; }
|
||||
.expense-row {
|
||||
display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
|
||||
@@ -683,9 +681,15 @@ input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; padding
|
||||
.expense-desc { font-size: 13px; color: var(--text-soft); margin-top: 2px; }
|
||||
.expense-sub { font-size: 12.5px; color: var(--text-mute); margin-top: 3px; }
|
||||
.expense-amount { font-size: 15px; font-weight: 650; white-space: nowrap; }
|
||||
.expense-kind { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; font-weight: 550; }
|
||||
.expense-kind-budget { background: var(--bg-soft); color: var(--text-soft); }
|
||||
.expense-kind-actual { background: var(--success-soft); color: var(--success); }
|
||||
.expense-total {
|
||||
display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
|
||||
margin-top: 12px; padding: 11px 14px;
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border-strong);
|
||||
border-radius: var(--radius);
|
||||
font-size: 13.5px; color: var(--text-soft);
|
||||
}
|
||||
.expense-total strong { font-size: 18px; font-weight: 750; color: var(--text); }
|
||||
|
||||
/* ── 14. 附件与照片 ──────────────────────────────────────────────────────── */
|
||||
.drop-zone {
|
||||
@@ -1098,3 +1102,60 @@ input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; padding
|
||||
.settings-chip { flex: 1 1 100%; }
|
||||
.inline-row { align-items: stretch; }
|
||||
}
|
||||
|
||||
/* ── 17. 照片灯箱:当前页弹窗看大图,左右箭头/键盘/滑动切换 ────────────────── */
|
||||
.lightbox {
|
||||
position: fixed; inset: 0; z-index: 120;
|
||||
display: none; align-items: center; justify-content: center;
|
||||
}
|
||||
.lightbox.open { display: flex; }
|
||||
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(10, 13, 20, .88); }
|
||||
.lightbox-body {
|
||||
position: relative; z-index: 1;
|
||||
margin: 0; max-width: min(1100px, 92vw);
|
||||
display: flex; flex-direction: column; align-items: center; gap: 10px;
|
||||
}
|
||||
.lightbox-img {
|
||||
max-width: min(1100px, 92vw);
|
||||
max-height: 78vh;
|
||||
object-fit: contain;
|
||||
border-radius: var(--radius);
|
||||
box-shadow: var(--shadow-lg);
|
||||
background: transparent;
|
||||
}
|
||||
.lightbox-cap {
|
||||
max-width: min(1100px, 92vw);
|
||||
color: rgba(255, 255, 255, .82); font-size: 13px;
|
||||
text-align: center; overflow-wrap: anywhere;
|
||||
}
|
||||
.lightbox-nav {
|
||||
position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
|
||||
width: 52px; height: 52px;
|
||||
border: 0; border-radius: 50%;
|
||||
background: rgba(255, 255, 255, .14); color: #fff;
|
||||
font-size: 34px; line-height: 1;
|
||||
cursor: pointer; user-select: none;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
}
|
||||
.lightbox-nav:hover { background: rgba(255, 255, 255, .28); }
|
||||
.lightbox-prev { left: max(12px, calc((100vw - min(1100px, 92vw)) / 2 - 72px)); }
|
||||
.lightbox-next { right: max(12px, calc((100vw - min(1100px, 92vw)) / 2 - 72px)); }
|
||||
.lightbox-close {
|
||||
position: absolute; top: 14px; right: 16px; z-index: 2;
|
||||
width: 42px; height: 42px;
|
||||
border: 0; border-radius: 50%;
|
||||
background: rgba(255, 255, 255, .14); color: #fff;
|
||||
font-size: 26px; line-height: 1; cursor: pointer;
|
||||
}
|
||||
.lightbox-close:hover { background: rgba(255, 255, 255, .28); }
|
||||
.lightbox-count {
|
||||
position: absolute; top: 24px; left: 20px; z-index: 2;
|
||||
color: rgba(255, 255, 255, .75); font-size: 13px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
@media (max-width: 700px) {
|
||||
.lightbox-nav { width: 46px; height: 46px; font-size: 30px; }
|
||||
.lightbox-prev { left: 8px; }
|
||||
.lightbox-next { right: 8px; }
|
||||
.lightbox-img { max-height: 66vh; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user