From c055cd705d477051143c4e87a98faa7dd05c426f Mon Sep 17 00:00:00 2001 From: linkeyu Date: Mon, 27 Jul 2026 11:36:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E5=B9=BF=E5=91=8A=E6=94=B6=E7=9B=8A=E9=A1=B6=E9=83=A8=E7=AD=9B?= =?UTF-8?q?=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: '福利' },