Commit 5214a8c1 authored by huoshizhe's avatar huoshizhe

feat:

parent 8fa2a033
...@@ -237,9 +237,16 @@ cc.Class({ ...@@ -237,9 +237,16 @@ cc.Class({
this.hideAllSubmenu(); this.hideAllSubmenu();
btn.active = false; btn.active = false;
btnSelected.active = true; btnSelected.active = true;
label.active = false; label.active = false;
labelSelected.active = true; labelSelected.active = true;
if (!data.children[0]) {
console.error('沒有課件!');
return;
}
this.syllabus_id = data.children[0].id;
this.loadBundleByConf(data.children[0].conf);
} else { } else {
this.hideAllSubmenu(); this.hideAllSubmenu();
menuBase.active = true; menuBase.active = true;
...@@ -276,9 +283,6 @@ cc.Class({ ...@@ -276,9 +283,6 @@ cc.Class({
btnSelected.addComponent(cc.Button) btnSelected.addComponent(cc.Button)
btnSelected.on('click', () => { btnSelected.on('click', () => {
this.hideMenu(); this.hideMenu();
this.syllabus_id = data.children[0].id;
this.loadBundleByConf(data.children[0].conf);
}); });
if (data.has_child == '1') { if (data.has_child == '1') {
......
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