修改路由
This commit is contained in:
parent
4989bc3b4a
commit
9e0353f586
4
app.py
4
app.py
|
@ -1,12 +1,12 @@
|
|||
from flask import Flask
|
||||
from flask_cors import *
|
||||
|
||||
from routes import server_tyc
|
||||
from routes import tyc
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
app.config['JSON_SORT_KEYS'] = False
|
||||
app.register_blueprint(server_tyc, url_prefix='/server_tyc')
|
||||
app.register_blueprint(tyc, url_prefix='/api/tyc')
|
||||
CORS(app, supports_credentials=True)
|
||||
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@ from flask import Blueprint, request
|
|||
|
||||
from tianyancha_api import save_full_data
|
||||
|
||||
server_tyc = Blueprint('server_tyc', __name__)
|
||||
tyc = Blueprint('tyc', __name__)
|
||||
|
||||
|
||||
# 保存天眼查全量数据
|
||||
@server_tyc.route('/upload_tyc_data', methods=['POST'])
|
||||
@tyc.route('/drag_data', methods=['POST'])
|
||||
def upload_tyc_data():
|
||||
name = request.json['企业名称']
|
||||
res = save_full_data(name)
|
||||
|
|
|
@ -291,8 +291,3 @@ def save_full_data(name):
|
|||
res = financing_history(name)
|
||||
|
||||
return res
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
r = save_full_data('四川麦克福瑞制药有限公司')
|
||||
print(r)
|
Loading…
Reference in New Issue