feat: 小程序前端显示分类标签
各页面增加垃圾信息分类标签显示: - 检测结果页显示分类标签 - 批量识别页和CSV导出增加分类标签列 - 历史记录页显示分类标签 - 管理后台审核页显示分类标签 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -35,6 +35,13 @@ const APPEAL_STATUS_TEXT = {
|
||||
rejected: '已驳回'
|
||||
}
|
||||
|
||||
const CATEGORY_LABELS = {
|
||||
fraud: '疑似诈骗',
|
||||
harassment: '疑似骚扰',
|
||||
advertisement: '疑似广告',
|
||||
spam: '疑似垃圾'
|
||||
}
|
||||
|
||||
function buildPager(total, page, pageSize) {
|
||||
const totalValue = Number(total || 0)
|
||||
const totalPages = Math.max(Math.ceil(totalValue / pageSize), 1)
|
||||
@@ -105,7 +112,8 @@ Page({
|
||||
created_text: (item.created_at || '').replace('T', ' ').slice(0, 19),
|
||||
review_status_text: REVIEW_STATUS_TEXT[item.manual_review_status] || item.manual_review_status,
|
||||
spam_probability_text: this.formatPercent(item.spam_probability, 2),
|
||||
appeal_status_text: APPEAL_STATUS_TEXT[item.appeal_status] || item.appeal_status
|
||||
appeal_status_text: APPEAL_STATUS_TEXT[item.appeal_status] || item.appeal_status,
|
||||
category_label: CATEGORY_LABELS[item.category] || ''
|
||||
}))
|
||||
},
|
||||
|
||||
@@ -116,6 +124,7 @@ Page({
|
||||
...item,
|
||||
created_text: (item.created_at || '').replace('T', ' ').slice(0, 19),
|
||||
appeal_status_text: APPEAL_STATUS_TEXT[item.appeal_status] || item.appeal_status,
|
||||
category_label: CATEGORY_LABELS[item.category] || '',
|
||||
appeal_evidence_urls: (item.appeal_evidence_urls || []).map((url) =>
|
||||
url.startsWith('http') ? url : `${serverBase}${url}`
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user