Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ecf8150cfc | |||
| 1559d4faf0 | |||
| 9d32234015 | |||
| a2a8451aec | |||
| 578819a284 | |||
| efa443ea8a | |||
| f3cfd622a7 | |||
| 76d317d2ea | |||
| c2f49f2658 | |||
| 7edb4e241c |
@@ -66,21 +66,101 @@ const APP_TAG: Record<string, { color: string; label: string }> = {
|
|||||||
test: { color: 'default', label: '测试应用' },
|
test: { color: 'default', label: '测试应用' },
|
||||||
};
|
};
|
||||||
|
|
||||||
// 发奖状态 → 颜色 + 中文(含「不发金币的原因」:提前关闭/未满10秒/缺eCPM/次数超限)
|
const REWARD_STATUS_HINT: Record<string, string> = {
|
||||||
const STATUS_TAG: Record<string, { color: string; label: string }> = {
|
granted: '已完成金币发放',
|
||||||
granted: { color: 'green', label: '已发' },
|
capped: '次数超限,未发金币',
|
||||||
capped: { color: 'orange', label: '次数超限' },
|
ecpm_missing: '缺少有效 eCPM,未发金币',
|
||||||
ecpm_missing: { color: 'red', label: '缺 eCPM' },
|
too_short: '播放时长未达到发奖条件,未发金币',
|
||||||
too_short: { color: 'gold', label: '未满10秒' },
|
closed_early: '用户提前关闭广告,未发金币',
|
||||||
|
};
|
||||||
|
|
||||||
|
const PLAYBACK_STATUS_TAG: Record<string, { color: string; label: string }> = {
|
||||||
|
completed: { color: 'green', label: '已完成' },
|
||||||
|
too_short: { color: 'gold', label: '观看时长不足' },
|
||||||
closed_early: { color: 'default', label: '提前关闭' },
|
closed_early: { color: 'default', label: '提前关闭' },
|
||||||
|
unknown: { color: 'default', label: '未知' },
|
||||||
};
|
};
|
||||||
const STATUS_HINT: Record<string, string> = {
|
|
||||||
granted: '已满足当前客户端发奖条件并完成金币发放。',
|
const ZERO_REVENUE_REWARD_VIDEO_STATUSES = new Set(['closed_early', 'too_short']);
|
||||||
too_short: '旧版 Draw 信息流观看不足 10 秒,不发金币;新版按观看比例发放时会记为已发。',
|
|
||||||
closed_early: '用户在达到发奖条件前主动关闭,不发金币。',
|
function rewardStatuses(row: AdRevenueRow): string[] {
|
||||||
capped: '已达到次数上限,不再发金币。',
|
if (row.sub_rewards?.length) return row.sub_rewards.map((reward) => reward.status);
|
||||||
ecpm_missing: '缺少有效 eCPM,无法计算金币。',
|
return row.status ? [row.status] : [];
|
||||||
};
|
}
|
||||||
|
|
||||||
|
function effectiveRevenueYuan(row: AdRevenueRow): number {
|
||||||
|
if (
|
||||||
|
row.ad_type === 'reward_video'
|
||||||
|
&& rewardStatuses(row).some((status) => ZERO_REVENUE_REWARD_VIDEO_STATUSES.has(status))
|
||||||
|
) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return row.row_revenue_yuan ?? row.revenue_yuan;
|
||||||
|
}
|
||||||
|
|
||||||
|
function rewardStatusTag(row: AdRevenueRow) {
|
||||||
|
const statuses = rewardStatuses(row);
|
||||||
|
if (!row.has_reward || statuses.length === 0) {
|
||||||
|
return { color: 'default', label: '无记录', hint: '仅记录到广告展示,没有对应发奖记录。' };
|
||||||
|
}
|
||||||
|
|
||||||
|
const grantedCount = statuses.filter((status) => status === 'granted').length;
|
||||||
|
const reasonSummary = Object.entries(
|
||||||
|
statuses
|
||||||
|
.filter((status) => status !== 'granted')
|
||||||
|
.reduce<Record<string, number>>((counts, status) => {
|
||||||
|
counts[status] = (counts[status] ?? 0) + 1;
|
||||||
|
return counts;
|
||||||
|
}, {}),
|
||||||
|
)
|
||||||
|
.map(([status, count]) => `${REWARD_STATUS_HINT[status] ?? status} ${count} 条`)
|
||||||
|
.join(';');
|
||||||
|
|
||||||
|
if (grantedCount === statuses.length) {
|
||||||
|
return { color: 'green', label: '已发', hint: `已完成金币发放${statuses.length > 1 ? ` ${statuses.length} 条` : ''}。` };
|
||||||
|
}
|
||||||
|
if (grantedCount > 0) {
|
||||||
|
return {
|
||||||
|
color: 'blue',
|
||||||
|
label: '部分已发',
|
||||||
|
hint: `已发 ${grantedCount} 条,未发 ${statuses.length - grantedCount} 条${reasonSummary ? `;${reasonSummary}` : ''}。`,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { color: 'default', label: '未发', hint: reasonSummary ? `${reasonSummary}。` : '未发放金币。' };
|
||||||
|
}
|
||||||
|
|
||||||
|
function playbackStatusTag(row: AdRevenueRow) {
|
||||||
|
const statuses = rewardStatuses(row);
|
||||||
|
if (statuses.length === 0) {
|
||||||
|
return row.has_impression
|
||||||
|
? { color: 'blue', label: '仅展示', hint: '记录到广告展示,但没有对应的播放结果。' }
|
||||||
|
: { color: 'default', label: '无记录', hint: '没有可用的广告播放记录。' };
|
||||||
|
}
|
||||||
|
|
||||||
|
const playbackCounts = statuses.reduce<Record<string, number>>((counts, status) => {
|
||||||
|
const playbackStatus =
|
||||||
|
status === 'too_short' || status === 'closed_early'
|
||||||
|
? status
|
||||||
|
: status === 'granted' || status === 'capped' || status === 'ecpm_missing'
|
||||||
|
? 'completed'
|
||||||
|
: 'unknown';
|
||||||
|
counts[playbackStatus] = (counts[playbackStatus] ?? 0) + 1;
|
||||||
|
return counts;
|
||||||
|
}, {});
|
||||||
|
const entries = Object.entries(playbackCounts);
|
||||||
|
if (entries.length === 1) {
|
||||||
|
const [status, count] = entries[0];
|
||||||
|
const tag = PLAYBACK_STATUS_TAG[status];
|
||||||
|
return {
|
||||||
|
...tag,
|
||||||
|
hint: `${tag.label}${count > 1 ? ` ${count} 条` : ''}。`,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
const hint = entries
|
||||||
|
.map(([status, count]) => `${PLAYBACK_STATUS_TAG[status].label} ${count} 条`)
|
||||||
|
.join(';');
|
||||||
|
return { color: 'purple', label: '部分完成', hint: `${hint}。` };
|
||||||
|
}
|
||||||
|
|
||||||
const fmtFactorRange = (a: number | null, b: number | null) => {
|
const fmtFactorRange = (a: number | null, b: number | null) => {
|
||||||
if (a == null) return '-';
|
if (a == null) return '-';
|
||||||
@@ -300,6 +380,8 @@ export default function AdRevenueReportPage() {
|
|||||||
const { message } = App.useApp();
|
const { message } = App.useApp();
|
||||||
const [range, setRange] = useState<[Dayjs, Dayjs]>([dayjs().subtract(1, 'day'), dayjs().subtract(1, 'day')]);
|
const [range, setRange] = useState<[Dayjs, Dayjs]>([dayjs().subtract(1, 'day'), dayjs().subtract(1, 'day')]);
|
||||||
const [userId, setUserId] = useState<number | null>(null);
|
const [userId, setUserId] = useState<number | null>(null);
|
||||||
|
const [appEnv, setAppEnv] = useState<'prod' | 'test' | 'all'>('prod');
|
||||||
|
const [revenueScope, setRevenueScope] = useState<'business' | 'all'>('business');
|
||||||
const [adType, setAdType] = useState<string | undefined>();
|
const [adType, setAdType] = useState<string | undefined>();
|
||||||
// 「场景」作为后端全局筛选(feed_scene):同时影响明细 / 合计 / 趋势,与「用户 / 类型」一致,点「查询」生效。
|
// 「场景」作为后端全局筛选(feed_scene):同时影响明细 / 合计 / 趋势,与「用户 / 类型」一致,点「查询」生效。
|
||||||
const [scene, setScene] = useState<string | undefined>();
|
const [scene, setScene] = useState<string | undefined>();
|
||||||
@@ -333,6 +415,8 @@ export default function AdRevenueReportPage() {
|
|||||||
date_from: from,
|
date_from: from,
|
||||||
date_to: to,
|
date_to: to,
|
||||||
user_id: userId ?? undefined,
|
user_id: userId ?? undefined,
|
||||||
|
app_env: appEnv === 'all' ? undefined : appEnv,
|
||||||
|
revenue_scope: revenueScope,
|
||||||
ad_type: adType ?? undefined,
|
ad_type: adType ?? undefined,
|
||||||
feed_scene: scene ?? undefined,
|
feed_scene: scene ?? undefined,
|
||||||
granularity: gran,
|
granularity: gran,
|
||||||
@@ -374,7 +458,7 @@ export default function AdRevenueReportPage() {
|
|||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[range, userId, adType, scene, granularity, limit, sortBy],
|
[range, userId, appEnv, revenueScope, adType, scene, granularity, limit, sortBy],
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -474,19 +558,25 @@ export default function AdRevenueReportPage() {
|
|||||||
width: 110,
|
width: 110,
|
||||||
align: 'right',
|
align: 'right',
|
||||||
// 一次比价/领券聚合行用 row_revenue_yuan(该次发奖广告 eCPM 折算之和),其它行用展示侧 revenue_yuan
|
// 一次比价/领券聚合行用 row_revenue_yuan(该次发奖广告 eCPM 折算之和),其它行用展示侧 revenue_yuan
|
||||||
render: (v: number, r: AdRevenueRow) => {
|
// 激励视频提前关闭/时长不足时防御性显示 0,与后端有效收益口径一致。
|
||||||
const rev = r.row_revenue_yuan ?? v;
|
render: (_v: number, r: AdRevenueRow) => effectiveRevenueYuan(r).toFixed(4),
|
||||||
return rev.toFixed(4);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '发奖状态',
|
title: '发奖状态',
|
||||||
dataIndex: 'status',
|
key: 'reward_status',
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (s: string | null) => {
|
render: (_: unknown, row: AdRevenueRow) => {
|
||||||
if (!s) return <Tooltip title="仅记录广告展示,没有对应发奖事件。"><Tag>仅展示</Tag></Tooltip>;
|
const tag = rewardStatusTag(row);
|
||||||
const t = STATUS_TAG[s] ?? { color: 'default', label: s };
|
return <Tooltip title={tag.hint}><Tag color={tag.color}>{tag.label}</Tag></Tooltip>;
|
||||||
return <Tooltip title={STATUS_HINT[s]}><Tag color={t.color}>{t.label}</Tag></Tooltip>;
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '广告播放状态',
|
||||||
|
key: 'playback_status',
|
||||||
|
width: 120,
|
||||||
|
render: (_: unknown, row: AdRevenueRow) => {
|
||||||
|
const tag = playbackStatusTag(row);
|
||||||
|
return <Tooltip title={tag.hint}><Tag color={tag.color}>{tag.label}</Tag></Tooltip>;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -528,7 +618,8 @@ export default function AdRevenueReportPage() {
|
|||||||
'ecpm_yuan',
|
'ecpm_yuan',
|
||||||
'revenue_yuan',
|
'revenue_yuan',
|
||||||
'actual_coin',
|
'actual_coin',
|
||||||
'status',
|
'reward_status',
|
||||||
|
'playback_status',
|
||||||
'ad_type',
|
'ad_type',
|
||||||
'app_env',
|
'app_env',
|
||||||
'our_code_id',
|
'our_code_id',
|
||||||
@@ -614,13 +705,14 @@ export default function AdRevenueReportPage() {
|
|||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
「预估收益」为客户端在广告展示(onAdShow)时上报 eCPM 折算的预估值(每千次展示 ÷1000
|
「预估收益」为客户端在广告展示(onAdShow)时上报 eCPM 折算的预估值(每千次展示 ÷1000
|
||||||
累加),<b>只要广告展示就计入、不论是否看完发奖</b>;穿山甲会过滤无效/过短曝光,故预估值可能偏高,
|
累加);<b>激励视频提前关闭或播放时长不足时按 0 计</b>,其他有效展示按 eCPM 折算。穿山甲仍可能过滤无效曝光,
|
||||||
<b>实际收益一律以穿山甲后台结算为准</b>。测试应用多为 0。「广告位ID / 来源应用」为本期新增,历史记录留空。
|
<b>实际收益一律以穿山甲后台结算为准</b>。测试应用多为 0。「广告位ID / 来源应用」为本期新增,历史记录留空。
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
核心指标里的<b>「穿山甲后台收益(T+1)」</b>来自穿山甲 GroMore 数据 API(后台结算口径,次日出数):
|
核心指标里的<b>「穿山甲后台收益(T+1)」</b>来自穿山甲 GroMore 数据 API(后台结算口径,次日出数):
|
||||||
<b>穿山甲预估收益</b>=接口 revenue、<b>收益API</b>=各 ADN 回传更接近结算。穿山甲不提供分用户/类型/场景维度,
|
<b>穿山甲预估收益</b>=接口 revenue、<b>收益API</b>=各 ADN 回传更接近结算。穿山甲不提供分用户/类型/场景维度,
|
||||||
故仅在<b>全量视图</b>(未按用户/类型/场景筛选)展示;逐条事件行仍是客户端预估,不受其影响。
|
故仅在<b>可对账视图</b>(未按用户/类型/场景筛选)展示;环境和数据范围会同时作用于客户端与穿山甲汇总。
|
||||||
|
默认“正式 + 业务代码位”用于同口径对账;切到“全部代码位”会包含广告测试等非业务曝光。
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
@@ -655,6 +747,31 @@ export default function AdRevenueReportPage() {
|
|||||||
style={{ width: 130 }}
|
style={{ width: 130 }}
|
||||||
/>
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
|
<Space size={6}>
|
||||||
|
<Typography.Text type="secondary">环境</Typography.Text>
|
||||||
|
<Select
|
||||||
|
value={appEnv}
|
||||||
|
onChange={setAppEnv}
|
||||||
|
style={{ width: 130 }}
|
||||||
|
options={[
|
||||||
|
{ value: 'prod', label: '正式(prod)' },
|
||||||
|
{ value: 'test', label: '测试(dev)' },
|
||||||
|
{ value: 'all', label: '全部' },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
<Space size={6}>
|
||||||
|
<Typography.Text type="secondary">数据范围</Typography.Text>
|
||||||
|
<Select
|
||||||
|
value={revenueScope}
|
||||||
|
onChange={setRevenueScope}
|
||||||
|
style={{ width: 150 }}
|
||||||
|
options={[
|
||||||
|
{ value: 'business', label: '业务代码位' },
|
||||||
|
{ value: 'all', label: '全部代码位' },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
<Space size={6}>
|
<Space size={6}>
|
||||||
<Typography.Text type="secondary">类型</Typography.Text>
|
<Typography.Text type="secondary">类型</Typography.Text>
|
||||||
<Select
|
<Select
|
||||||
|
|||||||
@@ -10,9 +10,11 @@ import {
|
|||||||
DatePicker,
|
DatePicker,
|
||||||
Divider,
|
Divider,
|
||||||
Input,
|
Input,
|
||||||
|
Popover,
|
||||||
Row,
|
Row,
|
||||||
Select,
|
Select,
|
||||||
Space,
|
Space,
|
||||||
|
Spin,
|
||||||
Statistic,
|
Statistic,
|
||||||
Table,
|
Table,
|
||||||
Tag,
|
Tag,
|
||||||
@@ -72,9 +74,23 @@ interface CouponDataRow {
|
|||||||
app_env: string | null;
|
app_env: string | null;
|
||||||
started_at: string;
|
started_at: string;
|
||||||
claimed_count: number | null;
|
claimed_count: number | null;
|
||||||
|
point_success_count: number | null;
|
||||||
|
point_total_count: number | null;
|
||||||
|
// 兼容旧后端的内嵌明细;新后端不再返回,改为点击后按 trace 加载。
|
||||||
|
point_details?: CouponPointDetail[];
|
||||||
trace_url: string | null;
|
trace_url: string | null;
|
||||||
ad_revenue_yuan: number | null; // 本次领券看的信息流广告预估收益(元);未填充为 null
|
ad_revenue_yuan: number | null; // 本次领券看的信息流广告预估收益(元);未填充为 null
|
||||||
}
|
}
|
||||||
|
interface CouponPointDetail {
|
||||||
|
coupon_id: string;
|
||||||
|
coupon_name: string | null;
|
||||||
|
status: string;
|
||||||
|
reason: string | null;
|
||||||
|
}
|
||||||
|
interface CouponPointDetailsOut {
|
||||||
|
trace_id: string;
|
||||||
|
items: CouponPointDetail[];
|
||||||
|
}
|
||||||
interface CouponDataReport {
|
interface CouponDataReport {
|
||||||
date_from: string;
|
date_from: string;
|
||||||
date_to: string;
|
date_to: string;
|
||||||
@@ -116,6 +132,100 @@ const STATUS_TAG: Record<string, { color: string; label: string }> = {
|
|||||||
abandoned: { color: 'orange', label: '中途退出' },
|
abandoned: { color: 'orange', label: '中途退出' },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const POINT_STATUS_TAG: Record<string, { color: string; label: string }> = {
|
||||||
|
success: { color: 'success', label: '成功' },
|
||||||
|
already_claimed: { color: 'processing', label: '已领' },
|
||||||
|
failed: { color: 'error', label: '失败' },
|
||||||
|
skipped: { color: 'default', label: '跳过' },
|
||||||
|
};
|
||||||
|
|
||||||
|
function PointScorePopover({ row }: { row: CouponDataRow }) {
|
||||||
|
const { message } = App.useApp();
|
||||||
|
const [details, setDetails] = useState<CouponPointDetail[] | null>(row.point_details ?? null);
|
||||||
|
const [loading, setLoading] = useState(false);
|
||||||
|
const [loadError, setLoadError] = useState<string | null>(null);
|
||||||
|
|
||||||
|
if (row.point_success_count == null || row.point_total_count == null || row.point_total_count <= 0) {
|
||||||
|
return <Typography.Text type="secondary">-</Typography.Text>;
|
||||||
|
}
|
||||||
|
const score = `${row.point_success_count}/${row.point_total_count}`;
|
||||||
|
const scoreColor =
|
||||||
|
row.point_success_count === row.point_total_count
|
||||||
|
? STATUS_TAG.completed.color
|
||||||
|
: STATUS_TAG.abandoned.color;
|
||||||
|
const loadDetails = async () => {
|
||||||
|
if (details !== null || loading) return;
|
||||||
|
setLoading(true);
|
||||||
|
setLoadError(null);
|
||||||
|
try {
|
||||||
|
const response = await api.get<CouponPointDetailsOut>('/admin/api/coupon-data/point-details', {
|
||||||
|
params: { trace_id: row.trace_id },
|
||||||
|
});
|
||||||
|
setDetails(response.data.items);
|
||||||
|
} catch (error) {
|
||||||
|
const errorMessage = errMsg(error);
|
||||||
|
setLoadError(errorMessage);
|
||||||
|
message.error(errorMessage);
|
||||||
|
} finally {
|
||||||
|
setLoading(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Popover
|
||||||
|
trigger="click"
|
||||||
|
placement="bottomLeft"
|
||||||
|
title={`点位明细(${score})`}
|
||||||
|
onOpenChange={(open) => {
|
||||||
|
if (open) void loadDetails();
|
||||||
|
}}
|
||||||
|
content={(
|
||||||
|
<div style={{ width: 380, maxHeight: 360, overflowY: 'auto' }}>
|
||||||
|
{loading || (details === null && loadError === null) ? (
|
||||||
|
<Spin size="small" style={{ display: 'block', margin: '24px auto' }} />
|
||||||
|
) : loadError ? (
|
||||||
|
<Typography.Text type="danger">明细加载失败,请关闭后重试</Typography.Text>
|
||||||
|
) : details && details.length > 0 ? details.map((point, index) => {
|
||||||
|
const status = POINT_STATUS_TAG[point.status] ?? {
|
||||||
|
color: 'default', label: point.status,
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
key={`${point.coupon_id}-${index}`}
|
||||||
|
style={{
|
||||||
|
padding: '8px 0',
|
||||||
|
borderBottom: index < details.length - 1 ? '1px solid #f0f0f0' : undefined,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div style={{ display: 'flex', alignItems: 'flex-start', gap: 12 }}>
|
||||||
|
<div style={{ flex: 1, minWidth: 0 }}>
|
||||||
|
<Typography.Text>{point.coupon_name || point.coupon_id}</Typography.Text>
|
||||||
|
{point.coupon_name ? (
|
||||||
|
<div><Typography.Text type="secondary">{point.coupon_id}</Typography.Text></div>
|
||||||
|
) : null}
|
||||||
|
</div>
|
||||||
|
<Tag color={status.color} style={{ marginInlineEnd: 0 }}>{status.label}</Tag>
|
||||||
|
</div>
|
||||||
|
{point.reason ? (
|
||||||
|
<div style={{ marginTop: 4 }}>
|
||||||
|
<Typography.Text type="danger">原因:{point.reason}</Typography.Text>
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}) : (
|
||||||
|
<Typography.Text type="secondary">暂无点位明细</Typography.Text>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<Button type="link" size="small" style={{ height: 'auto', padding: 0, color: scoreColor }}>
|
||||||
|
{score}
|
||||||
|
</Button>
|
||||||
|
</Popover>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// ms → "1.5s"(空值显示 -)
|
// ms → "1.5s"(空值显示 -)
|
||||||
const fmtSec = (ms: number | null | undefined): string =>
|
const fmtSec = (ms: number | null | undefined): string =>
|
||||||
ms == null ? '-' : `${(ms / 1000).toFixed(1)}s`;
|
ms == null ? '-' : `${(ms / 1000).toFixed(1)}s`;
|
||||||
@@ -492,20 +602,10 @@ export default function CouponDataPage() {
|
|||||||
render: (v: number | null) => fmtSec(v),
|
render: (v: number | null) => fmtSec(v),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '点位成功率',
|
title: '百分比',
|
||||||
key: 'point_success_rate',
|
key: 'point_success_rate',
|
||||||
width: 110,
|
width: 110,
|
||||||
render: (_: unknown, r: CouponDataRow) => (
|
render: (_: unknown, r: CouponDataRow) => <PointScorePopover row={r} />,
|
||||||
<Tooltip title="当前接口未返回本场应领点位及逐点结果,前端不使用全局均值冒充本场成功率。">
|
|
||||||
{r.trace_url ? (
|
|
||||||
<a href={r.trace_url} target="_blank" rel="noreferrer">
|
|
||||||
查看明细
|
|
||||||
</a>
|
|
||||||
) : (
|
|
||||||
<Typography.Text type="secondary">待埋点</Typography.Text>
|
|
||||||
)}
|
|
||||||
</Tooltip>
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '广告收益',
|
title: '广告收益',
|
||||||
|
|||||||
@@ -499,12 +499,7 @@ export default function DashboardPage() {
|
|||||||
const tokenCostYuan = periodData?.comparison.token_cost_total_yuan ?? null;
|
const tokenCostYuan = periodData?.comparison.token_cost_total_yuan ?? null;
|
||||||
const couponRewardCoinTotal = periodData?.coins.coupon_reward_coin_total;
|
const couponRewardCoinTotal = periodData?.coins.coupon_reward_coin_total;
|
||||||
const comparisonRewardCoinTotal = periodData?.coins.comparison_reward_coin_total;
|
const comparisonRewardCoinTotal = periodData?.coins.comparison_reward_coin_total;
|
||||||
const signinCoinTotal = periodData?.coins.signin_coin_total;
|
const regularTaskCoinTotal = periodData?.coins.regular_task_coin_total;
|
||||||
const signinBoostCoinTotal = periodData?.coins.signin_boost_coin_total;
|
|
||||||
const taskCoinTotal = periodData?.coins.task_coin_total;
|
|
||||||
const regularTaskCoinTotal =
|
|
||||||
periodData?.coins.regular_task_coin_total ??
|
|
||||||
((signinCoinTotal ?? 0) + (signinBoostCoinTotal ?? 0) + (taskCoinTotal ?? 0));
|
|
||||||
const cpsAvailable = data?.cps.available === true;
|
const cpsAvailable = data?.cps.available === true;
|
||||||
const meituanCpsCommissionCents = data?.cps.meituan_commission_cents;
|
const meituanCpsCommissionCents = data?.cps.meituan_commission_cents;
|
||||||
const jdCpsCommissionCents = data?.cps.jd_commission_cents;
|
const jdCpsCommissionCents = data?.cps.jd_commission_cents;
|
||||||
@@ -1077,6 +1072,7 @@ export default function DashboardPage() {
|
|||||||
value={fmtInt(regularTaskCoinTotal)}
|
value={fmtInt(regularTaskCoinTotal)}
|
||||||
delta={regularTaskCoinRatio.value}
|
delta={regularTaskCoinRatio.value}
|
||||||
deltaTone={regularTaskCoinRatio.tone}
|
deltaTone={regularTaskCoinRatio.tone}
|
||||||
|
hint="每日签到、历史签到膨胀、通知/其他任务、上报更低价和反馈采纳的实发金币之和。"
|
||||||
/>
|
/>
|
||||||
<StatCard
|
<StatCard
|
||||||
title="本期提现金额"
|
title="本期提现金额"
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import type { Dayjs } from 'dayjs';
|
|||||||
import { api } from '@/lib/api';
|
import { api } from '@/lib/api';
|
||||||
import { canDo } from '@/lib/auth';
|
import { canDo } from '@/lib/auth';
|
||||||
import { formatWallTime } from '@/lib/format';
|
import { formatWallTime } from '@/lib/format';
|
||||||
|
import { refreshReviewBadge } from '@/lib/reviewBadge';
|
||||||
import { usePagedList } from '@/lib/usePagedList';
|
import { usePagedList } from '@/lib/usePagedList';
|
||||||
import type { Feedback, FeedbackSummary } from '@/lib/types';
|
import type { Feedback, FeedbackSummary } from '@/lib/types';
|
||||||
import FeedbackHandleDrawer from './FeedbackHandleDrawer';
|
import FeedbackHandleDrawer from './FeedbackHandleDrawer';
|
||||||
@@ -431,7 +432,11 @@ export default function FeedbacksPage() {
|
|||||||
feedback={drawerFb}
|
feedback={drawerFb}
|
||||||
open={drawerOpen}
|
open={drawerOpen}
|
||||||
onClose={() => setDrawerOpen(false)}
|
onClose={() => setDrawerOpen(false)}
|
||||||
onDone={() => { reload(); loadSummary(); }}
|
onDone={() => {
|
||||||
|
reload();
|
||||||
|
loadSummary();
|
||||||
|
refreshReviewBadge('/feedbacks');
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<UserRecordsDrawer<Feedback>
|
<UserRecordsDrawer<Feedback>
|
||||||
|
|||||||
+110
-8
@@ -1,6 +1,6 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useRef, useState } from 'react';
|
||||||
import { usePathname, useRouter } from 'next/navigation';
|
import { usePathname, useRouter } from 'next/navigation';
|
||||||
import {
|
import {
|
||||||
BarChartOutlined,
|
BarChartOutlined,
|
||||||
@@ -25,7 +25,16 @@ import {
|
|||||||
import { Avatar, Dropdown, Layout, Tooltip } from 'antd';
|
import { Avatar, Dropdown, Layout, Tooltip } from 'antd';
|
||||||
import { api } from '@/lib/api';
|
import { api } from '@/lib/api';
|
||||||
import { clearAuth, getAdmin, getToken, setAuth } from '@/lib/auth';
|
import { clearAuth, getAdmin, getToken, setAuth } from '@/lib/auth';
|
||||||
import type { AdminInfo } from '@/lib/types';
|
import {
|
||||||
|
REVIEW_BADGE_REFRESH_EVENT,
|
||||||
|
type ReviewBadgeKey,
|
||||||
|
} from '@/lib/reviewBadge';
|
||||||
|
import type {
|
||||||
|
AdminInfo,
|
||||||
|
FeedbackSummary,
|
||||||
|
PriceReportSummary,
|
||||||
|
WithdrawSummary,
|
||||||
|
} from '@/lib/types';
|
||||||
|
|
||||||
const { Sider, Header, Content } = Layout;
|
const { Sider, Header, Content } = Layout;
|
||||||
|
|
||||||
@@ -58,8 +67,6 @@ const NAV_GROUPS: NavGroup[] = [
|
|||||||
{ key: '/comparison-records', icon: <ProfileOutlined />, label: '比价记录' },
|
{ key: '/comparison-records', icon: <ProfileOutlined />, label: '比价记录' },
|
||||||
{ key: '/coupon-data', icon: <GiftOutlined />, label: '领券记录' },
|
{ key: '/coupon-data', icon: <GiftOutlined />, label: '领券记录' },
|
||||||
{ key: '/cps', icon: <ShareAltOutlined />, label: 'CPS收益' },
|
{ key: '/cps', icon: <ShareAltOutlined />, label: 'CPS收益' },
|
||||||
{ key: '/device-liveness', icon: <HeartOutlined />, label: '设备存活' },
|
|
||||||
{ key: '/analytics-health', icon: <LineChartOutlined />, label: '埋点成功率' },
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -83,9 +90,18 @@ const NAV_GROUPS: NavGroup[] = [
|
|||||||
{ key: '/users', icon: <UserOutlined />, label: '用户管理' },
|
{ 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: '/admins', icon: <TeamOutlined />, label: '权限管理' },
|
||||||
{ key: '/event-logs', icon: <DatabaseOutlined />, label: '埋点日志' },
|
|
||||||
{ key: '/audit-logs', icon: <FileSearchOutlined />, label: '审计日志' },
|
|
||||||
];
|
];
|
||||||
|
|
||||||
// 导航项 key(/dashboard)→ 权限页 key(dashboard),与后端 permissions.py 目录对齐
|
// 导航项 key(/dashboard)→ 权限页 key(dashboard),与后端 permissions.py 目录对齐
|
||||||
@@ -96,6 +112,8 @@ export default function MainLayout({ children }: { children: React.ReactNode })
|
|||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
const [admin, setAdmin] = useState<AdminInfo | null>(null);
|
const [admin, setAdmin] = useState<AdminInfo | null>(null);
|
||||||
const [collapsed, setCollapsed] = useState(false);
|
const [collapsed, setCollapsed] = useState(false);
|
||||||
|
const [pendingReviewCounts, setPendingReviewCounts] = useState<Partial<Record<ReviewBadgeKey, number>>>({});
|
||||||
|
const reviewRefreshVersion = useRef<Partial<Record<ReviewBadgeKey, number>>>({});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const token = getToken();
|
const token = getToken();
|
||||||
@@ -114,6 +132,44 @@ export default function MainLayout({ children }: { children: React.ReactNode })
|
|||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
}, [router]);
|
}, [router]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!admin) return;
|
||||||
|
const canAccess = (page: string) =>
|
||||||
|
admin.role === 'super_admin' || !admin.pages || admin.pages.includes(page);
|
||||||
|
|
||||||
|
const refresh = async (key: ReviewBadgeKey) => {
|
||||||
|
if (!canAccess(key.slice(1))) return;
|
||||||
|
const version = (reviewRefreshVersion.current[key] ?? 0) + 1;
|
||||||
|
reviewRefreshVersion.current[key] = version;
|
||||||
|
let count: number;
|
||||||
|
if (key === '/withdraws') {
|
||||||
|
count = (await api.get<WithdrawSummary>('/admin/api/withdraws/summary')).data.reviewing_count;
|
||||||
|
} else if (key === '/price-reports') {
|
||||||
|
count = (await api.get<PriceReportSummary>('/admin/api/price-reports/summary')).data.pending;
|
||||||
|
} else {
|
||||||
|
count = (await api.get<FeedbackSummary>('/admin/api/feedbacks/summary')).data.pending;
|
||||||
|
}
|
||||||
|
if (reviewRefreshVersion.current[key] !== version) return;
|
||||||
|
setPendingReviewCounts((current) => ({ ...current, [key]: count }));
|
||||||
|
};
|
||||||
|
|
||||||
|
const refreshSafely = (key: ReviewBadgeKey) => refresh(key).catch(() => {});
|
||||||
|
void Promise.all([
|
||||||
|
refreshSafely('/withdraws'),
|
||||||
|
refreshSafely('/price-reports'),
|
||||||
|
refreshSafely('/feedbacks'),
|
||||||
|
]);
|
||||||
|
|
||||||
|
const onReviewCompleted = (event: Event) => {
|
||||||
|
const key = (event as CustomEvent<ReviewBadgeKey>).detail;
|
||||||
|
if (key) void refreshSafely(key);
|
||||||
|
};
|
||||||
|
window.addEventListener(REVIEW_BADGE_REFRESH_EVENT, onReviewCompleted);
|
||||||
|
return () => {
|
||||||
|
window.removeEventListener(REVIEW_BADGE_REFRESH_EVENT, onReviewCompleted);
|
||||||
|
};
|
||||||
|
}, [admin]);
|
||||||
|
|
||||||
if (!admin) return null; // 守卫期间不闪烁内容
|
if (!admin) return null; // 守卫期间不闪烁内容
|
||||||
|
|
||||||
// 选中态:取路径一级(/users/123 -> /users)
|
// 选中态:取路径一级(/users/123 -> /users)
|
||||||
@@ -132,6 +188,20 @@ export default function MainLayout({ children }: { children: React.ReactNode })
|
|||||||
hasChildren(group) ? group.children : [group],
|
hasChildren(group) ? group.children : [group],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const reviewBadge = (key: string) => {
|
||||||
|
const count = pendingReviewCounts[key as ReviewBadgeKey] ?? 0;
|
||||||
|
if (count <= 0) return null;
|
||||||
|
return (
|
||||||
|
<span
|
||||||
|
className="nav-review-badge"
|
||||||
|
aria-label={`${count} 条未审核`}
|
||||||
|
title={`${count} 条未审核`}
|
||||||
|
>
|
||||||
|
{count}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const logout = () => {
|
const logout = () => {
|
||||||
clearAuth();
|
clearAuth();
|
||||||
router.replace('/login');
|
router.replace('/login');
|
||||||
@@ -166,6 +236,7 @@ export default function MainLayout({ children }: { children: React.ReactNode })
|
|||||||
aria-label={item.label}
|
aria-label={item.label}
|
||||||
>
|
>
|
||||||
{item.icon}
|
{item.icon}
|
||||||
|
{reviewBadge(item.key)}
|
||||||
</button>
|
</button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
))
|
))
|
||||||
@@ -183,7 +254,8 @@ export default function MainLayout({ children }: { children: React.ReactNode })
|
|||||||
onClick={() => router.push(group.key)}
|
onClick={() => router.push(group.key)}
|
||||||
>
|
>
|
||||||
<span className="nav-primary-icon">{group.icon}</span>
|
<span className="nav-primary-icon">{group.icon}</span>
|
||||||
<span>{group.label}</span>
|
<span className="nav-item-label">{group.label}</span>
|
||||||
|
{reviewBadge(group.key)}
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -202,7 +274,8 @@ export default function MainLayout({ children }: { children: React.ReactNode })
|
|||||||
onClick={() => router.push(child.key)}
|
onClick={() => router.push(child.key)}
|
||||||
>
|
>
|
||||||
<span className="nav-child-icon">{child.icon}</span>
|
<span className="nav-child-icon">{child.icon}</span>
|
||||||
<span>{child.label}</span>
|
<span className="nav-item-label">{child.label}</span>
|
||||||
|
{reviewBadge(child.key)}
|
||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
@@ -269,6 +342,29 @@ export default function MainLayout({ children }: { children: React.ReactNode })
|
|||||||
color: rgba(255, 255, 255, 0.72);
|
color: rgba(255, 255, 255, 0.72);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
.nav-item-label {
|
||||||
|
min-width: 0;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.nav-review-badge {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
min-width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
padding: 0 5px;
|
||||||
|
border-radius: 9px;
|
||||||
|
background: #ff4d4f;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 18px;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
|
||||||
|
}
|
||||||
.nav-direct,
|
.nav-direct,
|
||||||
.nav-child,
|
.nav-child,
|
||||||
.nav-icon-button {
|
.nav-icon-button {
|
||||||
@@ -332,6 +428,7 @@ export default function MainLayout({ children }: { children: React.ReactNode })
|
|||||||
padding: 0 8px 14px;
|
padding: 0 8px 14px;
|
||||||
}
|
}
|
||||||
.nav-icon-button {
|
.nav-icon-button {
|
||||||
|
position: relative;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -342,6 +439,11 @@ export default function MainLayout({ children }: { children: React.ReactNode })
|
|||||||
color: rgba(255, 255, 255, 0.72);
|
color: rgba(255, 255, 255, 0.72);
|
||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
}
|
}
|
||||||
|
.nav-icon-button .nav-review-badge {
|
||||||
|
position: absolute;
|
||||||
|
top: 1px;
|
||||||
|
right: -6px;
|
||||||
|
}
|
||||||
.nav-icon-button:hover,
|
.nav-icon-button:hover,
|
||||||
.nav-icon-button.is-selected {
|
.nav-icon-button.is-selected {
|
||||||
background: #1677ff;
|
background: #1677ff;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import dayjs from 'dayjs';
|
|||||||
import { api, errMsg } from '@/lib/api';
|
import { api, errMsg } from '@/lib/api';
|
||||||
import { canDo } from '@/lib/auth';
|
import { canDo } from '@/lib/auth';
|
||||||
import { mediaUrl } from '@/lib/media';
|
import { mediaUrl } from '@/lib/media';
|
||||||
|
import { refreshReviewBadge } from '@/lib/reviewBadge';
|
||||||
import { usePagedList } from '@/lib/usePagedList';
|
import { usePagedList } from '@/lib/usePagedList';
|
||||||
import type { PriceReport, PriceReportSummary } from '@/lib/types';
|
import type { PriceReport, PriceReportSummary } from '@/lib/types';
|
||||||
import UserRecordsDrawer from '@/components/UserRecordsDrawer';
|
import UserRecordsDrawer from '@/components/UserRecordsDrawer';
|
||||||
@@ -202,6 +203,7 @@ export default function PriceReportsPage() {
|
|||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
try {
|
try {
|
||||||
await api.post(`/admin/api/price-reports/${r.id}/approve`);
|
await api.post(`/admin/api/price-reports/${r.id}/approve`);
|
||||||
|
refreshReviewBadge('/price-reports');
|
||||||
message.success('已通过,已发放 1000 金币');
|
message.success('已通过,已发放 1000 金币');
|
||||||
refreshAfterChange();
|
refreshAfterChange();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -220,6 +222,7 @@ export default function PriceReportsPage() {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await api.post(`/admin/api/price-reports/${rejecting.id}/reject`, { reason });
|
await api.post(`/admin/api/price-reports/${rejecting.id}/reject`, { reason });
|
||||||
|
refreshReviewBadge('/price-reports');
|
||||||
message.success('已拒绝');
|
message.success('已拒绝');
|
||||||
setRejecting(null);
|
setRejecting(null);
|
||||||
setRejectReason('');
|
setRejectReason('');
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ import dayjs, { type Dayjs } from 'dayjs';
|
|||||||
import { api, errMsg } from '@/lib/api';
|
import { api, errMsg } from '@/lib/api';
|
||||||
import { canDo } from '@/lib/auth';
|
import { canDo } from '@/lib/auth';
|
||||||
import { formatUtcTime, utcDayjs, utcFromNow, yuan } from '@/lib/format';
|
import { formatUtcTime, utcDayjs, utcFromNow, yuan } from '@/lib/format';
|
||||||
|
import { refreshReviewBadge } from '@/lib/reviewBadge';
|
||||||
import { usePagedList } from '@/lib/usePagedList';
|
import { usePagedList } from '@/lib/usePagedList';
|
||||||
import type {
|
import type {
|
||||||
AuditLog,
|
AuditLog,
|
||||||
@@ -332,6 +333,7 @@ export default function WithdrawsPage() {
|
|||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
try {
|
try {
|
||||||
await api.post(`/admin/api/withdraws/${o.out_bill_no}/approve`);
|
await api.post(`/admin/api/withdraws/${o.out_bill_no}/approve`);
|
||||||
|
refreshReviewBadge('/withdraws');
|
||||||
message.success('已通过审核并发起打款');
|
message.success('已通过审核并发起打款');
|
||||||
await refreshAfterChange(o.out_bill_no);
|
await refreshAfterChange(o.out_bill_no);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -362,6 +364,7 @@ export default function WithdrawsPage() {
|
|||||||
await api.post(`/admin/api/withdraws/${targets[0].out_bill_no}/reject`, { reason: trimmed });
|
await api.post(`/admin/api/withdraws/${targets[0].out_bill_no}/reject`, { reason: trimmed });
|
||||||
message.success('已拒绝并退回余额');
|
message.success('已拒绝并退回余额');
|
||||||
}
|
}
|
||||||
|
refreshReviewBadge('/withdraws');
|
||||||
setRejecting(null);
|
setRejecting(null);
|
||||||
setBulkRejecting([]);
|
setBulkRejecting([]);
|
||||||
setRejectReason('');
|
setRejectReason('');
|
||||||
@@ -400,6 +403,7 @@ export default function WithdrawsPage() {
|
|||||||
const { data } = await api.post<WithdrawBulkResult>('/admin/api/withdraws/bulk/approve', {
|
const { data } = await api.post<WithdrawBulkResult>('/admin/api/withdraws/bulk/approve', {
|
||||||
out_bill_nos: selectedReviewing.map((item) => item.out_bill_no),
|
out_bill_nos: selectedReviewing.map((item) => item.out_bill_no),
|
||||||
});
|
});
|
||||||
|
refreshReviewBadge('/withdraws');
|
||||||
const text = bulkResultText('批量通过完成', data);
|
const text = bulkResultText('批量通过完成', data);
|
||||||
if (data.failed) message.warning(text);
|
if (data.failed) message.warning(text);
|
||||||
else message.success(text);
|
else message.success(text);
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
export type ReviewBadgeKey = '/withdraws' | '/price-reports' | '/feedbacks';
|
||||||
|
|
||||||
|
export const REVIEW_BADGE_REFRESH_EVENT = 'review-badge-refresh';
|
||||||
|
|
||||||
|
export function refreshReviewBadge(key: ReviewBadgeKey) {
|
||||||
|
if (typeof window === 'undefined') return;
|
||||||
|
window.dispatchEvent(
|
||||||
|
new CustomEvent<ReviewBadgeKey>(REVIEW_BADGE_REFRESH_EVENT, { detail: key }),
|
||||||
|
);
|
||||||
|
}
|
||||||
+1
-1
@@ -488,7 +488,7 @@ export interface AdRevenueRow {
|
|||||||
has_impression: boolean; // 是否有广告展示(信息流逐条展示=true,纯发奖行=false)
|
has_impression: boolean; // 是否有广告展示(信息流逐条展示=true,纯发奖行=false)
|
||||||
impressions: number; // 本行展示条数 1/0(供日汇总、趋势图复用)
|
impressions: number; // 本行展示条数 1/0(供日汇总、趋势图复用)
|
||||||
ecpm: string | null; // 分/千次;展示行取展示值,纯发奖行取发奖采用值
|
ecpm: string | null; // 分/千次;展示行取展示值,纯发奖行取发奖采用值
|
||||||
revenue_yuan: number; // 本次展示预估收益(元);纯发奖行=0
|
revenue_yuan: number; // 本次有效展示预估收益(元);纯发奖、激励视频提前关闭/时长不足=0
|
||||||
row_revenue_yuan?: number | null; // 主表逐行显示用:一次比价/领券聚合行=该次发奖广告 eCPM 折算之和;其它行空(回退 revenue_yuan)
|
row_revenue_yuan?: number | null; // 主表逐行显示用:一次比价/领券聚合行=该次发奖广告 eCPM 折算之和;其它行空(回退 revenue_yuan)
|
||||||
adn: string | null; // 实际填充 ADN;纯发奖行为空
|
adn: string | null; // 实际填充 ADN;纯发奖行为空
|
||||||
slot_id: string | null; // 底层 mediation rit;纯发奖行为空
|
slot_id: string | null; // 底层 mediation rit;纯发奖行为空
|
||||||
|
|||||||
Reference in New Issue
Block a user