add index function

This commit is contained in:
Sylar012 2018-02-12 23:02:47 +08:00 committed by GitHub
parent eaa2c74c6a
commit 3354536919
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@ with open("WEB_setting.json") as f:
# 创建Flask对象
from flask import Flask
from flask import Flask, send_file
from flask.ext.restful import Api, Resource, reqparse
from flask.ext.socketio import SocketIO
from flask_cors import *
@ -594,6 +594,12 @@ class CtaStrategyVar(Resource):
return {'result_code':'success','data':l}
########################################################################
@app.route('/')
def index_html():
"""首页"""
return send_file( os.path.abspath('.') + '/web/index.html' )
# 注册资源
api.add_resource(Token, '/token')
api.add_resource(Gateway, '/gateway')