feat: 配套完善——管理端趋势表可查看/编辑人话解读,看板加解读覆盖率,llms.txt提及解读能力

This commit is contained in:
2026-09-13 20:37:13 +08:00
parent 5f911fed6d
commit 1d6cc71ec7
4 changed files with 18 additions and 9 deletions
+7 -6
View File
@@ -1097,9 +1097,9 @@ router.get('/trends', requirePermission('trend:read'), async (req, res) => {
router.post('/trends', requirePermission('trend:write'), async (req, res) => {
try {
const { title, summary, source, sourceUrl, category, tags, hot, picked, newsDate } = req.body
const { title, summary, source, sourceUrl, category, tags, hot, picked, newsDate, plainExplain, takeAway } = req.body
if (!title) return ApiResponse.error(res, '标题不能为空', 400)
const item = new Trend({ title, summary, source, sourceUrl, category, tags, hot: !!hot, picked: !!picked, newsDate: newsDate || new Date() })
const item = new Trend({ title, summary, source, sourceUrl, category, tags, hot: !!hot, picked: !!picked, newsDate: newsDate || new Date(), plainExplain: plainExplain || '', takeAway: takeAway || '' })
await item.save()
await logAction(req, 'create', 'trend', item._id, { title })
return ApiResponse.success(res, item, '创建成功')
@@ -1111,9 +1111,9 @@ router.post('/trends', requirePermission('trend:write'), async (req, res) => {
router.put('/trends/:id', requirePermission('trend:write'), async (req, res) => {
try {
const { title, summary, source, sourceUrl, category, tags, hot, picked, newsDate } = req.body
const { title, summary, source, sourceUrl, category, tags, hot, picked, newsDate, plainExplain, takeAway } = req.body
const item = await Trend.findByIdAndUpdate(req.params.id,
{ title, summary, source, sourceUrl, category, tags, hot: !!hot, picked: !!picked, ...(newsDate ? { newsDate } : {}) },
{ title, summary, source, sourceUrl, category, tags, hot: !!hot, picked: !!picked, plainExplain: plainExplain || '', takeAway: takeAway || '', ...(newsDate ? { newsDate } : {}) },
{ new: true })
if (!item) return ApiResponse.notFound(res, '趋势不存在')
await logAction(req, 'update', 'trend', item._id, { title })
@@ -1144,7 +1144,7 @@ router.get('/dashboard-v2', requirePermission('dashboard:read'), async (req, res
try {
const [
totalUsers, newUsers7d, totalKnowledge, approvedKnowledge, withQuiz,
totalTrends, totalFeedbacks, pendingFeedbacks, totalOrders, paidOrders,
totalTrends, trendsWithExplain, totalFeedbacks, pendingFeedbacks, totalOrders, paidOrders,
totalLits, litUsers, recentLogins, litByDimAgg, aiStatsRaw
] = await Promise.all([
User.countDocuments({}),
@@ -1153,6 +1153,7 @@ router.get('/dashboard-v2', requirePermission('dashboard:read'), async (req, res
Knowledge.countDocuments({ status: 'approved' }),
Knowledge.countDocuments({ 'options.0': { $exists: true } }),
Trend.countDocuments({}),
Trend.countDocuments({ plainExplain: { $exists: true, $ne: '' } }),
Feedback.countDocuments({}),
Feedback.countDocuments({ status: 'pending' }),
Order.countDocuments({}),
@@ -1175,7 +1176,7 @@ router.get('/dashboard-v2', requirePermission('dashboard:read'), async (req, res
stats: {
totalUsers, newUsers7d,
totalKnowledge, approvedKnowledge, withQuiz,
totalTrends, totalFeedbacks, pendingFeedbacks,
totalTrends, trendsWithExplain, totalFeedbacks, pendingFeedbacks,
totalOrders, paidOrders,
totalLits, litUsers: litUsers.length,
aiChatUsed: ai.used, aiChatUsers: ai.users,
+1 -1
View File
@@ -121,7 +121,7 @@ router.get('/llms.txt', (req, res) => {
## 核心内容
- 五维度知识体系:AI起源、发展脉络、当前格局、学习工具、趋势跟踪
- 每日AI趋势:每天 8:00/20:00 自动采集 Hacker News / arXiv 热点并中文归类(产品/论文/工具/公司/政策)
- 每日AI趋势:每天 8:00/20:00 自动采集 Hacker News / arXiv 热点并中文归类(产品/论文/工具/公司/政策),每条附「人话解读」:一句大白话说清 + 对普通人意味着什么
- AI问答:基于知识库的智能问答
## 免费与付费