接入Salon对外内容审核与发布门禁

This commit is contained in:
2026-10-25 05:58:35 +08:00
parent ed3daee8e5
commit 9a13f20691
84 changed files with 2631 additions and 234 deletions
@@ -29,7 +29,22 @@
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'type'">{{ moderationType(record.contentType) }}</template>
<template v-else-if="column.key === 'content'">
<pre class="payload-preview">{{ formatPayload(record.payloadJson) }}</pre>
<div class="moderation-content">
<div class="moderation-author">{{ record.authorName || '未知发布者' }}</div>
<pre class="payload-preview">{{ record.textPreview || '无文字内容' }}</pre>
<a-space v-if="record.images?.length" wrap>
<a-image
v-for="image in record.images"
:key="String(image.fileId)"
:src="image.url"
:width="56"
:height="56"
fit="cover"
:preview="Boolean(image.url)"
/>
<span v-if="record.images.some((image: NonNullable<ContentModerationRecordVO['images']>[number]) => !image.url)" class="image-pending">图片预览不可用</span>
</a-space>
</div>
</template>
<template v-else-if="column.key === 'status'">{{ record.status === 'RETRY' ? '待复核(模拟服务故障)' : '待复核' }}</template>
<template v-else-if="column.key === 'action'">
@@ -255,12 +270,7 @@ function runBackfill() {
}
function moderationType(type: string) {
return ({ USER_PROFILE: '个人资料', USER_AVATAR: '头像', PRODUCT: '作品', COMMENT: '评论' } as Record<string, string>)[type] || type
}
function formatPayload(value?: string) {
if (!value) return '无待复核载荷'
try { return JSON.stringify(JSON.parse(value), null, 2) } catch { return value }
return ({ USER_PROFILE: '个人资料', USER_AVATAR: '头像', PRODUCT: '作品', EFFECT_DIAGRAM: '效果图', COMMENT: '评论', ORDER_ARTIST_REVIEW: '订单评价', SHOP: '门店资料', ANNOUNCEMENT: '公告', SYSTEM_MESSAGE: '系统消息' } as Record<string, string>)[type] || type
}
onMounted(loadActiveTab)
@@ -270,6 +280,9 @@ onMounted(loadActiveTab)
.privacy-page { display: grid; gap: 16px; }
.page-notice { border-radius: 8px; }
.payload-preview { max-width: 420px; max-height: 180px; margin: 0; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 12px; }
.moderation-content { display: grid; gap: 6px; }
.moderation-author { color: var(--ant-color-text-secondary); font-size: 12px; }
.image-pending { color: var(--ant-color-text-secondary); font-size: 12px; }
.backfill-panel { width: 100%; padding: 8px 0; }
.closure-shops { display: grid; gap: 12px; margin-bottom: 16px; }
.closure-shops p { margin: 0; }