Compare commits

..

3 Commits

Author SHA1 Message Date
linkeyu ecf8150cfc 修复:优化广告播放状态文案 (#65)
## 修改内容
- 广告播放状态“未满10秒”调整为“观看时长不足”
- 聚合播放状态“混合状态”调整为“部分完成”
- 保持后端状态码、接口结构和判定逻辑不变

## 影响范围
- 仅修改后台广告收益页的前端展示文案

## 验证
- npm run build

---------

Co-authored-by: linkeyu <798648091@qq.com>
Reviewed-on: #65
Co-authored-by: linkeyu <linkeyu@wonderable.ai>
Co-committed-by: linkeyu <linkeyu@wonderable.ai>
2026-07-22 18:21:39 +08:00
linkeyu 1559d4faf0 修复:激励视频未完成时预估收益显示为零 (#64)
## 问题
后台明细需要与后端有效收益口径一致:激励视频提前关闭或播放时长不足时显示 0,不能继续展示原始 eCPM 折算金额。

## 修改
- 对 reward_video + closed_early/too_short 做防御性归零显示
- 更新收益口径说明和类型注释
- 顶部合计、趋势和分类统计使用后端修正后的有效收益

## 关联后端
WonderableAI/shaguabijia-app-server#160

## 验证
- npm ci --legacy-peer-deps
- npm run build:通过(包含 TypeScript 与页面构建检查)

---------

Co-authored-by: linkeyu <798648091@qq.com>
Reviewed-on: #64
Co-authored-by: linkeyu <linkeyu@wonderable.ai>
Co-committed-by: linkeyu <linkeyu@wonderable.ai>
2026-07-22 17:38:47 +08:00
linkeyu 9d32234015 后台前端:新增“监控审计”一级目录 (#63)
## 变更
- 左侧导航新增一级目录“监控审计”。
- 将设备存活、埋点成功率、埋点日志和审计日志统一迁入该目录。
- 从“看板”移除技术监控项,并取消埋点日志、审计日志的独立一级入口。
- 保留现有页面权限过滤逻辑:无可见子项时不会展示该目录。

## 验证
- `npm run build` 通过,Next.js 编译、lint 和 TypeScript 检查均成功。

## 后端配套
- WonderableAI/shaguabijia-app-server#159

---------

Co-authored-by: linkeyu <798648091@qq.com>
Reviewed-on: #63
Co-authored-by: linkeyu <linkeyu@wonderable.ai>
Co-committed-by: linkeyu <linkeyu@wonderable.ai>
2026-07-22 17:22:23 +08:00
2 changed files with 13 additions and 6 deletions
+2 -2
View File
@@ -76,7 +76,7 @@ const REWARD_STATUS_HINT: Record<string, string> = {
const PLAYBACK_STATUS_TAG: Record<string, { color: string; label: string }> = {
completed: { color: 'green', label: '已完成' },
too_short: { color: 'gold', label: '未满10秒' },
too_short: { color: 'gold', label: '观看时长不足' },
closed_early: { color: 'default', label: '提前关闭' },
unknown: { color: 'default', label: '未知' },
};
@@ -159,7 +159,7 @@ function playbackStatusTag(row: AdRevenueRow) {
const hint = entries
.map(([status, count]) => `${PLAYBACK_STATUS_TAG[status].label} ${count}`)
.join('');
return { color: 'purple', label: '混合状态', hint: `${hint}` };
return { color: 'purple', label: '部分完成', hint: `${hint}` };
}
const fmtFactorRange = (a: number | null, b: number | null) => {
+11 -4
View File
@@ -67,8 +67,6 @@ const NAV_GROUPS: NavGroup[] = [
{ key: '/comparison-records', icon: <ProfileOutlined />, label: '比价记录' },
{ key: '/coupon-data', icon: <GiftOutlined />, label: '领券记录' },
{ key: '/cps', icon: <ShareAltOutlined />, label: 'CPS收益' },
{ key: '/device-liveness', icon: <HeartOutlined />, label: '设备存活' },
{ key: '/analytics-health', icon: <LineChartOutlined />, label: '埋点成功率' },
],
},
{
@@ -92,9 +90,18 @@ const NAV_GROUPS: NavGroup[] = [
{ key: '/users', icon: <UserOutlined />, label: '用户管理' },
],
},
{
key: 'monitoring-audit',
icon: <FileSearchOutlined />,
label: '监控审计',
children: [
{ key: '/device-liveness', icon: <HeartOutlined />, label: '设备存活' },
{ key: '/analytics-health', icon: <LineChartOutlined />, label: '埋点成功率' },
{ key: '/event-logs', icon: <DatabaseOutlined />, label: '埋点日志' },
{ key: '/audit-logs', icon: <FileSearchOutlined />, label: '审计日志' },
],
},
{ key: '/admins', icon: <TeamOutlined />, label: '权限管理' },
{ key: '/event-logs', icon: <DatabaseOutlined />, label: '埋点日志' },
{ key: '/audit-logs', icon: <FileSearchOutlined />, label: '审计日志' },
];
// 导航项 key(/dashboard)→ 权限页 key(dashboard),与后端 permissions.py 目录对齐