-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathstartm.py
61 lines (42 loc) · 1.34 KB
/
startm.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
# -*- 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
showmanage,showmapi,showmPay=publicw.showmanage,publicw.showmapi,publicw.showmPay#btbtc平台
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('/manage' , methods=['GET', 'POST'])
def manage():
return showmanage(request)
@app.route('/mapi/<int:mallid>', methods=['GET','POST'])
def mapi(mallid):
return showmapi(request,mallid)
@app.route('/mpay/<int:mallid>/notify', methods=['GET','POST'])
def mpay(mallid):
return showmPay(request,mallid)
@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