nothing
This commit is contained in:
parent
9f27ebdea1
commit
a382fda9a1
Binary file not shown.
7
api_auth.py
Normal file
7
api_auth.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
from apis import api_auth
|
||||||
|
|
||||||
|
|
||||||
|
@api_auth.route('/login', methods=['POST'])
|
||||||
|
def get_info():
|
||||||
|
print("登录请求")
|
||||||
|
return None
|
18
app.py
18
app.py
@ -8,15 +8,24 @@ app = Flask(__name__)
|
|||||||
|
|
||||||
|
|
||||||
# 注册蓝图
|
# 注册蓝图
|
||||||
app.register_blueprint(api_system, url_prefix='/system')
|
app.register_blueprint(api_system, url_prefix='/api/system')
|
||||||
app.register_blueprint(api_auth, url_prefix='/auth')
|
app.register_blueprint(api_auth, url_prefix='/api/auth')
|
||||||
app.register_blueprint(api_user, url_prefix='/api/user')
|
app.register_blueprint(api_user, url_prefix='/api/user')
|
||||||
app.register_blueprint(api_other, url_prefix='/other')
|
app.register_blueprint(api_other, url_prefix='/api/other')
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
# 配置日志记录
|
# 配置日志记录
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
|
|
||||||
|
# @app.route("/api/user/info")
|
||||||
|
# def test():
|
||||||
|
# print("收到用户信息请求!")
|
||||||
|
# return "test"
|
||||||
|
# @app.route("/api/auth/login")
|
||||||
|
# def test2():
|
||||||
|
# print("收到登录请求!")
|
||||||
|
# return "test"
|
||||||
|
|
||||||
@app.errorhandler(404)
|
@app.errorhandler(404)
|
||||||
def page_not_found(e):
|
def page_not_found(e):
|
||||||
logging.error(f"404 Error: {e}")
|
logging.error(f"404 Error: {e}")
|
||||||
@ -27,4 +36,5 @@ def internal_server_error(e):
|
|||||||
logging.error(f"Internal Server Error: {e}", exc_info=True)
|
logging.error(f"Internal Server Error: {e}", exc_info=True)
|
||||||
return jsonify(use_response_error("Internal Server Error", str(e))), 500
|
return jsonify(use_response_error("Internal Server Error", str(e))), 500
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run(host="0.0.0.0",port=5566,debug=True)
|
print("原神 启动!")
|
||||||
|
app.run(host="0.0.0.0",port=10300,debug=True)
|
Loading…
Reference in New Issue
Block a user