feat条件单候选展示交易户资金,并支持打开实例划转。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user