Commit 9e74697b authored by limingzhe's avatar limingzhe

fix: debug

parent 070dcf63
......@@ -10,6 +10,11 @@ export default class NewClass extends middleLayerBase {
token;
course_id;
courseware_id;
JRZY_ID = -1; //今日作业
JRSX_ID = -2; //今日所学
// 统一释放异步资源的方法
async onLoad() {
initAir(this);
......@@ -44,6 +49,14 @@ export default class NewClass extends middleLayerBase {
this.token = bundleInfo.token;
this.course_id = bundleInfo.course_id;
this.courseware_id = bundleInfo.courseware_id;
// 打开特殊课件
if (this.course_id < 1) {
this.openCustomTemplate();
return;
}
if (!bundleInfo.course_id || !bundleInfo.courseware_id) {
console.error("缺少必要的参数!请检查是否传入了以下参数:course_id,courseware_id,toke");
return;
......@@ -54,6 +67,21 @@ export default class NewClass extends middleLayerBase {
}
openCustomTemplate() {
//打开今日作业
if (this.course_id == this.JRZY_ID) {
this.loadOnlineBundle("JJ_page_homework");
return;
}
// 打开今日所学
if (this.course_id == this.JRSX_ID) {
this.loadOnlineBundle("JJ_page_learn");
return;
}
}
initUI() {
this.showBackBtn();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment