Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9da203d790 | |||
| ecf8150cfc |
@@ -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) => {
|
||||
|
||||
@@ -149,6 +149,9 @@ function PointScorePopover({ row }: { row: CouponDataRow }) {
|
||||
return <Typography.Text type="secondary">-</Typography.Text>;
|
||||
}
|
||||
const score = `${row.point_success_count}/${row.point_total_count}`;
|
||||
const scoreWithRate = `${score}(${(
|
||||
row.point_success_count / row.point_total_count * 100
|
||||
).toFixed(1)}%)`;
|
||||
const scoreColor =
|
||||
row.point_success_count === row.point_total_count
|
||||
? STATUS_TAG.completed.color
|
||||
@@ -220,7 +223,7 @@ function PointScorePopover({ row }: { row: CouponDataRow }) {
|
||||
)}
|
||||
>
|
||||
<Button type="link" size="small" style={{ height: 'auto', padding: 0, color: scoreColor }}>
|
||||
{score}
|
||||
{scoreWithRate}
|
||||
</Button>
|
||||
</Popover>
|
||||
);
|
||||
@@ -602,9 +605,9 @@ export default function CouponDataPage() {
|
||||
render: (v: number | null) => fmtSec(v),
|
||||
},
|
||||
{
|
||||
title: '百分比',
|
||||
title: '单券成功率',
|
||||
key: 'point_success_rate',
|
||||
width: 110,
|
||||
width: 150,
|
||||
render: (_: unknown, r: CouponDataRow) => <PointScorePopover row={r} />,
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user