Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit 0406c14

Browse files
committed
fix: 修复批量完成作业功能
1 parent a210a71 commit 0406c14

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

my_xxt/my_tools.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ def select_menu(console: Console, xxt: NewXxt) -> None:
207207
fail_count = 0
208208
for user in users_select:
209209
i = i + 1
210+
xxt = NewXxt()
210211
login_status = xxt.login(user["phone"], user["password"])
211212
# 判断登录成功与否
212213
if login_status["status"] == True:
@@ -236,7 +237,7 @@ def select_menu(console: Console, xxt: NewXxt) -> None:
236237
else:
237238
dir_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
238239
path = os.path.join(dir_path, "answers", f"{work['id']}.json")
239-
answer = match_answer(jsonFileToDate(path)[work["id"]], questions)
240+
answer = match_answer(jsonFileToDate(path)[work["id"]], questions, xxt.randomOptions)
240241
ret = xxt.commit_work(answer, work)
241242
# 作业提交成功
242243
if ret["msg"] == 'success!':

0 commit comments

Comments
 (0)