更新edu页面
This commit is contained in:
parent
4b3701dce2
commit
6fe46f9adb
@ -291,8 +291,12 @@
|
|||||||
'Biology Modules':'生物学课程',
|
'Biology Modules':'生物学课程',
|
||||||
'Introduction to Biochemistry':'生物化学概论',
|
'Introduction to Biochemistry':'生物化学概论',
|
||||||
'You do not meet the requirements for this course. Please complete the prerequisites first.':
|
'You do not meet the requirements for this course. Please complete the prerequisites first.':
|
||||||
'你不符合本课程的要求。请先学习前置课程。',
|
'你不符合本课程的要求。请先学习前置课程。',
|
||||||
}
|
'Description:':'描述:',
|
||||||
|
'Learning outcomes:':'学习后可获得:',
|
||||||
|
'Prerequisites:':'前置要求',
|
||||||
|
'Parameters:':'课程参数',
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -583,7 +587,8 @@
|
|||||||
$('button[class^="button"]').each((i,e)=>{
|
$('button[class^="button"]').each((i,e)=>{
|
||||||
if (gymDict[$(e).text().trim()])
|
if (gymDict[$(e).text().trim()])
|
||||||
$(e).text(gymDict[$(e).text().trim()]);
|
$(e).text(gymDict[$(e).text().trim()]);
|
||||||
});// cancel按钮
|
});
|
||||||
|
// cancel按钮
|
||||||
$('button[class^="cancel"]').each((i,e)=>{
|
$('button[class^="cancel"]').each((i,e)=>{
|
||||||
if (gymDict[$(e).text().trim()])
|
if (gymDict[$(e).text().trim()])
|
||||||
$(e).text(gymDict[$(e).text().trim()]);
|
$(e).text(gymDict[$(e).text().trim()]);
|
||||||
@ -647,7 +652,7 @@
|
|||||||
titleTrans();
|
titleTrans();
|
||||||
contentTitleLinksTrans();
|
contentTitleLinksTrans();
|
||||||
|
|
||||||
// 学院标题
|
// 大科目、学院标题
|
||||||
$('div.content-wrapper div.title').each((i,e)=>{
|
$('div.content-wrapper div.title').each((i,e)=>{
|
||||||
if(eduDict[$(e).text().trim()])
|
if(eduDict[$(e).text().trim()])
|
||||||
e.firstChild.nodeValue=eduDict[$(e).text().trim()];
|
e.firstChild.nodeValue=eduDict[$(e).text().trim()];
|
||||||
@ -665,19 +670,44 @@
|
|||||||
if(eduDict[$(e).text().trim()])
|
if(eduDict[$(e).text().trim()])
|
||||||
$(e).text(eduDict[$(e).text().trim()]);
|
$(e).text(eduDict[$(e).text().trim()]);
|
||||||
});
|
});
|
||||||
|
// 课程详情 7 标题
|
||||||
|
$('div.module-desc p.title').each((i,e)=>{
|
||||||
|
if(eduDict[$(e).text().trim()])
|
||||||
|
$(e).text(eduDict[$(e).text().trim()]);
|
||||||
|
});
|
||||||
// 学院详情 小课程提示信息
|
// 学院详情 小课程提示信息
|
||||||
$('div.content-wrapper div.msg-cont div').each((i,e)=>{
|
$('div.content-wrapper div.msg-cont div').each((i,e)=>{
|
||||||
if(eduDict[$(e).text().trim()])
|
if(eduDict[$(e).text().trim()])
|
||||||
$(e).text(eduDict[$(e).text().trim()]);
|
$(e).text(eduDict[$(e).text().trim()]);
|
||||||
});
|
});
|
||||||
// Parameters 3行介绍
|
// 课程介绍中的所有li元素
|
||||||
$('div.parameters ul.info').each((i,e)=>{
|
$('div.parameters ul.info li').each((i,e)=>{
|
||||||
const spl=$(e).text().trim().split(' ');
|
if(e.childNodes.length===1) {
|
||||||
switch (spl[0]){
|
const spl = $(e).text().trim().split(' ');
|
||||||
case 'Length:':
|
switch (spl[0]) {
|
||||||
const date=new Date(spl.slice(1).join(''));
|
case 'Length:': {//Length
|
||||||
console.log(date);
|
const d = spl[1].slice(0, -1);
|
||||||
break;
|
const h = spl[2].slice(0, -1);
|
||||||
|
const m = spl[3].slice(0, -1);
|
||||||
|
$(e).text('时长:' + d + '天' + h + '时' + m + '分');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
case 'Cost:': {//Cost
|
||||||
|
$(e).text('费用:' + spl[1]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
case 'Tier:': {//Tier
|
||||||
|
$(e).text('级别:' + spl[1]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
case 'Gain': {//gain
|
||||||
|
//$(e).text('级别:' + spl[1]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
console.log(e.children)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user