From 8d7f36ddac7d187303bfc58fda92c4ee2c6a7f89 Mon Sep 17 00:00:00 2001 From: linkeyu Date: Mon, 27 Jul 2026 10:24:12 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E6=94=B6=E7=9B=8A=E6=98=8E=E7=BB=86=E5=B9=BF=E5=91=8A?= =?UTF-8?q?=E7=BD=91=E7=BB=9C=E6=9D=A5=E6=BA=90=20(#81)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 本次改动 - 展开聚合收益记录时优先展示每条明细自身的 ADN - 单条发奖明细同样读取明细级来源 - 无唯一来源证据的历史记录明确显示“未上报” ## 验证 TypeScript `--noEmit` 检查通过。 依赖服务端 PR:WonderableAI/shaguabijia-app-server#179。 --------- Co-authored-by: linkeyu <798648091@qq.com> Reviewed-on: https://gitea.shaguabijia.com/WonderableAI/shaguabijia-admin-web/pulls/81 Co-authored-by: linkeyu Co-committed-by: linkeyu --- src/app/(main)/ad-revenue-report/page.tsx | 22 +++++++++++++++++++--- src/lib/types.ts | 2 ++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/app/(main)/ad-revenue-report/page.tsx b/src/app/(main)/ad-revenue-report/page.tsx index 189f373..a70ebf0 100644 --- a/src/app/(main)/ad-revenue-report/page.tsx +++ b/src/app/(main)/ad-revenue-report/page.tsx @@ -194,7 +194,16 @@ type AdRevenueDetailRow = AdRevenueRecord & { source_adn?: string | null }; // 展开行(逐条事件展开)- 该条的发奖复算明细(还原金币审计的 eCPM/因子1/份数/LT/因子2 等列) const DETAIL_COLUMNS: ColumnsType = [ - { title: '来源广告网络', dataIndex: 'source_adn', width: 110, render: (value: string | null) => value || '-' }, + { + title: '来源广告网络', + dataIndex: 'source_adn', + width: 110, + render: (value: string | null) => value?.trim() || ( + + 未上报 + + ), + }, { title: 'eCPM(元)', dataIndex: 'ecpm', @@ -1102,7 +1111,11 @@ export default function AdRevenueReportPage() { style={{ marginTop: 8 }} rowKey="record_id" columns={DETAIL_COLUMNS} - dataSource={r.sub_rewards.map((detail) => ({ ...detail, source_adn: r.adn }))} + dataSource={r.sub_rewards.map((detail) => ({ + ...detail, + // 一次比价/领券可能由不同 ADN 连续填充,优先显示本条发奖记录的来源。 + source_adn: detail.adn ?? r.adn, + }))} pagination={false} size="small" scroll={{ x: 900 }} @@ -1118,7 +1131,10 @@ export default function AdRevenueReportPage() { style={{ marginTop: 8 }} rowKey="record_id" columns={DETAIL_COLUMNS} - dataSource={[{ ...r.reward_detail, source_adn: r.adn }]} + dataSource={[{ + ...r.reward_detail, + source_adn: r.reward_detail.adn ?? r.adn, + }]} pagination={false} size="small" scroll={{ x: 900 }} diff --git a/src/lib/types.ts b/src/lib/types.ts index 26d8d95..18c2a32 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -542,6 +542,8 @@ export interface AdRevenueRecord { expected_coin: number; actual_coin: number; matched: boolean; + adn: string | null; // 本条发奖对应的实际填充 ADN + slot_id: string | null; // 本条发奖对应的底层 mediation rit } // 广告收益报表:按日期汇总的一天(按天趋势图用;全量,不受分页影响) From c055cd705d477051143c4e87a98faa7dd05c426f Mon Sep 17 00:00:00 2001 From: linkeyu Date: Mon, 27 Jul 2026 11:36:10 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E5=B9=BF=E5=91=8A=E6=94=B6=E7=9B=8A=E9=A1=B6=E9=83=A8?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E9=BB=98=E8=AE=A4=E5=80=BC=20(#78)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 本次改动 - 类型和场景筛选增加明确的“全部”选项 - 将默认每页记录数从 1000 调整为 50 ## 范围 仅修改 `src/app/(main)/ad-revenue-report/page.tsx`。 --------- Co-authored-by: linkeyu <798648091@qq.com> Reviewed-on: https://gitea.shaguabijia.com/WonderableAI/shaguabijia-admin-web/pulls/78 Co-authored-by: linkeyu Co-committed-by: linkeyu --- src/app/(main)/ad-revenue-report/page.tsx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/app/(main)/ad-revenue-report/page.tsx b/src/app/(main)/ad-revenue-report/page.tsx index a70ebf0..266ad3a 100644 --- a/src/app/(main)/ad-revenue-report/page.tsx +++ b/src/app/(main)/ad-revenue-report/page.tsx @@ -43,6 +43,8 @@ import type { import UserAdRevenueDrawer from './UserAdRevenueDrawer'; const { RangePicker } = DatePicker; +const DEFAULT_PAGE_SIZE = 50; +const ALL_FILTER_VALUE = '__all__'; // 广告类型标签 const TYPE_TAG: Record = { @@ -396,13 +398,13 @@ export default function AdRevenueReportPage() { const [scene, setScene] = useState(); const [granularity, setGranularity] = useState<'day' | 'hour'>('day'); const [sortBy, setSortBy] = useState<'time' | 'ecpm'>('time'); // 明细排序:time=时间倒序 / ecpm=eCPM 倒序 - const [limit, setLimit] = useState(1000); // 默认拉满接口单页上限,供单次流程广告数分位统计 + const [limit, setLimit] = useState(DEFAULT_PAGE_SIZE); const [page, setPage] = useState(1); // 当前页码(后端分页;1 起) const [queriedGranularity, setQueriedGranularity] = useState<'day' | 'hour'>('day'); // 本次结果对应的粒度,决定是否显示「小时」列 const [queriedMultiDay, setQueriedMultiDay] = useState(false); // 本次结果是否跨多天,决定显示「日期」列 + 按天/按小时图 const [data, setData] = useState(null); const [allFlowItems, setAllFlowItems] = useState([]); - const [queriedLimit, setQueriedLimit] = useState(1000); + const [queriedLimit, setQueriedLimit] = useState(DEFAULT_PAGE_SIZE); const [loading, setLoading] = useState(false); const [formulaOpen, setFormulaOpen] = useState(false); // 点用户手机号弹出的「用户广告收益详情」半屏抽屉(userId + 手机号;null=关闭) @@ -784,12 +786,11 @@ export default function AdRevenueReportPage() { 类型 setScene(value === ALL_FILTER_VALUE ? undefined : value)} style={{ width: 130 }} options={[ + { value: ALL_FILTER_VALUE, label: '全部' }, { value: 'comparison', label: '比价' }, { value: 'coupon', label: '领券' }, { value: 'welfare', label: '福利' }, From dd28307413adfcd63d61e2ca5f5333d853531237 Mon Sep 17 00:00:00 2001 From: linkeyu Date: Mon, 27 Jul 2026 11:36:20 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=BE=A7=E6=A0=8F=E6=BB=9A=E5=8A=A8=E4=B8=8E=E6=9D=83?= =?UTF-8?q?=E9=99=90=E7=AE=A1=E7=90=86=E4=BD=8D=E7=BD=AE=20(#77)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 本次改动 - 修复小屏时左侧导航无法滚动、末尾菜单不可见的问题 - 将“权限管理”调整至“监控审计”板块之前 ## 范围 仅修改 `src/app/(main)/layout.tsx`。 --------- Co-authored-by: linkeyu <798648091@qq.com> Reviewed-on: https://gitea.shaguabijia.com/WonderableAI/shaguabijia-admin-web/pulls/77 Co-authored-by: linkeyu Co-committed-by: linkeyu --- src/app/(main)/layout.tsx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/app/(main)/layout.tsx b/src/app/(main)/layout.tsx index b63fdc5..389f232 100644 --- a/src/app/(main)/layout.tsx +++ b/src/app/(main)/layout.tsx @@ -91,6 +91,7 @@ const NAV_GROUPS: NavGroup[] = [ { key: '/users', icon: , label: '用户管理' }, ], }, + { key: '/admins', icon: , label: '权限管理' }, { key: 'monitoring-audit', icon: , @@ -103,7 +104,6 @@ const NAV_GROUPS: NavGroup[] = [ { key: '/audit-logs', icon: , label: '审计日志' }, ], }, - { key: '/admins', icon: , label: '权限管理' }, ]; // 导航项 key(/dashboard)→ 权限页 key(dashboard),与后端 permissions.py 目录对齐 @@ -223,8 +223,7 @@ export default function MainLayout({ children }: { children: React.ReactNode }) position: 'sticky', top: 0, height: '100vh', - overflowY: 'auto', - overflowX: 'hidden', + overflow: 'hidden', }} >