fix: 登录冷却期间不再显示 CTP 连接中,优化前端状态同步
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1549,6 +1549,14 @@ def install_trading(app, *, login_required, require_nav, get_db, get_setting, se
|
||||
"status": st,
|
||||
"account": acc,
|
||||
})
|
||||
if info.get("cooldown"):
|
||||
return jsonify({
|
||||
"ok": False,
|
||||
"cooldown": True,
|
||||
"error": st.get("last_error") or "CTP 登录冷却中",
|
||||
"status": st,
|
||||
"account": acc,
|
||||
}), 400
|
||||
return jsonify({
|
||||
"ok": False,
|
||||
"error": st.get("last_error") or "CTP 连接未启动",
|
||||
|
||||
Reference in New Issue
Block a user