MCPcopy Create free account
hub / github.com/Xu22Web/tech-study-js / doExamPractice

Function doExamPractice

tech-study.js:3446–3472  ·  view source on GitHub ↗

* @description 每日答题

()

Source from the content-addressed store, hash-verified

3444 * @description 每日答题
3445 */
3446async function doExamPractice() {
3447 // 暂停
3448 await studyPauseLock();
3449 log('正在每日答题...');
3450 // 创建提示
3451 createTip('正在每日答题');
3452 // 链接
3453 const url = URL_CONFIG.examPractice;
3454 // 等待任务窗口
3455 await waitTaskWin(url, '每日答题');
3456 // 创建提示
3457 createTip('完成每日答题!');
3458 // 等待一段时间
3459 await sleep(1500);
3460 // 刷新分数数据
3461 await refreshScoreInfo();
3462 // 刷新任务数据
3463 await refreshTaskList();
3464 // 任务完成状况
3465 if (taskConfig[TaskType.PRACTICE].active &&
3466 !taskConfig[TaskType.PRACTICE].status) {
3467 log('任务未完成, 继续每日答题!');
3468 // 创建提示
3469 createTip('任务未完成, 继续每日答题!');
3470 await doExamPractice();
3471 }
3472}
3473/**
3474 * @description 专项练习
3475 */

Callers 1

studyFunction · 0.70

Calls 7

studyPauseLockFunction · 0.70
logFunction · 0.70
createTipFunction · 0.70
waitTaskWinFunction · 0.70
sleepFunction · 0.70
refreshScoreInfoFunction · 0.70
refreshTaskListFunction · 0.70

Tested by

no test coverage detected