├── app.js └── README.md /app.js: -------------------------------------------------------------------------------- 1 | var Evaluater = class { 2 | constructor(params) { 3 | this.mainWindow = document.querySelector('#WindowMain8'); 4 | this.WindowFrame = this.mainWindow.querySelector('#WindowFrame8').contentDocument.childNodes[1]; 5 | this.ansDiv = this.WindowFrame.querySelectorAll('.answerDiv'); 6 | this.submitBtn = this.WindowFrame.querySelector('#r_content>.b_content>.tb_cont>.frame-table>tbody>tr:nth-child(2) input:nth-child(1)'); 7 | this.select(); 8 | this.stuff(); 9 | this.submit(); 10 | } 11 | 12 | select() { 13 | for (let i = 0; i < this.ansDiv.length - 2; i++) { 14 | this.ansDiv[i].childNodes[1].childNodes[3].click(); 15 | } 16 | } 17 | 18 | stuff() { 19 | this.text1 = this.WindowFrame.querySelector('#answerDiv16 textarea'); 20 | this.text2 = this.WindowFrame.querySelector('#answerDiv17 textarea'); 21 | this.text1.innerText = '都很满意'; 22 | this.text2.innerText = '暂时没有'; 23 | this.text1.value = this.text1.innerText; 24 | this.text2.value = this.text2.innerText; 25 | } 26 | 27 | submit() { 28 | let tick = 62; 29 | console.log(`由于必须填写一分钟以上,${tick} 秒后将自动提交,请耐心等待~`); 30 | this.infoInterval = setInterval(() => { 31 | tick--; 32 | console.log(`由于必须填写一分钟以上,${tick} 秒后将自动提交,请耐心等待~`); 33 | }, 1000); 34 | setTimeout(() => { 35 | clearInterval(this.infoInterval); 36 | this.submitBtn.click(); 37 | }, 62000); 38 | } 39 | } 40 | 41 | var myEvaluater = new Evaluater(); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 教务网课程评价半自动填写脚本(测试版) 2 | 3 | 由于兼容性问题,请使用Chrome或谷歌系浏览器如360极速、搜狗浏览器等,切勿使用IE ; 4 | 虽然还需要一定手工操作,但是比全手动方便多了,不是吗; 5 | 目前测试成功的浏览器:最新版本的Chrome和Edge; 6 | 7 | # 使用步骤 8 | 9 | **重要**!:请从**课程评价**进入,不要从**成绩与排名**进入~ 10 | 11 | ![课程评价图标.png](https://upload-images.jianshu.io/upload_images/20153052-eeb69cbe049dceeb.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 12 | 13 | 14 | ## 登录教务网,点击课程评价,选择一门你要填写的课程,进入到如下所示的页面 15 | 16 | ![TIM图片20191125185154.png](https://upload-images.jianshu.io/upload_images/20153052-5582ea0dcde982cf.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 17 | 18 | 19 | ## 按下键盘上的F12 ,弹出控制台,点击Console 20 | 21 | ![Console截图.png](https://upload-images.jianshu.io/upload_images/20153052-8332f4078ca512eb.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 22 | 23 | 24 | ## 将下面的代码复制粘贴到上图所示区域,按下回车即可 25 | 26 | 由于教务网要求每份问卷至少填写一分钟,请喝口茶耐心等待,这门课程填写完毕后,再用相同操作填写其他课程即可~ 27 | 28 | 经过测试,有的电脑能够正常运行而有的电脑会报错,如遇问题请联系哦~ 29 | ```javascript 30 | new class { 31 | constructor(params) { 32 | this.mainWindow = document.querySelector('#WindowMain8'); 33 | this.WindowFrame = this.mainWindow.querySelector('#WindowFrame8').contentDocument.childNodes[1]; 34 | this.ansDiv = this.WindowFrame.querySelectorAll('.answerDiv'); 35 | this.submitBtn = this.WindowFrame.querySelector('#r_content>.b_content>.tb_cont>.frame-table>tbody>tr:nth-child(2) input:nth-child(1)'); 36 | this.select(); 37 | this.stuff(); 38 | this.submit(); 39 | } 40 | 41 | select() { 42 | for (let i = 0; i < this.ansDiv.length - 2; i++) { 43 | this.ansDiv[i].childNodes[1].childNodes[3].click(); 44 | } 45 | } 46 | 47 | stuff() { 48 | this.text1 = this.WindowFrame.querySelector('#answerDiv16 textarea'); 49 | this.text2 = this.WindowFrame.querySelector('#answerDiv17 textarea'); 50 | this.text1.innerText = '都很满意'; 51 | this.text2.innerText = '暂时没有'; 52 | this.text1.value = this.text1.innerText; 53 | this.text2.value = this.text2.innerText; 54 | } 55 | 56 | submit() { 57 | let tick = 15; 58 | console.log(`由于必须填写一分钟以上,${tick} 秒后将自动提交,请耐心等待~`); 59 | this.infoInterval = setInterval(() => { 60 | tick--; 61 | console.log(`由于必须填写一分钟以上,${tick} 秒后将自动提交,请耐心等待~`); 62 | }, 1000); 63 | setTimeout(() => { 64 | clearInterval(this.infoInterval); 65 | this.submitBtn.click(); 66 | }, tick * 1000); 67 | } 68 | } 69 | ``` 70 | --------------------------------------------------------------------------------