Commit bc1d5ed6 authored by 范雪寒's avatar 范雪寒
parents 11ca860e e8c4241d
......@@ -217,7 +217,6 @@ cc.Class({
this.loadLocalBundle(address, port);
this.showWaitingLetters();
this.hideUI();
exitBtn.active = true;
});
const BtnStartOnline = cc.find('middleLayer/ui/BtnStartOnline');
......@@ -228,18 +227,14 @@ cc.Class({
const bundleName = nameText.getComponent(cc.EditBox).string;
cc.sys.localStorage.setItem('bundleName', bundleName);
this.loadOnlineBundle(bundleName);
exitBtn.active = true;
});
const BtnStartCourseWare = cc.find('middleLayer/ui/BtnStartCourseWare');
BtnStartCourseWare.on('click', () => {
this.showWaitingLetters();
this.hideUI();
const courseIdNode = cc.find('middleLayer/ui/courseId');
const courseId = courseIdNode.getComponent(cc.EditBox).string;
cc.sys.localStorage.setItem('courseId', courseId);
this.loadOnlineCourseWare(courseId);
exitBtn.active = true;
});
const btnClose = cc.find('middleLayer/ConsoleNode/BtnClose');
......@@ -320,6 +315,8 @@ cc.Class({
courseIndex: 0,
courseItem: null,
loadOnlineCourseWare(courseId, linkFlag) {
this.showWaitingLetters();
this.hideUI();
let api = `/api/courseware/v1/${courseId}/list`;
if (linkFlag === true) {
api = `/api/courseware/v1/${courseId}/eq/level/list`;
......@@ -382,7 +379,6 @@ cc.Class({
this.loadBundle(sceneName, version, bondleUrl);
},
loadBundle(sceneName, version, bondleUrl) {
cc.find('middleLayer/ExitBtn').active = true;
cc.assetManager.loadBundle(bondleUrl, { version: version }, async (err, bundle) => {
if (err) {
return this.asyncDelayLog(err);
......
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