* 2025-9月份教学空间-AI智慧学习页面,新系统
| 525 | * 2025-9月份教学空间-AI智慧学习页面,新系统 |
| 526 | */ |
| 527 | class Hike extends StudyVideoH5 implements ZHSProcessor { |
| 528 | getCourseName() { |
| 529 | return '无名称'; |
| 530 | } |
| 531 | |
| 532 | getChapterName(item: HTMLElement): string { |
| 533 | return item.textContent || '未知章节'; |
| 534 | } |
| 535 | |
| 536 | hasJob() { |
| 537 | return document.querySelectorAll('.source-icon')?.length > 0; |
| 538 | } |
| 539 | |
| 540 | getNext(opts: { next: boolean; restudy: boolean }) { |
| 541 | let jobs = Array.from(document.querySelectorAll<HTMLElement>('.source-icon')).map( |
| 542 | (el) => el.parentElement?.parentElement as HTMLElement |
| 543 | ); |
| 544 | console.log(jobs); |
| 545 | // 如果不是复习模式,则排除掉已经完成的任务 |
| 546 | if (!opts.restudy) { |
| 547 | jobs = jobs.filter((el) => { |
| 548 | if (el.querySelector('i.select')) { |
| 549 | return false; |
| 550 | } |
| 551 | return true; |
| 552 | }); |
| 553 | } |
| 554 | |
| 555 | for (let i = 0; i < jobs.length; i++) { |
| 556 | const item = jobs[i]; |
| 557 | if (item.querySelector('.active-file')) { |
| 558 | return jobs[i + (opts.next ? 1 : 0)]; |
| 559 | } |
| 560 | } |
| 561 | return jobs[0]; |
| 562 | } |
| 563 | |
| 564 | hideDialog() { |
| 565 | /** 隐藏通知弹窗 */ |
| 566 | $$el('.el-overlay,.el-dialog').forEach((dialog) => { |
| 567 | dialog.style.display = 'none'; |
| 568 | }); |
| 569 | } |
| 570 | } |
| 571 | |
| 572 | class HikeV2 extends StudyVideoH5 implements ZHSProcessor { |
| 573 | getCourseName() { |
nothing calls this directly
no outgoing calls
no test coverage detected