Update main.py

This commit is contained in:
RainSun 2021-09-25 09:46:48 +00:00
parent 0e4b5e6fba
commit 2c79db3fdd

View File

@ -7,6 +7,11 @@ from allFunction import flash, delQR, addQR, genQR, manageLogin
app = Flask(__name__)
# 引入跨域访问处理模块
from flask_cors import CORS
# 取消跨域访问限制,方便本地测试 注册CORS, "/*" 允许访问所有api
CORS(app, resources=r'/*')
# 用户小程序登录
@app.route('/login',methods=['POST'])
def login():