fix data error
This commit is contained in:
@@ -129,8 +129,6 @@ export const adminController = {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log('统计数据:', { totalUsers, totalAccounts, todayVisits, alerts });
|
|
||||||
|
|
||||||
res.json({
|
res.json({
|
||||||
success: true,
|
success: true,
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<div class="flex justify-between h-16">
|
<div class="flex justify-between h-16">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<h1 class="text-2xl font-bold text-primary-600 dark:text-primary-400">
|
<h1 class="text-2xl font-bold text-primary-600 dark:text-primary-400">
|
||||||
Pandora 管理后台
|
AI 管理后台
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center space-x-4">
|
<div class="flex items-center space-x-4">
|
||||||
@@ -378,8 +378,8 @@ const loadAdminInfo = async () => {
|
|||||||
const loadStats = async () => {
|
const loadStats = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await adminStore.getStats()
|
const response = await adminStore.getStats()
|
||||||
if (response && response.stats) {
|
if (response && response.data.stats) {
|
||||||
stats.value = response.stats
|
stats.value = response.data.stats
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('加载系统统计失败:', error)
|
console.error('加载系统统计失败:', error)
|
||||||
@@ -409,12 +409,9 @@ const formatTime = (time: string) => {
|
|||||||
// 加载最近活动
|
// 加载最近活动
|
||||||
const loadRecentActivities = async () => {
|
const loadRecentActivities = async () => {
|
||||||
try {
|
try {
|
||||||
console.log('开始加载最近活动...')
|
|
||||||
const response = await adminStore.getRecentActivities()
|
const response = await adminStore.getRecentActivities()
|
||||||
console.log('最近活动响应:', response)
|
if (response && response.data.activities) {
|
||||||
|
recentActivities.value = response.data.activities
|
||||||
if (response && response.activities) {
|
|
||||||
recentActivities.value = response.activities
|
|
||||||
console.log('最近活动加载成功:', recentActivities.value)
|
console.log('最近活动加载成功:', recentActivities.value)
|
||||||
} else {
|
} else {
|
||||||
console.error('最近活动数据格式错误:', response)
|
console.error('最近活动数据格式错误:', response)
|
||||||
|
|||||||
Reference in New Issue
Block a user