孕妈广场投稿:写稿页(选话题/标题/正文/配图/草稿)、我的投稿、审核结果弹窗提醒、通过稿件以「精选投稿」展示;首页广场模块挂审核结果提示;接 box_app /plaza 接口;v26110116

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
deploy
2026-11-01 09:20:45 +00:00
parent cc8cc3e98a
commit d76c212f89
3 changed files with 306 additions and 18 deletions

View File

@@ -3,7 +3,7 @@
(function () {
'use strict';
/* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */
var VER = '26110115';
var VER = '26110116';
const $ = (s, c) => (c || document).querySelector(s);
const $$ = (s, c) => Array.from((c || document).querySelectorAll(s));
@@ -4224,6 +4224,22 @@
$('#gchCnt').innerHTML = '<b>' + fmtNum(talk) + '</b> 位妈妈正在聊';
$('#gchAvs').innerHTML = ['p05', 'm07', 's03', 'k09', 'm16'].map(n => '<img src="' + avaSrc(n) + '" alt="" loading="lazy">').join('');
sec.classList.remove('hide');
/* 投稿审核提醒(11-01):有结果且没看过 → 模块里挂一条提示,点进广场 ?mine=1 弹结果(广场页弹完才标已读) */
const oid = hashParam('openid');
if (oid) fetch('/api/mp/public/mama-box/plaza/mine?openid=' + encodeURIComponent(oid)).then(r => r.json()).then(j => {
const un = (j && j.result && j.result.unread) || [];
if (!un.length) return;
const ok = un.some(p => p.status === 'approved'), b = document.createElement('button');
b.type = 'button'; b.className = 'gch-note' + (ok ? ' ok' : '');
b.innerHTML = '<span>' + (ok ? '你的投稿通过啦!奖励 ¥30 现金 + 500 兜豆' : '你的投稿有审核结果了') + '</span><i>去看看 ›</i>';
b.addEventListener('click', () => {
haptic();
const url = 'guangchang/?mine=1' + location.hash;
reportHostLocation(new URL(url, location.href).href);
location.href = url;
});
$('.gch-who', sec).before(b);
}).catch(() => {});
row.addEventListener('click', e => { const b = e.target.closest('.gch-card'); if (b) go(b.dataset.t); });
$('#gchMore').addEventListener('click', () => go(''));
$('#gchCat').addEventListener('click', e => {