Merge remote-tracking branch 'origin/master'

This commit is contained in:
qwerdvd 2023-06-19 19:39:37 +08:00
commit 0a8c4b9e50
2 changed files with 7 additions and 3 deletions

View File

@ -121,6 +121,7 @@ class RogueData(TypedDict):
role: RoleInfo role: RoleInfo
basic_info: RogueBasicInfo basic_info: RogueBasicInfo
current_record: RogueRecord current_record: RogueRecord
last_record: RogueRecord
################ ################

View File

@ -195,7 +195,7 @@ async def draw_rogue_img(
qid: Union[str, int], qid: Union[str, int],
uid: str, uid: str,
floor: Optional[int] = None, floor: Optional[int] = None,
schedule_type: str = '1', schedule_type: str = '3',
) -> Union[bytes, str]: ) -> Union[bytes, str]:
# 获取Cookies # 获取Cookies
data = GsCookie() data = GsCookie()
@ -203,7 +203,7 @@ async def draw_rogue_img(
# if retcode: # if retcode:
# return retcode # return retcode
# raw_data = data.raw_data # raw_data = data.raw_data
raw_rogue_data = await data.get_rogue_data(uid, schedule_type) raw_rogue_data = await data.get_rogue_data(uid, '3')
# print(raw_rogue_data) # print(raw_rogue_data)
if isinstance(raw_rogue_data, int): if isinstance(raw_rogue_data, int):
@ -217,7 +217,10 @@ async def draw_rogue_img(
# char_temp = {} # char_temp = {}
# 计算背景图尺寸 # 计算背景图尺寸
rogue_detail = raw_rogue_data['current_record']['records'] if schedule_type == '3':
rogue_detail = raw_rogue_data['current_record']['records']
else:
rogue_detail = raw_rogue_data['last_record']['records']
# 记录打的宇宙列表 # 记录打的宇宙列表
detail_list = [] detail_list = []