评论/回复只显示审核通过的(星空留言、广场、专题页,自己也不显示审核中);星空亮星均匀铺满整片夜空

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
deploy
2026-11-07 03:23:48 +00:00
parent 35717e8793
commit 580f5144a7
5 changed files with 32 additions and 25 deletions

View File

@@ -98,8 +98,8 @@
var st = loadMe(), L = [], open = false, RC = { list: [], mine: [] }, OID = UK === '_guest' ? '' : UK;
var API = '/api/mp/public/mama-box/plaza';
function mine() {
var old = (st.m.cm[SLUG] || []).map(function (c) { return { t: c.t, ts: c.ts, s: c.s, st: 'local' }; });
return old.concat(RC.mine.slice().reverse().map(function (c) { return { t: c.text, ts: c.at, s: c.stage, st: c.status, why: c.reason, id: c.id, parent: c.parent, to: c.parentName, img: c.images }; }));
/* 11-07 用户:评论、回复一定要审核通过才显示,自己也不显示「审核中」—— 只留已通过的;本机旧评论(从没审过)也不再显示 */
return RC.mine.filter(function (c) { return c.status === 'approved'; }).reverse().map(function (c) { return { t: c.text, ts: c.at, s: c.stage, st: c.status, why: c.reason, id: c.id, parent: c.parent, to: c.parentName, img: c.images }; });
}
function real() { return RC.list.filter(function (c) { return !c.parent; }).map(function (c) { return [c.nickname || '孕妈', c.avatar || '', c.stage || '', c.text, 0, [], 'r:' + c.id, c.images]; }); }
var cpH = function (a) { return window.MBCmPics ? MBCmPics.html(a) : ''; }; /* 11-05 评论里的图 */
@@ -191,7 +191,7 @@
var wasReply = !!REPLY; setReply(null);
ta.value = ''; if (CP) CP.clear(); ta.style.height = '24px'; bt.disabled = true; ta.blur(); paint();
if (!wasReply) box.scrollIntoView({ block: 'start', behavior: 'smooth' });
toast(wasReply ? '回复已提交,审核通过后大家就能看到' : '已提交,审核通过后大家就能看到');
toast(wasReply ? '回复已提交,审核通过后才会显示' : '已提交,审核通过后才会显示');
}).catch(function () { bt.busy = false; bt.disabled = !canSend(); toast('网络不太好,稍后再试'); });
});
function toast(m) {