add user_online interface
This commit is contained in:
parent
61011ed639
commit
b1e52d7338
18
web.py
18
web.py
@ -51,13 +51,21 @@ class DispatchHandler(tornado.web.RequestHandler):
|
||||
# self._user_online()
|
||||
|
||||
def _user_online(self):
|
||||
post_data = self.request.body_arguments
|
||||
post_data = {x: post_data.get(x)[0].decode("utf-8") for x in post_data.keys()}
|
||||
if not post_data:
|
||||
post_data = self.request.body.decode('utf-8')
|
||||
post_data = json.loads(post_data)
|
||||
# post_data = self.request.body_arguments
|
||||
# print(post_data)
|
||||
# post_data = {x: post_data.get(x)[0].decode("utf-8") for x in post_data.keys()}
|
||||
# if not post_data:
|
||||
# post_data = self.request.body.decode('utf-8')
|
||||
# post_data = json.loads(post_data)
|
||||
# param = self.request.body.decode('utf-8')
|
||||
# prarm = json.loads(param)
|
||||
post_data = {}
|
||||
# zone_id=10000&number=0&sign=de2e4303b3a4154a9a813a44ecd645f5&channel_id=0&game_id=5213
|
||||
post_data['zone_id'] = self.get_query_argument('zone_id')
|
||||
post_data['number'] = self.get_query_argument('number')
|
||||
post_data['channel_id'] = self.get_query_argument('channel_id')
|
||||
post_data['game_id'] = self.get_query_argument('game_id')
|
||||
|
||||
log.info(f"get user_online prarm was {post_data}")
|
||||
aa = OnlineData2mysql(post_data)
|
||||
aa.run()
|
||||
|
Loading…
x
Reference in New Issue
Block a user