"""临时探针:只看报表/对账/导出相关接口与路由(用完即删)。""" import os import re import sys if hasattr(sys.stdout, "reconfigure"): sys.stdout.reconfigure(encoding="utf-8", errors="replace") cache = os.path.join(os.environ.get("TEMP", "."), "tianque_js", "all.js") text = open(cache, encoding="utf-8", errors="replace").read() apis = sorted(set(re.findall(r'"(/?management/easypay/api/[A-Za-z0-9_/\-]+)"', text))) KW = ("report", "bill", "settle", "download", "export", "tranInfo", "statis", "sum", "statement", "check", "voucher", "order") print("### 报表/对账/导出相关接口") for p in apis: if any(k.lower() in p.lower() for k in KW): print(" " + p) routes = sorted(set(re.findall(r'path:"(/[A-Za-z0-9_/\-]{2,60})"', text))) print(f"\n### 相关路由(共 {len(routes)} 条路由)") for p in routes: if any(k in p.lower() for k in ("report", "bill", "settle", "tran", "download", "statis", "check", "voucher", "order")): print(" " + p)