From 70f4dffc4b8e3b5dfb67186f315c269f3da8bec1 Mon Sep 17 00:00:00 2001 From: pengtao Date: Tue, 24 Sep 2019 15:29:54 +0800 Subject: [PATCH] fix bug --- ad_interface_tornado.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ad_interface_tornado.py b/ad_interface_tornado.py index 7b2476f..5b72972 100644 --- a/ad_interface_tornado.py +++ b/ad_interface_tornado.py @@ -50,20 +50,19 @@ class DispatchHandler(tornado.web.RequestHandler): | ad_channel | int | 是 | 广告特征码 见上ad_property.jump_param | | adid | int | 是 | 广告ID | """ + pdb.set_trace() try: 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) - print(post_data) - pdb.set_trace() - gameid = self.get_query_argument('gameid') - locationid = self.get_query_argument('locationid') - uid = self.get_query_argument('uid') - ad_channel = self.get_query_argument('ad_channel') - adid = self.get_query_argument('adid') - print(f"gameid={gameid},locationid={locationid},uid={uid},ad_channel={ad_channel},aid={aid}") + gameid = post_data['gameid'] + locationid = post_data['locationid'] + uid = post_data['uid'] + ad_channel = post_data['ad_channel'] + adid = post_data['adid'] + print(f"gameid={gameid},locationid={locationid},uid={uid},ad_channel={ad_channel},adid={adid}") except Exception as e: result = {'errcode': 2, "errmsg": f"get args failed,{str(e)}"} log.error(result)