This commit is contained in:
pengtao 2019-09-24 15:29:54 +08:00
parent 97eb9f75b0
commit 70f4dffc4b

View File

@ -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)