生活随笔
收集整理的這篇文章主要介紹了
新版小爱课程表正方教务系统课表适配
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
新版小愛課程表正方教務系統課表適配
前言
之前寫過一篇小愛課程表的教務系統適配,但是是比較老的版本開發者工具適配了,最近看到小愛課程表開發者工具更新了,就想著寫一篇新的博客,順便優化一下之前的代碼,還提供了部分課程實例的一些解析代碼
1.安裝小愛課程表開發者工具
其實安裝這部分并不屬于本篇文章的內容,但是鑒于新版開發者工具提供了更全面的文檔信息,所以把文檔鏈接放在前面,方便讀者去安裝下載開發者工具:
https://open-schedule-prod.ai.xiaomi.com/docs/#/help/
2.文檔分析
安裝好以后,我們打開文檔,閱讀一下導入課表需要的代碼
我們知道,導入課表的代碼分為了3個文件以及他們的作用
于是我們按順序分別開始編輯代碼
(1)provider.js
第一個代碼是提供必要的html,也就是拿到網頁的html后直接return即可,所以我們分析網頁內必要的代碼部分
我們可以看到,正方教務系統的功能區域代碼是基于iframe的,因此我們必要的功能區域代碼也就是id=”iframeautoheight“的部分,所以provider.js代碼如下:
function scheduleHtmlProvider(iframeContent
= "", frameContent
= "", dom
= document
) {return dom
.querySelector('#iframeautoheight').contentWindow
.document
.body
.innerHTML
;
}
(2)parser.js
第二個代碼的功能是返回具體課程內容的,所以對第一個代碼返回過來的html文件進行解析最后生成對應格式返回即可。
下面我們對課表網頁進行分析,課表是用table進行展示的:
下面我們的思路就是對table進行遍歷。通過閱讀文檔,我們知道,parser是提供了Cheerio的,所以我們使用其去解析網頁代碼:
var jsonArray
= [];function scheduleHtmlParser(html) {var $
= cheerio
.load(html
, { decodeEntities
: false });$("#Table6 tr").each(function (i) {if (i
> 1) {$(this).children('td').each(function (j) {if ((i
- 1) == 3 || (i
- 1) == 7) {if (j
> 0) {console
.log("第"+(i
-1)+"節課,周"+(j
)+"課程信息:"+$(this).html());}} else if ((i
- 1) == 1 || (i
- 1) == 5 || (i
- 1) == 9) {if ((j
- 1) > 0) {console
.log("第"+(i
-1)+"節課,周"+(j
-1)+"課程信息:"+$(this).html());}}})}})return jsonArray
;
}
好了,課表解析出來之后,接下來我們測試一下:
輸出結果沒有問題,下面我們分析課程信息。不難看出,每個課程均為4行,分別是課程名、上課周次、教師姓名、上課地點,之間分別有<br>進行分割,如果為多個課程,后面會有<br><br><br>對不同課程進行分割,所以我們只需要通過split()函數對課程信息字符串進行分割即可,所以代碼如下:
function getClass(classHtml, day, section) {var classA
= [];var classs
= classHtml
.split('<br><br><br>');if (classs
.length
>= 1) { for (var i
= 0; i
< classs
.length
; i
++) { if (classs
[i
].indexOf("<br>") != -1) { var classObj
= {};var classsObj
= classs
[i
].split("<br>"); classObj
.name
= classsObj
[0];classObj
.position
= classsObj
[3];classObj
.teacher
= classsObj
[2];classObj
.weeks
= [].concat(getWeeks(classsObj
[1]));classObj
.day
= day
;classObj
.sections
= [];classObj
.sections
.push(section
);classObj
.sections
.push(section
+ 1);classA
.push(classObj
);}}}return classA
;
}
function getWeeks(weeksHtml) {var weeksStr
= weeksHtml
;var weeksA
= [];if (weeksStr
) {var weekArr
= weeksStr
.split(',')if (weekArr
.length
> 2) { for (var j
= 0; j
< weekArr
.length
- 1; j
++) { if (weekArr
[j
].indexOf("單") != -1) { if (weekArr
[j
]) {var weeksA1
= weekArr
[j
].split('-');for (var i
= parseInt(weeksA1
[0]); i
<= parseInt(weeksA1
[1]); i
= i
+ 2) {weeksA
.push(i
);}}}else if (weekArr
[j
].indexOf("雙") != -1) { if (weekArr
[j
]) {var weeksA1
= weekArr
[j
].split('-');for (var i
= parseInt(weeksA1
[0]); i
<= parseInt(weeksA1
[1]); i
= i
+ 2) {weeksA
.push(i
);}}} else {if (weekArr
[j
].indexOf("-") != -1) { if (weekArr
[j
]) {var weeksA1
= weekArr
[j
].split('-');for (var i
= parseInt(weeksA1
[0]); i
<= parseInt(weeksA1
[1]); i
++) {weeksA
.push(parseInt(i
))}}} else {weeksA
.push(parseInt(weekArr
[j
]))}}}} else { if (weeksStr
.indexOf('單') != -1) {if (weeksHtml
) {var weeksA1
= weeksHtml
.split('-');for (var i
= parseInt(weeksA1
[0]); i
<= parseInt(weeksA1
[1]); i
= i
+ 2) {weeksA
.push(i
);}}} else if (weeksStr
.indexOf('雙') != -1) {if (weeksHtml
) {var weeksA1
= weeksHtml
.split('-');for (var i
= parseInt(weeksA1
[0]); i
<= parseInt(weeksA1
[1]); i
= i
+ 2) {weeksA
.push(i
);}}} else {if (weeksStr
.indexOf("-") != -1) { if (weeksHtml
) {var weeksA1
= weeksHtml
.split('-');for (var i
= parseInt(weeksA1
[0]); i
<= parseInt(weeksA1
[1]); i
++) {weeksA
.push(parseInt(i
))}}} else {weeksA
.push(parseInt(weekArr
[0]))}}}}return weeksA
;
}
代碼可能有點多,但都是很基礎的判斷和split()的運用,周次解析沒有簡單的只解析1-18(1,2)這種格式,包括1-2,3-8單,9,10-14雙,15-18(1,2)這種復雜的周次結構也可以解析
所以,上面的代碼拼到一起,就可以得到我們的課程解析的parser.js代碼:
var jsonArray
= [];function scheduleHtmlParser(html) {var $
= cheerio
.load(html
, { decodeEntities
: false });$("#Table6 tr").each(function (i) {if (i
> 1) {$(this).children('td').each(function (j) {if ((i
- 1) == 3 || (i
- 1) == 7) {if (j
> 0) {var classA
= [].concat(getClass($(this).html(), j
, (i
- 1)));for (var k
= 0; k
< classA
.length
; k
++) {jsonArray
.push(classA
[k
]);}}} else if ((i
- 1) == 1 || (i
- 1) == 5 || (i
- 1) == 9) {if ((j
- 1) > 0) {var classA
= [].concat(getClass($(this).html(), (j
- 1), (i
- 1)));for (var k
= 0; k
< classA
.length
; k
++) {jsonArray
.push(classA
[k
]);}}}})}})return jsonArray
;
}
function getClass(classHtml, day, section) {var classA
= [];var classs
= classHtml
.split('<br><br><br>');if (classs
.length
>= 1) { for (var i
= 0; i
< classs
.length
; i
++) { if (classs
[i
].indexOf("<br>") != -1) { var classObj
= {};var classsObj
= classs
[i
].split("<br>"); classObj
.name
= classsObj
[0];classObj
.position
= classsObj
[3];classObj
.teacher
= classsObj
[2];classObj
.weeks
= [].concat(getWeeks(classsObj
[1]));classObj
.day
= day
;classObj
.sections
= [];classObj
.sections
.push(section
);classObj
.sections
.push(section
+ 1);classA
.push(classObj
);}}}return classA
;
}
function getWeeks(weeksHtml) {var weeksStr
= weeksHtml
;var weeksA
= [];if (weeksStr
) {var weekArr
= weeksStr
.split(',')if (weekArr
.length
> 2) { for (var j
= 0; j
< weekArr
.length
- 1; j
++) { if (weekArr
[j
].indexOf("單") != -1) { if (weekArr
[j
]) {var weeksA1
= weekArr
[j
].split('-');for (var i
= parseInt(weeksA1
[0]); i
<= parseInt(weeksA1
[1]); i
= i
+ 2) {weeksA
.push(i
);}}}else if (weekArr
[j
].indexOf("雙") != -1) { if (weekArr
[j
]) {var weeksA1
= weekArr
[j
].split('-');for (var i
= parseInt(weeksA1
[0]); i
<= parseInt(weeksA1
[1]); i
= i
+ 2) {weeksA
.push(i
);}}} else {if (weekArr
[j
].indexOf("-") != -1) { if (weekArr
[j
]) {var weeksA1
= weekArr
[j
].split('-');for (var i
= parseInt(weeksA1
[0]); i
<= parseInt(weeksA1
[1]); i
++) {weeksA
.push(parseInt(i
))}}} else {weeksA
.push(parseInt(weekArr
[j
]))}}}} else { if (weeksStr
.indexOf('單') != -1) {if (weeksHtml
) {var weeksA1
= weeksHtml
.split('-');for (var i
= parseInt(weeksA1
[0]); i
<= parseInt(weeksA1
[1]); i
= i
+ 2) {weeksA
.push(i
);}}} else if (weeksStr
.indexOf('雙') != -1) {if (weeksHtml
) {var weeksA1
= weeksHtml
.split('-');for (var i
= parseInt(weeksA1
[0]); i
<= parseInt(weeksA1
[1]); i
= i
+ 2) {weeksA
.push(i
);}}} else {if (weeksStr
.indexOf("-") != -1) { if (weeksHtml
) {var weeksA1
= weeksHtml
.split('-');for (var i
= parseInt(weeksA1
[0]); i
<= parseInt(weeksA1
[1]); i
++) {weeksA
.push(parseInt(i
))}}} else {weeksA
.push(parseInt(weekArr
[0]))}}}}return weeksA
;
}
(4)timer.js
這個代碼就很好理解了,用來設置課程的時間,總周次的一些信息,所以我們照著文檔提供的代碼修改即可(開學時間為空即可):
async function scheduleTimer({providerRes,parserRes
} = {}) {return {totalWeek
: 20, startSemester
: '', startWithSunday
: false, showWeekend
: true, forenoon
: 4, afternoon
: 4, night
: 2, sections
: [{ section
: 1, startTime
: "08:00", endTime
: "08:50" },{ section
: 2, startTime
: "09:00", endTime
: "9:50" },{ section
: 3, startTime
: "10:10", endTime
: "11:00" },{ section
: 4, startTime
: "11:10", endTime
: "12:00" },{ section
: 5, startTime
: "14:30", endTime
: "15:20" },{ section
: 6, startTime
: "15:30", endTime
: "16:20" },{ section
: 7, startTime
: "16:30", endTime
: "17:20" },{ section
: 8, startTime
: "17:30", endTime
: "18:20" },{ section
: 9, startTime
: "19:30", endTime
: "20:20" },{ section
: 10, startTime
: "20:20", endTime
: "21:30" }], }
}
4.補充代碼
上面我們實現的代碼已經可以滿足正常課表的解析了,這部分主要是提供一些不正常的課程信息的解析方法,最后貼上對應的parser.js的代碼。
(1)專修課
如果出現這種專修科,因為周次一致的緣由,所以筆者的方案是將課程拼接起來
所以我們的課程解析的代碼為:
function getClass(classHtml, day, section) {var classA
= [];var classs
= classHtml
.split('<br><br><br>');if (classs
.length
>= 1) { for (var i
= 0; i
< classs
.length
; i
++) { if (classs
[i
].indexOf("<br>") != -1) { var classObj
= {};var classsObj
= classs
[i
].split("<br>"); if (classs
[1] && classs
[1] != "" && classs
[1] != undefined) { if (classs
[1] && classs
[1] != "" && classs
[0].split("<br>")[1] != classs
[1].split("<br>")[1]) { classObj
.name
= classsObj
[0];classObj
.position
= classsObj
[3];classObj
.teacher
= classsObj
[2];classObj
.weeks
= [].concat(getWeeks(classsObj
[1]));classObj
.day
= day
;classObj
.sections
= [];classObj
.sections
.push(section
);classObj
.sections
.push(section
+ 1);classA
.push(classObj
);} else { if (i
== 0) { classObj
.name
= classsObj
[0];classObj
.position
= classsObj
[3];classObj
.teacher
= classsObj
[2];classObj
.weeks
= [].concat(getWeeks(classsObj
[1]));classObj
.day
= day
;classObj
.sections
= [];classObj
.sections
.push(section
);classObj
.sections
.push(section
+ 1);classA
.push(classObj
);} else if (i
== classs
.length
- 1) { classA
[classA
.length
- 1].name
= classA
[classA
.length
- 1].name
+ "," + classsObj
[0];classA
[classA
.length
- 1].position
= classA
[classA
.length
- 1].position
+ "," + classsObj
[3];classA
[classA
.length
- 1].teacher
= classA
[classA
.length
- 1].teacher
+ "," + classsObj
[2];} else { classA
[classA
.length
- 1].name
= classA
[classA
.length
- 1].name
+ "," + classsObj
[0];classA
[classA
.length
- 1].position
= classA
[classA
.length
- 1].position
+ "," + classsObj
[3];classA
[classA
.length
- 1].teacher
= classA
[classA
.length
- 1].teacher
+ "," + classsObj
[2];}}} else {classObj
.name
= classsObj
[0];classObj
.position
= classsObj
[3];classObj
.teacher
= classsObj
[2];classObj
.weeks
= [].concat(getWeeks(classsObj
[1]));classObj
.day
= day
;classObj
.sections
= [];classObj
.sections
.push(section
);classObj
.sections
.push(section
+ 1);classA
.push(classObj
);}}}}return classA
;
}
(2)學生個人課表
筆者學校教務系統提供了班級課表和學生個人課表兩種課表查詢功能,上面我們僅僅做了班級課表的解析,如果上線到教務系統適配中,同學使用個人課表解析就會出現問題了,所以我們用相同的方法對個人課表進行解析,具體的分析方法同上,這里提供一份完整的解析代碼,讀者可以根據班級課表的解析代碼舉一反三去學習了解一下個人課表的解析代碼:
parser.js
var jsonArray
= [];function scheduleHtmlParser(html) {var $
= cheerio
.load(html
, { decodeEntities
: false });if ($("#Table6").length
> 0) {$("#Table6 tr").each(function (i) {if (i
> 1) {$(this).children('td').each(function (j) {if ((i
- 1) == 3 || (i
- 1) == 7) {if (j
> 0) {var classA
= [].concat(getClass($(this).html(), j
, (i
- 1)));for (var k
= 0; k
< classA
.length
; k
++) {jsonArray
.push(classA
[k
]);}}} else if ((i
- 1) == 1 || (i
- 1) == 5 || (i
- 1) == 9) {if ((j
- 1) > 0) {var classA
= [].concat(getClass($(this).html(), (j
- 1), (i
- 1)));for (var k
= 0; k
< classA
.length
; k
++) {jsonArray
.push(classA
[k
]);}}}})}})}else {$("#Table1 tr").each(function (i) {if (i
> 1) {$(this).children('td').each(function (j) {if ((i
- 1) == 3 || (i
- 1) == 7) {if (j
> 0) {var classA
= [].concat(getClassUser($(this).html(), j
, (i
- 1)));if (classA
.length
=== 1) {jsonArray
.push(classA
[0]);} else if (classA
.length
=== 2) {jsonArray
.push(classA
[0]);jsonArray
.push(classA
[1]);}}} else if ((i
- 1) == 1 || (i
- 1) == 5 || (i
- 1) == 9) {if ((j
- 1) > 0) {var classA
= [].concat(getClassUser($(this).html(), (j
- 1), (i
- 1)));if (classA
.length
=== 1) {jsonArray
.push(classA
[0]);} else if (classA
.length
=== 2) {jsonArray
.push(classA
[0]);jsonArray
.push(classA
[1]);}}}})}})}return jsonArray
;
}
function getClass(classHtml, day, section) {var classA
= [];var classs
= classHtml
.split('<br><br><br>');if (classs
.length
>= 1) { for (var i
= 0; i
< classs
.length
; i
++) { if (classs
[i
].indexOf("<br>") != -1) { var classObj
= {};var classsObj
= classs
[i
].split("<br>"); if (classs
[1] && classs
[1] != "" && classs
[1] != undefined) { if (classs
[1] && classs
[1] != "" && classs
[0].split("<br>")[1] != classs
[1].split("<br>")[1]) { classObj
.name
= classsObj
[0];classObj
.position
= classsObj
[3];classObj
.teacher
= classsObj
[2];classObj
.weeks
= [].concat(getWeeks(classsObj
[1]));classObj
.day
= day
;classObj
.sections
= [];classObj
.sections
.push(section
);classObj
.sections
.push(section
+ 1);classA
.push(classObj
);} else { if (i
== 0) { classObj
.name
= classsObj
[0];classObj
.position
= classsObj
[3];classObj
.teacher
= classsObj
[2];classObj
.weeks
= [].concat(getWeeks(classsObj
[1]));classObj
.day
= day
;classObj
.sections
= [];classObj
.sections
.push(section
);classObj
.sections
.push(section
+ 1);classA
.push(classObj
);} else if (i
== classs
.length
- 1) { classA
[classA
.length
- 1].name
= classA
[classA
.length
- 1].name
+ "," + classsObj
[0];classA
[classA
.length
- 1].position
= classA
[classA
.length
- 1].position
+ "," + classsObj
[3];classA
[classA
.length
- 1].teacher
= classA
[classA
.length
- 1].teacher
+ "," + classsObj
[2];} else { classA
[classA
.length
- 1].name
= classA
[classA
.length
- 1].name
+ "," + classsObj
[0];classA
[classA
.length
- 1].position
= classA
[classA
.length
- 1].position
+ "," + classsObj
[3];classA
[classA
.length
- 1].teacher
= classA
[classA
.length
- 1].teacher
+ "," + classsObj
[2];}}} else {classObj
.name
= classsObj
[0];classObj
.position
= classsObj
[3];classObj
.teacher
= classsObj
[2];classObj
.weeks
= [].concat(getWeeks(classsObj
[1]));classObj
.day
= day
;classObj
.sections
= [];classObj
.sections
.push(section
);classObj
.sections
.push(section
+ 1);classA
.push(classObj
);}}}}return classA
;
}
function getWeeks(weeksHtml) {var weeksStr
= weeksHtml
;var weeksA
= [];if (weeksStr
) {var weekArr
= weeksStr
.split(',')if (weekArr
.length
> 2) { for (var j
= 0; j
< weekArr
.length
- 1; j
++) { if (weekArr
[j
].indexOf("單") != -1) { if (weekArr
[j
]) {var weeksA1
= weekArr
[j
].split('-');for (var i
= parseInt(weeksA1
[0]); i
<= parseInt(weeksA1
[1]); i
= i
+ 2) {weeksA
.push(i
);}}}else if (weekArr
[j
].indexOf("雙") != -1) { if (weekArr
[j
]) {var weeksA1
= weekArr
[j
].split('-');for (var i
= parseInt(weeksA1
[0]); i
<= parseInt(weeksA1
[1]); i
= i
+ 2) {weeksA
.push(i
);}}} else {if (weekArr
[j
].indexOf("-") != -1) { if (weekArr
[j
]) {var weeksA1
= weekArr
[j
].split('-');for (var i
= parseInt(weeksA1
[0]); i
<= parseInt(weeksA1
[1]); i
++) {weeksA
.push(parseInt(i
))}}} else {weeksA
.push(parseInt(weekArr
[j
]))}}}} else { if (weeksStr
.indexOf('單') != -1) {if (weeksHtml
) {var weeksA1
= weeksHtml
.split('-');for (var i
= parseInt(weeksA1
[0]); i
<= parseInt(weeksA1
[1]); i
= i
+ 2) {weeksA
.push(i
);}}} else if (weeksStr
.indexOf('雙') != -1) {if (weeksHtml
) {var weeksA1
= weeksHtml
.split('-');for (var i
= parseInt(weeksA1
[0]); i
<= parseInt(weeksA1
[1]); i
= i
+ 2) {weeksA
.push(i
);}}} else {if (weeksStr
.indexOf("-") != -1) { if (weeksHtml
) {var weeksA1
= weeksHtml
.split('-');for (var i
= parseInt(weeksA1
[0]); i
<= parseInt(weeksA1
[1]); i
++) {weeksA
.push(parseInt(i
))}}} else {weeksA
.push(parseInt(weekArr
[0]))}}}}return weeksA
;
}
function getClassUser(classHtml, day, section) {var classA
= [];var classs
= classHtml
.split('<br>');if (classs
.length
> 1) {if (classs
.length
<= 6) {var classObj
= {};classObj
.name
= classs
[0];classObj
.position
= classs
[3];classObj
.teacher
= classs
[2];classObj
.weeks
= [].concat(getWeeksUser(classs
[1]));classObj
.day
= day
;classObj
.sections
= [];classObj
.sections
.push(section
);classObj
.sections
.push(section
+ 1);classA
.push(classObj
);} else {var classObj
= {};classObj
.name
= classs
[0];classObj
.position
= classs
[3];classObj
.teacher
= classs
[2];classObj
.weeks
= [].concat(getWeeksUser(classs
[1]));classObj
.day
= day
;classObj
.sections
= [];classObj
.sections
.push(section
);classA
.push(classObj
);if (classs
[5].indexOf('調') != -1) {var classObj1
= {};classObj1
.name
= classs
[7];classObj1
.position
= classs
[10];classObj1
.teacher
= classs
[9];classObj1
.weeks
= [].concat(getWeeksUser(classs
[8]));classObj1
.day
= day
;classObj1
.sections
= [];classObj1
.sections
.push(section
+ 1);classA
.push(classObj1
);} else {var classObj1
= {};classObj1
.name
= classs
[5];classObj1
.position
= classs
[8];classObj1
.teacher
= classs
[7];classObj1
.weeks
= [].concat(getWeeksUser(classs
[6]));classObj1
.day
= day
;classObj1
.sections
= [];classObj1
.sections
.push(section
+ 1);classA
.push(classObj1
);}}}return classA
;
}
function getWeeksUser(weeksHtml) {var weeksStr
= weeksHtml
;var weeksA
= [];if (weeksStr
.indexOf('-') != -1) {var weeksA1
= weeksHtml
.split('-');var start
= 0;var end
= 0;if (weeksA1
[0][weeksA1
[0].length
- 2] != '第') {start
= parseInt(weeksA1
[0][weeksA1
[0].length
- 2] + weeksA1
[0][weeksA1
[0].length
- 1])} else {start
= parseInt(weeksA1
[0][weeksA1
[0].length
- 1])}if (weeksA1
[1][1] != '周') {end
= parseInt(weeksA1
[1][0] + weeksA1
[1][1])} else {end
= parseInt(weeksA1
[1][0])}if (weeksStr
.indexOf('單') != -1) {for (var i
= start
; i
<= end
; i
= i
+ 2) {weeksA
.push(i
);}} else if (weeksStr
.indexOf('雙') != -1) {for (var i
= start
; i
<= end
; i
= i
+ 2) {weeksA
.push(i
);}} else {for (var i
= start
; i
<= end
; i
++) {weeksA
.push(parseInt(i
))}}}return weeksA
;
}
(3)多周循環課程
第三種是筆者在給其他學校做課程信息適配時候遇到的一種情況
該課程上課方式為,總周次18周,6周為一循環,每周上課教室不同,所以下面僅提供該種情況的解析代碼
function getClass(classHtml, day, section) {var classA
= [];if (classHtml
) {var classs
= classHtml
.split('<br><br><br>');if (classs
[0] != " ") {if (classHtml
.indexOf("/周") != -1) {for (var j
= 0; j
< (18 / classs
.length
); j
++) { for (var i
= 0; i
< classs
.length
; i
++) {if (classs
[i
]) {var classsObj
= classs
[i
].split("<br>");var classObj
= {};classObj
.name
= classsObj
[0];classObj
.position
= classsObj
[3];classObj
.teacher
= classsObj
[2];var weeksA2
= [];var numWeek
= ((i
+ 1) + (classs
.length
* j
));weeksA2
.push(numWeek
);classObj
.weeks
= weeksA2
;classObj
.day
= day
;classObj
.sections
= [];classObj
.sections
.push(section
);classObj
.sections
.push(section
+ 1);classA
.push(classObj
);}}}} else {for (var i
= 0; i
< classs
.length
; i
++) {if (classs
[i
]) {var classsObj
= classs
[i
].split("<br>");var classObj
= {};classObj
.name
= classsObj
[0];classObj
.position
= classsObj
[3];classObj
.teacher
= classsObj
[2];classObj
.weeks
= [].concat(getWeeks(classsObj
[1]));classObj
.day
= day
;classObj
.sections
= [];classObj
.sections
.push(section
);classObj
.sections
.push(section
+ 1);classA
.push(classObj
);}}}}}return classA
;
}
結尾
到這里文章就算完成了,如果有不懂的地方可以直接聯系我咨詢,最后附上審核通過的截圖:
總結
以上是生活随笔為你收集整理的新版小爱课程表正方教务系统课表适配的全部內容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。