Commit 5b271f93 authored by liujiangnan's avatar liujiangnan

feat

parent 02578590
......@@ -153,14 +153,14 @@ export default class NewClass extends middleLayerBase {
if (this.courseIndex == 0) {
cc.find('middleLayer/BtnLeft').active = false;
} else {
cc.find('middleLayer/BtnLeft').active = false;
cc.find('middleLayer/BtnLeft').active = true;
}
if (this.courseIndex == this.courses.length - 1) {
cc.find('middleLayer/BtnRight').active = false;
} else {
cc.find('middleLayer/BtnRight').active = true;
}
});
}, 0.7);
buttonOnClick(cc.find('middleLayer/BtnLeft'), () => {
if (this.isShowWaiting) {
......@@ -170,14 +170,14 @@ export default class NewClass extends middleLayerBase {
if (this.courseIndex == 0) {
cc.find('middleLayer/BtnLeft').active = false;
} else {
cc.find('middleLayer/BtnLeft').active = false;
cc.find('middleLayer/BtnLeft').active = true;
}
if (this.courseIndex == this.courses.length - 1) {
cc.find('middleLayer/BtnRight').active = false;
} else {
cc.find('middleLayer/BtnRight').active = true;
}
});
}, 0.7);
buttonOnClick(cc.find('middleLayer/activeLayer/active'), async () => {
if (this.isShowWaiting) {
......
......@@ -239,6 +239,12 @@ export abstract class middleLayerBase extends cc.Component {
this.courses = data.rows;
this.courseIndex = data.index || 0;
this.courseItem = data.rows[this.courseIndex];
console.log('-----------------');
console.log("jfdlisjlfiasjdjl");
console.log('-----------------');
cc.find('middleLayer/Page').active = true;
cc.find(`middleLayer/Page`).getComponent(cc.Label).string = `1/${this.courses.length}`;
} else {
this.hideWaitingLetters();
this.showTips(`内容还未制作`);
......@@ -293,6 +299,7 @@ export abstract class middleLayerBase extends cc.Component {
(<any>window).courseware.freeAllOcMethod();
cc.find(`middleLayer/Page`).getComponent(cc.Label).string = `${index + 1}/${this.courses.length}`;
this.courseIndex = index;
this.courseItem = this.courses[this.courseIndex];
this.loadPageBundle();
......
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