事件中心的涨停原因里面和事件相关
This commit is contained in:
Binary file not shown.
BIN
__pycache__/prediction_api.cpython-310.pyc
Normal file
BIN
__pycache__/prediction_api.cpython-310.pyc
Normal file
Binary file not shown.
23
app.py
23
app.py
@@ -19069,15 +19069,19 @@ def reset_simulation_account():
|
||||
|
||||
|
||||
# ===========================
|
||||
# 预测市场 API 路由
|
||||
# 请将此文件内容插入到 app.py 的 `if __name__ == '__main__':` 之前
|
||||
# 预测市场 API 路由(已抽离到 prediction_api.py)
|
||||
# 以下代码已移动到 prediction_api.py Blueprint 中
|
||||
# ===========================
|
||||
|
||||
'''
|
||||
# --- 以下预测市场 API 已抽离到 prediction_api.py ---
|
||||
# 如需恢复,取消此多行注释
|
||||
|
||||
# --- 积分系统 API ---
|
||||
|
||||
@app.route('/api/prediction/credit/account', methods=['GET'])
|
||||
@login_required
|
||||
def get_credit_account():
|
||||
def get_credit_account_OLD():
|
||||
"""获取用户积分账户"""
|
||||
try:
|
||||
account = UserCreditAccount.query.filter_by(user_id=current_user.id).first()
|
||||
@@ -20270,6 +20274,9 @@ def get_position_bids(topic_id):
|
||||
except Exception as e:
|
||||
return jsonify({'success': False, 'error': str(e)}), 500
|
||||
|
||||
'''
|
||||
# --- 预测市场 API 代码结束 ---
|
||||
|
||||
|
||||
# ==================== 时间胶囊 API ====================
|
||||
|
||||
@@ -20666,6 +20673,16 @@ app.register_blueprint(community_bp)
|
||||
register_community_socketio(socketio)
|
||||
|
||||
|
||||
# ============================================================
|
||||
# 注册预测市场 Blueprint
|
||||
# ============================================================
|
||||
from prediction_api import prediction_bp, init_prediction_api
|
||||
|
||||
# 初始化并注册预测市场 Blueprint
|
||||
init_prediction_api(db, beijing_now)
|
||||
app.register_blueprint(prediction_bp)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# 创建数据库表
|
||||
with app.app_context():
|
||||
|
||||
1229
prediction_api.py
Normal file
1229
prediction_api.py
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user