Commit 5b271f93 authored by liujiangnan's avatar liujiangnan

feat

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