chore: establish V1.1 recovery baseline

This commit is contained in:
2026-09-09 22:05:00 +08:00
commit b46b48eb33
947 changed files with 155471 additions and 0 deletions
+95
View File
@@ -0,0 +1,95 @@
<template>
<div class="page-container">
<el-row :gutter="16">
<el-col :span="6" v-for="card in statCards" :key="card.key">
<el-card shadow="hover" class="stat-card">
<div class="stat-value" :style="{ color: card.color }">{{ card.value }}</div>
<div class="stat-label">{{ card.label }}</div>
</el-card>
</el-col>
</el-row>
<el-row :gutter="16" style="margin-top:16px">
<el-col :span="12">
<el-card shadow="never">
<template #header><span>用户统计</span></template>
<el-descriptions :column="2" border size="small">
<el-descriptions-item label="累计注册">{{ stats.totalUsers }}</el-descriptions-item>
<el-descriptions-item label="已实名">{{ stats.verifiedUsers }}</el-descriptions-item>
<el-descriptions-item label="活跃用户(7天)">{{ stats.activeUsers }}</el-descriptions-item>
<el-descriptions-item label="待审核举报">{{ stats.pendingReports }}</el-descriptions-item>
</el-descriptions>
</el-card>
</el-col>
<el-col :span="12">
<el-card shadow="never">
<template #header><span>婚恋服务</span></template>
<el-descriptions :column="2" border size="small">
<el-descriptions-item label="总喜欢数">{{ stats.totalLikes }}</el-descriptions-item>
<el-descriptions-item label="双向Match">{{ stats.totalMatches }}</el-descriptions-item>
<el-descriptions-item label="正在了解">{{ stats.gettingToKnow }}</el-descriptions-item>
<el-descriptions-item label="成功牵手">{{ stats.successPairs }}</el-descriptions-item>
</el-descriptions>
</el-card>
</el-col>
</el-row>
<el-row :gutter="16" style="margin-top:16px">
<el-col :span="12">
<el-card shadow="never">
<template #header><span>安全风险</span></template>
<el-descriptions :column="2" border size="small">
<el-descriptions-item label="封禁账号">{{ stats.bannedUsers }}</el-descriptions-item>
<el-descriptions-item label="处理中举报">{{ stats.processingReports }}</el-descriptions-item>
</el-descriptions>
</el-card>
</el-col>
<el-col :span="12">
<el-card shadow="never">
<template #header><span>公益红娘</span></template>
<el-descriptions :column="2" border size="small">
<el-descriptions-item label="红娘服务申请">{{ stats.matchmakerServices }}</el-descriptions-item>
</el-descriptions>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { get } from '@/api/client'
const stats = ref<any>({})
const loading = ref(false)
const statCards = [
{ key: 'totalUsers', label: '累计注册', value: 0, color: '#409EFF' },
{ key: 'verifiedUsers', label: '已实名', value: 0, color: '#67C23A' },
{ key: 'activeUsers', label: '近7天活跃', value: 0, color: '#E59A32' },
{ key: 'successPairs', label: '成功牵手', value: 0, color: '#E96B6B' }
]
async function loadStats() {
loading.value = true
try {
const token = localStorage.getItem('accessToken')
const res: any = await get('/operator/analytics/dashboard', {}, { Authorization: `Bearer ${token}` })
stats.value = res || {}
statCards[0].value = res.totalUsers || 0
statCards[1].value = res.verifiedUsers || 0
statCards[2].value = res.activeUsers || 0
statCards[3].value = res.successPairs || 0
} catch (e) { console.error(e) }
finally { loading.value = false }
}
onMounted(loadStats)
</script>
<style scoped>
.page-container { padding: 24px; }
.stat-card { text-align: center; }
.stat-value { font-size: 36px; font-weight: bold; }
.stat-label { font-size: 14px; color: #666; margin-top: 8px; }
</style>