Initial commit of secondary development sample code

This commit is contained in:
2026-01-19 10:39:22 +08:00
commit c2697affd9
66 changed files with 17277 additions and 0 deletions

View File

@ -0,0 +1,23 @@
import os
import sys
from flask import Flask
CURRENT_PATH = os.path.dirname(os.path.realpath(__file__))
sys.path.append(CURRENT_PATH)
url_prefix = '/'
from app import vlreview
def create_app():
# 初始化Flask对象
app_ = Flask(__name__)
# 注册蓝图
app_.register_blueprint(vlreview.bp)
return app_
app = create_app()

View File

@ -0,0 +1,15 @@
import base64
import json
from flask import Blueprint, request
from app import url_prefix
bp = Blueprint('vlreview', __name__, url_prefix=url_prefix)
@bp.route('vlreview', methods=['POST'])
def post_alert():
data = json.loads(request.get_data().decode('utf-8'))
print(data)
return data