restore: 恢复 11-06~11-09 本地未提交改动
- libs: 新增 hr_sdk / hotel_report / dingtalk,更新 desktopauto - controlplane-next: SDK 管理模块(controller/entity/migrations)与前端视图 - electron-shell: 插件同步、注册表、runner 调整 - plugins: XQ0035/XQ0041/XQ0042/XQ0045_XQ0046/XQ0048/XQ0076/XQ0078 等版本更新 - tests/tools: 新增 SDK 兼容性检查与打包工具(sdk_pack.py、sdk_compat_check.py)
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
"""临时探针:拉前端 bundle,列出全部业务接口路径 + 报表相关路由(用完即删)。"""
|
||||
import os
|
||||
import re
|
||||
import ssl
|
||||
import sys
|
||||
|
||||
import requests
|
||||
from requests.adapters import HTTPAdapter
|
||||
|
||||
if hasattr(sys.stdout, "reconfigure"):
|
||||
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
|
||||
|
||||
BASE = "https://mch-web.tianquetech.com"
|
||||
OUT = os.path.join(os.environ.get("TEMP", "."), "tianque_js")
|
||||
os.makedirs(OUT, exist_ok=True)
|
||||
|
||||
|
||||
class Low(HTTPAdapter):
|
||||
def init_poolmanager(self, *a, **kw):
|
||||
ctx = ssl.create_default_context()
|
||||
ctx.set_ciphers("DEFAULT@SECLEVEL=0")
|
||||
ctx.check_hostname = False
|
||||
ctx.verify_mode = ssl.CERT_NONE
|
||||
kw["ssl_context"] = ctx
|
||||
return super().init_poolmanager(*a, **kw)
|
||||
|
||||
|
||||
s = requests.Session()
|
||||
s.mount("https://", Low())
|
||||
s.headers.update({"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/120.0.0.0 Safari/537.36"})
|
||||
r = s.get(BASE + "/login", timeout=30)
|
||||
srcs = re.findall(r'<script[^>]+src="([^"]+)"', r.text)
|
||||
text = ""
|
||||
for src in srcs:
|
||||
url = src if src.startswith("http") else BASE + ("" if src.startswith("/") else "/") + src
|
||||
text += s.get(url, timeout=30).text
|
||||
|
||||
cache = os.path.join(OUT, "all.js")
|
||||
open(cache, "w", encoding="utf-8", errors="replace").write(text)
|
||||
|
||||
apis = sorted(set(re.findall(r'"(/?management/easypay/api/[A-Za-z0-9_/\-]+)"', text)))
|
||||
print(f"### 接口共 {len(apis)}")
|
||||
for p in apis:
|
||||
print(" " + p)
|
||||
|
||||
KW = ("report", "bill", "settle", "download", "export", "tranInfo", "statis", "sum", "statement", "check")
|
||||
print("\n### 报表/对账/导出相关")
|
||||
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,40})"', 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", "account")):
|
||||
print(" " + p)
|
||||
Reference in New Issue
Block a user