remotes/test12306/master
wenxianping 7 years ago
parent d7f4850071
commit b8ed4ae732

@ -63,3 +63,8 @@
- 修改无座和硬座的座位号提交是个字符串的问题
- 增加校验下单需要验证码功能
- 增强下单成功判断接口校验
- 2018.1.10 更新
- 优化查票流程
- 修改二等座的余票数返回为字符串的问题
- 优化订单查询bug

@ -42,7 +42,7 @@ class select:
to_station = ticket_info_config["set"]["to_station"].encode("utf8")
station_date = ticket_info_config["set"]["station_date"].encode("utf8")
set_type = ticket_info_config["set"]["set_type"]
is_more_ticket = ticket_info_config["set"]["is_more_ticket"].encode("utf8")
is_more_ticket = ticket_info_config["set"]["is_more_ticket"]
ticke_peoples = ticket_info_config["set"]["ticke_peoples"]
select_refresh_interval = ticket_info_config["select_refresh_interval"]
station_trains = ticket_info_config["set"]["station_trains"]
@ -80,6 +80,9 @@ class select:
def get_set_type(self):
return self.set_type
def conversion_int(self, str):
return int(str)
def station_seat(self, index):
"""
获取车票对应坐席
@ -423,7 +426,8 @@ class select:
if "status" in getQueueCountResult and getQueueCountResult["status"] is True:
if "countT" in getQueueCountResult["data"]:
ticket = getQueueCountResult["data"]["ticket"]
ticket_split = sum(ticket.split(",")) if ticket.find(",") != -1 else ticket
ticket_split = sum(map(self.conversion_int, ticket.split(","))) if ticket.find(",") != -1 else ticket
# ticket_sum = sum([int(ticket_split[0]),int(ticket_split[1])])
# if set_type == "无座": # 修改无座和硬座的座位号提交是个字符串的问题
# ticket = ticket_split[1]
# elif set_type == "硬座":

Loading…
Cancel
Save