v3.48.373
Stable · Mới nhất 10 ngày trước# v3.48.373
## 修复 detect-bm 表格大面积空白(BM 名 / 验证状态 / 受限 / 所有用户)/ Fix detect-bm Excel going blank (BM name / verification / restriction / users)
**问题 / Problem**
- •detect-bm 导出的「BM详情」表里,BM 名称、验证状态、受限/申诉状态、所有用户(邮箱+权限+lastActive)等列大面积变空,功能像是「都没用了」。
**根因 / Root cause**
- •detect-bm 的核心查询(BM 名/验证/死活/成员/主页/广告户)都通过一个共用的网页内 GraphQL 请求拿数据,而这个请求把地址**写死成 `www.facebook.com`**。
- •但 detect-bm 实际运行时页面停在 `business.facebook.com`。Facebook 现在**拦截了跨子域请求**(business → www 报 `Failed to fetch`),于是所有字段都抓不到 → 表格整片空白。
- •真机实测确认:同样的请求发到 `www.facebook.com` 失败,发到当前同源地址(`business.facebook.com` / 相对路径)成功返回数据。
**修复 / Fix**
- •把请求地址改成**相对路径 `/api/graphql/`(同源)**,无论页面在 `www` 还是 `business.facebook.com` 都能正确发送。真机端到端验证:BM 名、验证状态(NOT_VERIFIED)、受限状态、所有用户(含邮箱+权限+lastActive)全部恢复。
- •附带修两处:①「申诉剩余」列字段名写错(`appealDays` → `appealDaysLeft`),受限 BM 的该列以前一直空;②单 BM 检测模式下「BM 名称」列显示占位符而非真名,现已显示真名。
- •性能优化:**主页不再逐个查「拥有者/权限」**(这步最慢且易被 FB 限流)。主页只输出 ID/名称/状态列表即可,无需为每个主页单独发请求。广告户的拥有者查询保持不变(旧方式对死户也有效)。需要恢复主页拥有者可设环境变量 `AUTOWAVE_BM_PAGE_OWNER=1`。
- •完整性修复:**主页/广告户列表现在会翻页拉全**。此前资产查询单次只返回约 20 条且分页游标被 FB 忽略,导致主页/广告户多的 BM 被截断(实测某 BM 101 个主页只列出 10 个)。现改为跟随游标循环拉取直到没有下一页(CDP 实测拿全 101/101 主页)。
---
**English**
- •detect-bm's "BM Details" sheet went largely blank — BM name, verification status, restriction/appeal status, and the full user list (email + permissions + lastActive) all empty.
- •Root cause: the shared in-page GraphQL request that fetches all BM info **hardcoded `www.facebook.com`**, but detect-bm runs on `business.facebook.com`. Facebook now CORS-blocks the cross-subdomain request (`Failed to fetch`), so every field came back empty.
- •Fix: use a **relative same-origin endpoint `/api/graphql/`** — works on both `www` and `business.facebook.com`. Verified end-to-end on a live BM: verification, restriction, and full user list all restored.
- •Also fixed: the "appeal days left" column field-name bug (`appealDays` → `appealDaysLeft`), and the BM-name column showing a placeholder instead of the real name in single-BM mode.
> 普通修复,非强制更新 / Regular fix — non-force update.