diff --git a/admin-web/src/modules/activity/ActivityInterestView.vue b/admin-web/src/modules/activity/ActivityInterestView.vue index da8840d..5f024d2 100644 --- a/admin-web/src/modules/activity/ActivityInterestView.vue +++ b/admin-web/src/modules/activity/ActivityInterestView.vue @@ -31,8 +31,8 @@

{{ currentActivity.title }} — 双向互选列表

- - + + @@ -57,7 +57,10 @@ async function loadData() { try { const token = localStorage.getItem('accessToken') const res: any = await get('/activities/operator/activity-interest-summary', {}, { Authorization: `Bearer ${token}` }) - tableData.value = res || [] + const rows = res.data || [] + tableData.value = searchActivityId.value + ? rows.filter((row: any) => row.activityId.includes(searchActivityId.value.trim())) + : rows } catch (e) { console.error(e) } finally { @@ -67,14 +70,11 @@ async function loadData() { async function viewMutuals(activityId: string) { drawerVisible.value = true + currentActivity.value = tableData.value.find(row => row.activityId === activityId) try { const token = localStorage.getItem('accessToken') - const [actRes, mutualRes]: any = await Promise.all([ - get(`/activities/${activityId}`, {}, { Authorization: `Bearer ${token}` }), - get(`/activities/${activityId}/interests/mutual`, {}, { Authorization: `Bearer ${token}` }) - ]) - currentActivity.value = actRes - mutualList.value = mutualRes || [] + const mutualRes: any = await get(`/activities/operator/${activityId}/mutuals`, {}, { Authorization: `Bearer ${token}` }) + mutualList.value = mutualRes.data || [] } catch (e) { console.error(e) } diff --git a/admin-web/src/modules/analytics/AnalyticsView.vue b/admin-web/src/modules/analytics/AnalyticsView.vue index 4958797..1b80163 100644 --- a/admin-web/src/modules/analytics/AnalyticsView.vue +++ b/admin-web/src/modules/analytics/AnalyticsView.vue @@ -122,34 +122,37 @@ async function loadFunnel() { }, { Authorization: `Bearer ${token}` }), get('/operator/analytics/safety', {}, { Authorization: `Bearer ${token}` }) ]) - funnelStats.value = userRes - matchFunnelStats.value = matchRes - safetyStats.value = safetyRes + const userData = userRes.data || {} + const matchData = matchRes.data || {} + const safetyData = safetyRes.data || {} + funnelStats.value = userData + matchFunnelStats.value = matchData + safetyStats.value = safetyData // 更新漏斗显示 - funnelStages[0].value = userRes.totalRegistered || 0 - funnelStages[1].value = userRes.verifiedCount || 0 - funnelStages[1].rate = userRes.verifyRate || '-' - funnelStages[2].value = userRes.profileApproved || 0 - funnelStages[2].rate = userRes.approvalRate || '-' - funnelStages[3].value = userRes.activeUsers || 0 - funnelStages[3].rate = userRes.activeRate || '-' + funnelStages[0].value = userData.totalRegistered || 0 + funnelStages[1].value = userData.verifiedCount || 0 + funnelStages[1].rate = userData.verifyRate || '-' + funnelStages[2].value = userData.profileApproved || 0 + funnelStages[2].rate = userData.approvalRate || '-' + funnelStages[3].value = userData.activeUsers || 0 + funnelStages[3].rate = userData.activeRate || '-' - matchStages[0].value = matchRes.totalRecommended || 0 - matchStages[1].value = matchRes.totalLiked || 0 - matchStages[1].rate = matchRes.likeRate || '-' - matchStages[2].value = matchRes.totalMatches || 0 - matchStages[2].rate = matchRes.matchRate || '-' - matchStages[3].value = matchRes.chatsStarted || 0 - matchStages[3].rate = matchRes.chatRate || '-' - matchStages[4].value = matchRes.gettingToKnow || 0 - matchStages[5].value = matchRes.successPairs || 0 - matchStages[5].rate = matchRes.successRate || '-' + matchStages[0].value = matchData.totalRecommended || 0 + matchStages[1].value = matchData.totalLiked || 0 + matchStages[1].rate = matchData.likeRate || '-' + matchStages[2].value = matchData.totalMatches || 0 + matchStages[2].rate = matchData.matchRate || '-' + matchStages[3].value = matchData.chatsStarted || 0 + matchStages[3].rate = matchData.chatRate || '-' + matchStages[4].value = matchData.gettingToKnow || 0 + matchStages[5].value = matchData.successPairs || 0 + matchStages[5].rate = matchData.successRate || '-' - safetyCards[0].value = safetyRes.pendingReports || 0 - safetyCards[1].value = safetyRes.resolvedReports || 0 - safetyCards[2].value = safetyRes.highRiskUsers || 0 - safetyCards[3].value = safetyRes.bannedUsers || 0 + safetyCards[0].value = safetyData.pendingReports || 0 + safetyCards[1].value = safetyData.resolvedReports || 0 + safetyCards[2].value = safetyData.highRiskUsers || 0 + safetyCards[3].value = safetyData.bannedUsers || 0 } } catch (e) { console.error(e) } } @@ -158,7 +161,7 @@ async function loadDailySummary() { try { const token = localStorage.getItem('accessToken') const res: any = await get('/operator/analytics/daily-summary', { days: 30 }, { Authorization: `Bearer ${token}` }) - dailySummary.value = res || [] + dailySummary.value = res.data || [] } catch (e) { console.error(e) } } diff --git a/admin-web/src/modules/appeal/AppealCenterView.vue b/admin-web/src/modules/appeal/AppealCenterView.vue index 00ce6ca..f7e6e52 100644 --- a/admin-web/src/modules/appeal/AppealCenterView.vue +++ b/admin-web/src/modules/appeal/AppealCenterView.vue @@ -110,7 +110,7 @@ async function loadData() { try { const token = localStorage.getItem('accessToken') const res: any = await get('/operator/appeals/pending', {}, { Authorization: `Bearer ${token}` }) - tableData.value = res || [] + tableData.value = res.data || [] loadStats() } catch (e) { console.error(e) } finally { loading.value = false } @@ -120,12 +120,13 @@ async function loadStats() { try { const token = localStorage.getItem('accessToken') const res: any = await get('/operator/appeals/stats', {}, { Authorization: `Bearer ${token}` }) + const data = res.data || {} stats.value = [ - { key: 'pending', label: '待审核', value: res.pendingCount || 0, color: '#E96B6B' }, - { key: 'reviewing', label: '审核中', value: res.reviewingCount || 0, color: '#E59A32' }, - { key: 'approved', label: '已通过', value: res.approvedCount || 0, color: '#67C23A' }, - { key: 'rejected', label: '已驳回', value: res.rejectedCount || 0, color: '#909399' }, - { key: 'escalated', label: '已升级', value: res.escalatedCount || 0, color: '#F56C6C' } + { key: 'pending', label: '待审核', value: data.pendingCount || 0, color: '#E96B6B' }, + { key: 'reviewing', label: '审核中', value: data.reviewingCount || 0, color: '#E59A32' }, + { key: 'approved', label: '已通过', value: data.approvedCount || 0, color: '#67C23A' }, + { key: 'rejected', label: '已驳回', value: data.rejectedCount || 0, color: '#909399' }, + { key: 'escalated', label: '已升级', value: data.escalatedCount || 0, color: '#F56C6C' } ] } catch {} } @@ -138,7 +139,7 @@ async function openDetail(id: string) { try { const token = localStorage.getItem('accessToken') const res: any = await get(`/operator/appeals/${id}`, {}, { Authorization: `Bearer ${token}` }) - detail.value = res + detail.value = res.data } catch (e) { console.error(e) } } diff --git a/admin-web/src/modules/banner/BannerManagementView.vue b/admin-web/src/modules/banner/BannerManagementView.vue index 576853f..5d01b45 100644 --- a/admin-web/src/modules/banner/BannerManagementView.vue +++ b/admin-web/src/modules/banner/BannerManagementView.vue @@ -9,14 +9,14 @@ - + - + @@ -24,10 +24,10 @@ {{ statusLabel(row.status) }} - + @@ -47,7 +47,7 @@ - + @@ -58,9 +58,9 @@ - + - + @@ -68,9 +68,9 @@ - - - + + +