feat条件单候选展示交易户资金,并支持打开实例划转。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-13 14:07:20 +08:00
parent f2605b1e8f
commit 88337ecdaf
8 changed files with 183 additions and 8 deletions
+7
View File
@@ -24,11 +24,18 @@ def build_embed_open_url(
bridge_token: str,
embed_path: str = "/embed",
ttl_sec: int = 120,
tab: str | None = None,
) -> str:
root = (base_url or "").rstrip("/")
path = embed_path or "/embed"
if not path.startswith("/"):
path = "/" + path
tab_s = "".join(c for c in str(tab or "").strip().lower() if c.isalnum() or c == "_")[
:32
]
if tab_s:
joiner = "&" if "?" in path else "?"
path = f"{path}{joiner}tab={tab_s}"
token = make_sso_token(bridge_token, ttl_sec=ttl_sec)
q = urlencode({"token": token, "next": path})
return f"{root}/hub_sso?{q}"