Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 13a08cf1c1 |
@@ -661,9 +661,17 @@ export default function AdRevenueReportPage() {
|
||||
: data.date_from
|
||||
: `${data.date_from} ~ ${data.date_to}`;
|
||||
|
||||
// 第二行大盘「分广告类型」:draw / 激励视频 各自 收益 / eCPM / 展示条数;eCPM = 收益÷展示×1000。
|
||||
// 第二行大盘「分广告类型」:看视频包含福利视频与提现视频;
|
||||
// eCPM 使用合并后的总收益 ÷ 总展示数 × 1000,避免只读取 reward_video 而漏算提现视频。
|
||||
const drawStat = data?.type_stats?.draw;
|
||||
const rvStat = data?.type_stats?.reward_video;
|
||||
const rewardVideoStat = data?.type_stats?.reward_video;
|
||||
const withdrawalVideoStat = data?.type_stats?.withdrawal_video;
|
||||
const videoStat: AdRevenueTypeStat = {
|
||||
impressions:
|
||||
(rewardVideoStat?.impressions ?? 0) + (withdrawalVideoStat?.impressions ?? 0),
|
||||
revenue_yuan:
|
||||
(rewardVideoStat?.revenue_yuan ?? 0) + (withdrawalVideoStat?.revenue_yuan ?? 0),
|
||||
};
|
||||
const ecpmOf = (s?: AdRevenueTypeStat) =>
|
||||
s && s.impressions > 0 ? (s.revenue_yuan / s.impressions) * 1000 : 0;
|
||||
|
||||
@@ -987,13 +995,13 @@ export default function AdRevenueReportPage() {
|
||||
<Statistic title="Draw 信息流条数" value={drawStat?.impressions ?? 0} />
|
||||
</Col>
|
||||
<Col span={4}>
|
||||
<Statistic title="看视频收益(元)" value={rvStat?.revenue_yuan ?? 0} precision={4} />
|
||||
<Statistic title="看视频收益(元)" value={videoStat.revenue_yuan} precision={4} />
|
||||
</Col>
|
||||
<Col span={4}>
|
||||
<Statistic title="看视频 eCPM(元/千次)" value={ecpmOf(rvStat)} precision={2} />
|
||||
<Statistic title="看视频 eCPM(元/千次)" value={ecpmOf(videoStat)} precision={2} />
|
||||
</Col>
|
||||
<Col span={4}>
|
||||
<Statistic title="看视频条数" value={rvStat?.impressions ?? 0} />
|
||||
<Statistic title="看视频条数" value={videoStat.impressions} />
|
||||
</Col>
|
||||
</Row>
|
||||
<Divider orientation="left" plain style={{ marginTop: 20, marginBottom: 16 }}>
|
||||
|
||||
Reference in New Issue
Block a user