-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathstarts.py
63 lines (42 loc) · 1.29 KB
/
starts.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# -*- coding: utf-8 -*-
##############################################################################
# Copyright (c) wxmall.janedao.cn
# Author:QQ173782910
#QQ group:528289471
##############################################################################
"""start.py"""
import os
import sys
from imp import reload
from flask import Flask, request
from flask_cors import CORS
reload(sys)
path = os.path.dirname(os.path.realpath(__file__))
sys.path.append(path)
sys.stdout = sys.stderr
from basic import publicw
reload(publicw)
ROOT = publicw.ROOT
showsingle,showsapi,showsPay=publicw.showsingle,publicw.showsapi,publicw.showsPay#个人商城
showupload = publicw.showupload
sys.path.append(ROOT)
app=Flask(__name__)
app.config.from_object(__name__)
app.secret_key = 'A0Zr98j/3yX R~XHH!jmN]LWX/,?RTYj'
CORS(app)
@app.route('/', methods=['GET', 'POST'])
@app.route('/single' , methods=['GET', 'POST'])
def single():
return showsingle(request)
@app.route('/sapi', methods=['GET','POST'])
def sapi():
return showsapi(request)
@app.route('/spay/notify', methods=['GET','POST'])
def spay():
return showsPay(request)
@app.route('/upload' , methods=['GET', 'POST'])
def upload():
return showupload(request)
if __name__ == '__main__':
app.run(host='127.0.0.1', port=5000)
application=app