aspack001
aspack001
  • 发布:2025-08-07 01:20
  • 更新:2025-08-07 10:26
  • 阅读:46

uniadmin中没有统计数据

分类:uni-app

uni-stat-reciver和uni-stat-cron日志有两种,一种如下,另外一种“没有相关日志”

2025-08-01T16:13:42.205Z Init Report RequestId: 1c5c6b96-2a21-4f06-99ac-ffabdf44e1d8 Coldstart: 515ms (InitRuntime: 18ms InitFunction: 497ms) Memory: 128MB MemUsage: 27.49MB
2025-08-01T16:13:42.800Z START RequestId: 1c5c6b96-2a21-4f06-99ac-ffabdf44e1d8
2025-08-01T16:13:42.800Z Event RequestId: 1c5c6b96-2a21-4f06-99ac-ffabdf44e1d8
2025-08-01T16:13:44.212Z 2025-08-01T08:13:44.212Z 1c5c6b96-2a21-4f06-99ac-ffabdf44e1d8 Not found the config file
2025-08-01T16:13:44.213Z 2025-08-01T08:13:44.213Z 1c5c6b96-2a21-4f06-99ac-ffabdf44e1d8 Not found the config file
2025-08-01T16:13:44.214Z 2025-08-01T08:13:44.214Z 1c5c6b96-2a21-4f06-99ac-ffabdf44e1d8 Not found the config file
2025-08-01T16:13:44.214Z 2025-08-01T08:13:44.214Z 1c5c6b96-2a21-4f06-99ac-ffabdf44e1d8 Not found the config file
2025-08-01T16:13:44.214Z 2025-08-01T08:13:44.214Z 1c5c6b96-2a21-4f06-99ac-ffabdf44e1d8 Not found the config file
2025-08-01T16:13:44.214Z 2025-08-01T08:13:44.214Z 1c5c6b96-2a21-4f06-99ac-ffabdf44e1d8 Not found the config file
2025-08-01T16:13:44.215Z 2025-08-01T08:13:44.215Z 1c5c6b96-2a21-4f06-99ac-ffabdf44e1d8 Not found the config file
2025-08-01T16:13:44.511Z 2025-08-01T08:13:44.511Z 1c5c6b96-2a21-4f06-99ac-ffabdf44e1d8 Not found the config file
2025-08-01T16:13:44.555Z 2025-08-01T08:13:44.555Z 1c5c6b96-2a21-4f06-99ac-ffabdf44e1d8 Not found the config file
2025-08-01T16:13:44.655Z 2025-08-01T08:13:44.655Z 1c5c6b96-2a21-4f06-99ac-ffabdf44e1d8 Not found the config file
2025-08-01T16:13:44.787Z Response RequestId: 1c5c6b96-2a21-4f06-99ac-ffabdf44e1d8 RetMsg: {"code":0,"msg":"success"}
2025-08-01T16:13:44.787Z END RequestId: 1c5c6b96-2a21-4f06-99ac-ffabdf44e1d8
2025-08-01T16:13:44.787Z Report RequestId: 1c5c6b96-2a21-4f06-99ac-ffabdf44e1d8 Duration: 1982ms Memory: 128MB MemUsage: 37.757813MB

我的menifest配置中 其中源码视图中uniStatistics有两个,一个在根节点在,一个在APP-PLUS下。
admin后台我是配置了app的,app_id正确

2025-08-07 01:20 负责人:无 分享
已邀请:
aspack001

aspack001 (作者) - 老程序猿

是因为我缺乏uni-stat.json文件吗?我从别的项目拷贝了一个,重新上传云函数。这个uni-stat.json如下,不知这个会不会有问题:

{
"debug": false,
"redis": false,
"cachetime": 604800,
"sessionExpireTime": 1800,
"realtimeStat": true,
"cronMin": false,
"cronMinTips": "如果设置cronMin: true(开启分钟级统计)则你必须再修改 cloudfunctions/uni-stat-cron/package.json 文件内的 triggers 属性的 config的值为 0 /10 代表每10分钟运行一次定时任务",
"pageDetailStat": false,
"pageDetailStatTips": "如果设置pageDetailStat: true(开启页面内容统计),可能会增加大量的数据库查询及写入的次数,请按需开启",
"cron": [
{
"type": "stat",
"time": " 0"
},
{
"type": "stat",
"time": "
1 10"
},
{
"type": "stat",
"time": "1
1 20"
},
{
"type": "stat",
"time": " 1 3 30"
},
{
"type": "active-device",
"time": "
0 10"
},
{
"type": "active-user",
"time": "
0 20"
},
{
"type": "page",
"time": "
3 20"
},
{
"type": "page-detail",
"time": "
7 10"
},
{
"type": "event",
"time": "
4 20"
},
{
"type": "error",
"time": "
5 20"
},
{
"type": "loyalty",
"time": "
6 20"
},
{
"type": "clean",
"time": "
5 30"
},
{
"type": "retention-device",
"time": "
2 20"
},
{
"type": "retention-device",
"time": "
1 4 30"
},
{
"type": "retention-device",
"time": "1 2 30"
},
{
"type": "retention-user",
"time": "
3 40"
},
{
"type": "retention-user",
"time": "
1 5 40"
},
{
"type": "retention-user",
"time": "1 6 30"
},
{
"type": "pay-result",
"time": "
10",
"dimension": "hour",
"description": "每小时执行统计(会自动统计小时、天、周、月、季度、年度)",
"timely": true
}
],
"batchInsertNum": 500,
"errorCheck": {
"needCheck": true,
"checkTime": 5
},
"cleanLog": {
"open": true,
"reserveDays": {
"sessionLog": 31,
"userSessionLog": 31,
"pageLog": 7,
"eventLog": 7,
"shareLog": 7,
"errorLog": 7
}
}
}

aspack001

aspack001 (作者) - 老程序猿

确实是这个问题。

问题是为什么会没有uni-stat文件,这个不是uni-admin自带的吗?是需要点击什么导入吗?

DCloud_云服务_JRP

DCloud_云服务_JRP

这个问题 文档 中有说明

要回复问题请先登录注册