22 lines
691 B
Python
22 lines
691 B
Python
from flask import Blueprint
|
|
|
|
# 1. 导入子模块蓝图
|
|
# 注意:确保 .buy, .semi, .base 文件在同级目录下真实存在
|
|
from .buy import inbound_buy_bp
|
|
from .semi import inbound_semi_bp
|
|
|
|
# 如果你还有 base.py 文件,就取消注释下面这行
|
|
from .base import inbound_base_bp
|
|
|
|
# 2. 创建父级聚合蓝图
|
|
inbound_bp = Blueprint('inbound', __name__)
|
|
|
|
# 3. 挂载子蓝图
|
|
# 访问地址: /api/v1/inbound/buy/list
|
|
inbound_bp.register_blueprint(inbound_buy_bp, url_prefix='/buy')
|
|
|
|
# 访问地址: /api/v1/inbound/semi/list
|
|
inbound_bp.register_blueprint(inbound_semi_bp, url_prefix='/semi')
|
|
|
|
# 如果有 base
|
|
inbound_bp.register_blueprint(inbound_base_bp, url_prefix='/base') |