Commit 4d31f8ad authored by 李维's avatar 李维

添加日志

parent b94e5472
......@@ -335,13 +335,16 @@ export abstract class middleLayerBase extends cc.Component {
if (data.rows && data.rows.length > 0) {
this.courses = data.rows;
if (coursewareId) {
console.log("coursewareId", coursewareId);
this.courseIndex = data.rows.findIndex(item => item.id == coursewareId);
} else if(courseIndex != null && !isNaN(Number(courseIndex)) && courseIndex >= 0) {
console.log("courseIndex", courseIndex);
if(courseIndex == 0) {
courseIndex = 1;
}
this.courseIndex = courseIndex;
} else {
console.log(courseId, linkFlag, coursewareId, courseIndex)
this.courseIndex = data.index || 0;
}
this.courseItem = data.rows[this.courseIndex];
......
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