首页页面

This commit is contained in:
zhaofang
2022-09-25 18:50:47 +08:00
parent fb32fdf509
commit 14f7157caf
12 changed files with 730 additions and 421 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -196,9 +196,9 @@ export default {
let outerHeight = document.documentElement.clientHeight
let scrollTop = document.documentElement.scrollTop
if(scrollTop > 400) {
document.querySelector('#article-detail').style.cssText = "position: fixed;top: 0;width:242.5px";
document.querySelector('#articleAnking').style.cssText = "position: fixed;top: 0;width:242.5px";
} else {
document.querySelector('#article-detail').style.cssText = "position: static";
document.querySelector('#articleAnking').style.cssText = "position: static";
}
},
saveSuccess(data){

View File

@@ -412,7 +412,7 @@ export default {
}
if(scrollTop > 630) {
this.isTopBoxShow = true;
document.querySelector('#fixd-box').style.cssText = "position: fixed;top: -250px;width:245.5px";
document.querySelector('#fixd-box').style.cssText = "position: fixed;top: -4420px;width:245.5px";
} else {
document.querySelector('#fixd-box').style.cssText = "position: static";
}

View File

@@ -512,7 +512,7 @@ export default {
}
if (scrollTop > 630) {
document.querySelector("#fixd-box").style.cssText =
"position: fixed;top: -250px;width:410px";
"position: fixed;top: -442px;width:410px";
} else {
document.querySelector("#fixd-box").style.cssText = "position: static";
}

View File

@@ -466,7 +466,7 @@ export default {
}
if (scrollTop > 830) {
document.querySelector("#fixd-box").style.cssText =
"position: fixed;top: -830px;width:242.5px";
"position: fixed;top: -914px;width:242.5px";
} else {
document.querySelector("#fixd-box").style.cssText = "position: static";
}
@@ -859,7 +859,7 @@ export default {
position: relative;
}
::v-deep .course-image-box :hover .el-image{
transition: all 0.5s;
// transition: all 0.5s;
z-index: 999;
position: absolute;
top: -50px;

View File

@@ -273,7 +273,7 @@ export default {
}
}
if(scrollTop > 400) {
document.querySelector('#qa-fixd').style.cssText = "position: fixed;top: 20px;width:410px;";
document.querySelector('#qa-fixd').style.cssText = "position: fixed;top: 0px;width:410px;";
} else {
document.querySelector('#qa-fixd').style.cssText = "position: static";
}

View File

@@ -770,7 +770,8 @@ export default {
apiCoursePortal.detail(this.courseId,false).then(rs => {
if (rs.status == 200) {
//设置必须的字段
rs.result.sections.forEach(sec => {
if(rs.result.course.type == 20) {
rs.result.sections.forEach(sec => {
sec.status = 0; //加入状态表未开始
rs.result.contents.forEach(c => {
c.status = 0; //初始化状态 ,未开始
@@ -779,6 +780,7 @@ export default {
});
});
this.sectionList = rs.result.sections;
}
this.courseInfo = rs.result.course;
this.teachers = rs.result.teachers;
if (rs.result.teachers && rs.result.teachers.length > 0) {
@@ -836,24 +838,26 @@ export default {
}
});
});
//如果没有,就定位第一项内容
if (playIndex === -1) {
// this.showRes(this.contentList[0]);
this.showRes(this.catalogTree[0].children[0])
} else {
this.showRes(this.contentList[playIndex]);
}
if(this.courseInfo.type == 10) {
this.showRes(this.contentList[0]);
} else {
//如果没有,就定位第一项内容
if (playIndex === -1) {
// this.showRes(this.contentList[0]);
this.showRes(this.catalogTree[0].children[0])
} else {
this.showRes(this.contentList[playIndex]);
}
}
} else {
this.$message.error('您还未报名');
if (this.courseInfo.type == 10) {
location.href = this.webBaseUrl + '/course/micro?id=' + this.courseId;
} else {
// if (this.courseInfo.type == 10) {
// location.href = this.webBaseUrl + '/course/micro?id=' + this.courseId;
// } else {
location.href = this.webBaseUrl + '/course/detail?id=' + this.courseId;
}
// }
}
} else {
this.$message.error(res.message);

View File

@@ -80,7 +80,9 @@
</div>
</div>
</div>
<el-pagination
<div style="margin-top:50px;text-align: center">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageIndex"
@@ -89,6 +91,7 @@
layout="total, sizes, prev, pager, next, jumper"
:total="count">
</el-pagination>
</div>
</div>
<el-dialog
width="860px"