默认新浪行情,普通用户无需同花顺token

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-15 11:16:51 +08:00
parent fb61153a4d
commit 314d3206c0
5 changed files with 51 additions and 50 deletions
+2 -10
View File
@@ -15,7 +15,7 @@ from flask import (
from werkzeug.security import check_password_hash, generate_password_hash
from symbols import search_symbols, ths_to_codes
from market import get_price as market_get_price, set_ths_refresh_token
from market import get_price as market_get_price, set_ths_refresh_token, get_quote_source_label
load_dotenv()
@@ -521,11 +521,6 @@ def settings():
webhook = request.form.get("wechat_webhook", "").strip()
set_setting("wechat_webhook", webhook)
flash("企业微信配置已保存")
elif action == "ths":
token = request.form.get("ths_refresh_token", "").strip()
set_setting("ths_refresh_token", token)
sync_ths_token()
flash("同花顺行情配置已保存")
elif action == "password":
old_p = request.form.get("old_password", "")
new_p = request.form.get("new_password", "")
@@ -543,15 +538,12 @@ def settings():
return redirect(url_for("settings"))
webhook = get_setting("wechat_webhook")
ths_token = get_setting("ths_refresh_token")
username = get_setting("admin_username")
quote_source = os.getenv("QUOTE_SOURCE", "auto")
return render_template(
"settings.html",
webhook=webhook,
ths_token=ths_token,
username=username,
quote_source=quote_source,
quote_label=get_quote_source_label(),
)
# —————————————— 启动 ——————————————