Commit 0b839908 by 熊付

【新增登陆注册接口】

1 parent cc1c2b35
......@@ -24,7 +24,9 @@ def dataRecv():
return data
@tx1_box.route('/test', methods=["GET"])
def test():
return "test"
print 'test'
print database.get_value()
return "111"
# 给所有用户发送信息
def send_all_data(sv, data):
if sv.users is not None and len ( sv.users ) > 0:
......
......@@ -6,9 +6,10 @@ import threading
from api.http_serv import tx1_box
from api.task import task
from api.ws_serv import Server
import gbvar.ws_serv_global as sv_global
import gbvar.database_global as database
import gbvar.dict_properties as dict_p
from apps.api.login import login
import apps.gbvar.ws_serv_global as sv_global
import apps.gbvar.database_global as database
import apps.gbvar.dict_properties as dict_p
import fdb
import sys
import os
......@@ -26,6 +27,9 @@ app.register_blueprint(tx1_box, url_prefix='/api/v1/tx1_box')
#注册task路由
app.register_blueprint(task, url_prefix='/api/v1/tx1_box/task')
#注册login路由
app.register_blueprint(login, url_prefix='/api/v1/tx1_box')
@app.route('/', methods=["GET"])
def index():
return flask.send_file ( "dist/index.html" )
......@@ -55,12 +59,12 @@ def init():
database.set_value(cur)
'''newLanguages = [
(1, 'Dylan')
(2, 'Dylan3')
]
cur.executemany ( "insert into tb_traffic(id,name) VALUES(?,?)",
newLanguages
)
con.commit ()
con.commit ()'''
sql_select = 'select * from tb_traffic'
# 显示全部内容
......@@ -68,7 +72,7 @@ def init():
print(cur.fetchall ())
cur.close ()
con.close ()'''
con.close ()
####====================database===================
#启动服务
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!