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

Function doExamPaper

tech-study.js:3476–3502  ·  view source on GitHub ↗

* @description 专项练习

()

Source from the content-addressed store, hash-verified

3474 * @description 专项练习
3475 */
3476async function doExamPaper() {
3477 running.value = true;
3478 log('正在专项练习...');
3479 // 创建提示
3480 createTip('正在专项练习');
3481 // id
3482 const examPaperId = await findExamPaper();
3483 if (examPaperId) {
3484 // 链接
3485 const url = `${URL_CONFIG.examPaper}?id=${examPaperId}`;
3486 log(`链接: ${url}`);
3487 // 等待窗口任务
3488 await waitTaskWin(url, '专项练习');
3489 // 创建提示
3490 createTip('完成专项练习!');
3491 running.value = false;
3492 // 同屏任务
3493 if (settings[SettingType.SAME_TAB]) {
3494 // 窗口不存在
3495 frame.exist = false;
3496 }
3497 return;
3498 }
3499 running.value = false;
3500 // 创建提示
3501 createTip('专项练习均已完成!');
3502}
3503/**
3504 * @description 初始化总页数属性
3505 */

Callers

nothing calls this directly

Calls 4

logFunction · 0.70
createTipFunction · 0.70
findExamPaperFunction · 0.70
waitTaskWinFunction · 0.70

Tested by

no test coverage detected