mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-10 03:16:45 +08:00
提交修改
This commit is contained in:
@@ -173,7 +173,7 @@
|
||||
<view v-if="scrollItemWidth>0" class="main-cata-active">
|
||||
<scroll-view scroll-x :scroll-y="false" style="height:115px;white-space: nowrap;overflow: hidden;" :scroll-left="scrollInfo.scrollLeft" @scrolltoupper="scrollLeft" @scrolltolower="scrollRight" @scroll="scrollHandler">
|
||||
<!-- <view class="mycrollcontent" style="display: flex;justify-content:flex-start;"> -->
|
||||
<view v-for="(con,conIdx) in scrollList" :key="conIdx" style="display: inline-block;" :id="con.id" @click="playContent(con.cataName,con)">
|
||||
<view v-for="(con,conIdx) in scrollList" :key="conIdx" style="display: inline-block;" :id="con.id" @click="playContent(con.cataName,con,conIdx,0)">
|
||||
<!---->
|
||||
<view :style="{width:scrollItemWidth+'px'}" class="scroll-item" :class="{'studying':curContent.id==con.id}">
|
||||
<view class="scroll-item-sec">{{con.cataName}}
|
||||
@@ -245,7 +245,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view >
|
||||
<view v-for="(con,conIdx) in cata.children" :key="conIdx" class="catalog-con" @click="playContent(cata.section,con)">
|
||||
<view v-for="(con,conIdx) in cata.children" :key="conIdx" class="catalog-con" @click="playContent(cata.section,con,conIdx,catIdx)">
|
||||
<view class="catalog-con-name" :class="{'studying':curContent.id==con.id}">
|
||||
<!-- <text>{{catIdx+1}}.{{conIdx+1}}, </text> -->
|
||||
<!-- <text class="square-border">{{getConType(con.contentType)}}</text> -->
|
||||
@@ -1020,7 +1020,28 @@
|
||||
summaryCatalog() {
|
||||
this.summarylogShow=false;
|
||||
},
|
||||
playContent(cata,con){
|
||||
playContent(cata,con,conIndex,catIndex){
|
||||
|
||||
if(conIndex!=undefined && catIndex!=undefined) {
|
||||
if(this.courseInfo.orderStudy) {
|
||||
let hasIndex=-1;
|
||||
this.scrollList.some((one,idx)=>{
|
||||
if(one.id==con.id){
|
||||
hasIndex=idx;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
})
|
||||
if(hasIndex>0){
|
||||
let pre=this.scrollList[hasIndex-1];
|
||||
if(pre.status!=9){
|
||||
this.$refs.messager.show({message:'请按顺序学习',type:'error'});
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// console.log(con,'con');
|
||||
if(this.videoPlayer){
|
||||
//console.log('切换视频');
|
||||
@@ -1037,7 +1058,7 @@
|
||||
con.content=cfrs.result.previewFilePath;
|
||||
//console.log(r.content);
|
||||
}else{
|
||||
$this.$message.error('加载pdf课件文件失败');
|
||||
$this.$refs.messager.show({message:'加载pdf课件文件失败',type:'error'});
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1242,13 +1263,11 @@
|
||||
// line-height: 60rpx;
|
||||
background-color: #f4f5f7;
|
||||
.scroll-item-name{
|
||||
|
||||
width: 100%;
|
||||
height: 76rpx;
|
||||
// white-space: pre-wrap;
|
||||
// word-break:break-all;
|
||||
|
||||
// line-height: 60rpx;
|
||||
word-break:break-all;
|
||||
line-height: 40rpx;
|
||||
overflow: hidden;
|
||||
white-space: pre-wrap;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
Reference in New Issue
Block a user