feat: 用户可见自己帖子的审核状态
- 发帖后若未直接过审,弹窗明确「审核中,通过后才出现在社区」, 不再让用户以为发失败/是 bug - 后端 ListUserPosts:看自己主页时返回待审核/未通过的帖子(带状态), 看别人仍只返回已发布 - 个人主页帖子加「审核中/未通过」状态标 + 说明 - 我的页加「我的帖子」入口,进自己主页看审核状态 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -609,7 +609,7 @@ Component({
|
||||
if (this.data.saving) return;
|
||||
this.setData({ saving: true });
|
||||
try {
|
||||
await api.createPost({
|
||||
const post = await api.createPost({
|
||||
pet_id: identity === 'petName' ? store.currentPetId() : null,
|
||||
identity,
|
||||
content,
|
||||
@@ -618,6 +618,17 @@ Component({
|
||||
});
|
||||
this.triggerEvent('posted');
|
||||
this.close();
|
||||
// 内容安全审核:没直接过审的,明确告诉用户在审核,别以为发失败/是 bug
|
||||
if (post && post.status && post.status !== 'published') {
|
||||
wx.showModal({
|
||||
title: '发布成功,审核中',
|
||||
content: '内容需要通过安全审核后才会出现在社区。可在「我的 → 我的帖子」查看审核状态。',
|
||||
showCancel: false,
|
||||
confirmText: '知道了',
|
||||
});
|
||||
} else {
|
||||
wx.showToast({ title: '已发布', icon: 'success' });
|
||||
}
|
||||
} catch (e) {
|
||||
wx.showToast({ title: e.message || '发布失败', icon: 'none' });
|
||||
this.setData({ saving: false });
|
||||
|
||||
Reference in New Issue
Block a user