This commit is contained in:
daihh
2022-10-22 17:05:35 +08:00
7 changed files with 66 additions and 26 deletions

View File

@@ -162,6 +162,12 @@ body {margin: 0px;padding: 0px;}
// margin-bottom: 36px;
background: #fff;
border-radius: 8px;
position: relative;
.course-card-favorite{
position: absolute;
right:25px;
bottom: 72px;
}
// margin-right: 35px;
// .cor-icon {
@@ -338,6 +344,12 @@ body {margin: 0px;padding: 0px;}
.course-card {
padding:20px;
margin-right: 20px;
position: relative;
.course-card-favorite{
position: absolute;
right:20px;
bottom: 72px;
}
.course-image-box {
width:218;
height: 122px;

View File

@@ -37,10 +37,10 @@
<div v-if="favorites" @click="addFavorite()" :style="`min-width: ${nodeWidth};`" class="interact-bar-btn" :class="{cursor:!readonly}">
<el-tooltip effect="light" content="收藏" placement="top" :visible-arrow="false" popper-class="text-tooltip">
<svg-icon v-if="courseExclusive" style="font-size: 14px;margin-right: 0;" :icon-class="isFavorite?'collectedCourse':'collection'"></svg-icon>
<svg-icon v-if="courseExclusive" style="font-size: 32px;margin-right: 0;" :icon-class="isFavorite?'collectedCourse':'collectionCourse'"></svg-icon>
<svg-icon v-else style="font-size: 14px;margin-right: 0;" :icon-class="isFavorite?'collected':'collection'"></svg-icon>
</el-tooltip>
<span class="interact-bar-value"> {{ data.favorites}}</span>
<span v-if="!courseExclusive" class="interact-bar-value"> {{ data.favorites}}</span>
</div>
<div v-if="shares" @click="addShare()" :style="`min-width: ${nodeWidth};`" class="interact-bar-btn" :class="{cursor:!readonly}">
<el-tooltip effect="light" content="分享" placement="top" :visible-arrow="false" popper-class="text-tooltip">
@@ -245,7 +245,7 @@ export default {
content='案例'
}
if(this.type==4){
content='问'
content='问'
}
if(this.type==5){
content='回答'

View File

@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="32px" height="20px" viewBox="0 0 32 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>收藏</title>
<title>编组 18备份</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="2.课程页" transform="translate(-387.000000, -876.000000)" fill="#04243C">
<g id="编组-12备份-11" transform="translate(86.000000, 562.000000)">
<g id="收藏" transform="translate(301.000000, 314.000000)">
<path d="M10,0 L22,0 C27.5228475,-1.01453063e-15 32,4.4771525 32,10 C32,15.5228475 27.5228475,20 22,20 L10,20 C4.4771525,20 6.76353751e-16,15.5228475 0,10 C-6.76353751e-16,4.4771525 4.4771525,1.01453063e-15 10,0 Z" id="矩形" opacity="0.05"></path>
<g id="shoucang" transform="translate(10.000000, 4.000000)" fill-rule="nonzero" opacity="0.1">
<g id="1.首页备份" transform="translate(-387.000000, -954.000000)">
<g id="编组-6备份" transform="translate(116.000000, 954.000000)">
<g id="编组-18备份" transform="translate(271.000000, 0.000000)">
<path d="M10,0 L22,0 C27.5228475,-1.01453063e-15 32,4.4771525 32,10 C32,15.5228475 27.5228475,20 22,20 L10,20 C4.4771525,20 6.76353751e-16,15.5228475 0,10 C-6.76353751e-16,4.4771525 4.4771525,1.01453063e-15 10,0 Z" id="矩形" fill="#FF5100" opacity="0.05"></path>
<g id="shoucang" transform="translate(10.000000, 4.000000)" fill="#FE5C11" fill-rule="nonzero" opacity="0.737776802">
<path d="M3.51111722,11.8358841 C3.00606047,12.157725 2.34560166,11.9912662 2.03884758,11.4672748 C1.89342872,11.2184847 1.84823239,10.9213787 1.91284589,10.6389807 L2.56655461,7.77979671 C2.58241634,7.71199121 2.5606958,7.64072905 2.51000386,7.59426129 L0.370225308,5.6819849 C-0.0742306183,5.28506832 -0.125531303,4.59092584 0.254423758,4.12816419 C0.437033108,3.90516747 0.698955059,3.76625534 0.981933462,3.74232435 L3.79012094,3.5077128 C3.85132176,3.50248211 3.90607248,3.46109818 3.93112283,3.39817613 L5.01308726,0.684220572 C5.23854026,0.118845213 5.86554864,-0.151150366 6.41260593,0.0862303529 C6.67350855,0.199948757 6.87993807,0.414928183 6.98681359,0.684220572 L8.06877804,3.3980223 C8.09382837,3.46109818 8.14857911,3.50263596 8.20977992,3.5077128 L11.0182674,3.74247818 C11.6071753,3.79170814 12.0432311,4.3260071 11.9965805,4.93261256 C11.9746663,5.22209277 11.8429987,5.49123316 11.6298256,5.68229258 L9.49004701,7.59456897 C9.44024635,7.63902978 9.41774605,7.7110286 9.43349624,7.77995054 L10.087205,10.6391345 C10.2225068,11.2306633 9.87120209,11.8266535 9.29774444,11.9692666 C9.02158512,12.0380065 8.73007522,11.9899974 8.48878365,11.836038 L6.08440156,10.3037554 C6.03276544,10.2705141 5.96713542,10.2705141 5.9154993,10.3037554 L3.51096721,11.836038 L3.51111722,11.8358841 Z" id="路径"></path>
</g>
</g>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="32px" height="20px" viewBox="0 0 32 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>收藏</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="2.课程页" transform="translate(-387.000000, -876.000000)" fill="#04243C">
<g id="编组-12备份-11" transform="translate(86.000000, 562.000000)">
<g id="收藏" transform="translate(301.000000, 314.000000)">
<path d="M10,0 L22,0 C27.5228475,-1.01453063e-15 32,4.4771525 32,10 C32,15.5228475 27.5228475,20 22,20 L10,20 C4.4771525,20 6.76353751e-16,15.5228475 0,10 C-6.76353751e-16,4.4771525 4.4771525,1.01453063e-15 10,0 Z" id="矩形" opacity="0.05"></path>
<g id="shoucang" transform="translate(10.000000, 4.000000)" fill-rule="nonzero" opacity="0.1">
<path d="M3.51111722,11.8358841 C3.00606047,12.157725 2.34560166,11.9912662 2.03884758,11.4672748 C1.89342872,11.2184847 1.84823239,10.9213787 1.91284589,10.6389807 L2.56655461,7.77979671 C2.58241634,7.71199121 2.5606958,7.64072905 2.51000386,7.59426129 L0.370225308,5.6819849 C-0.0742306183,5.28506832 -0.125531303,4.59092584 0.254423758,4.12816419 C0.437033108,3.90516747 0.698955059,3.76625534 0.981933462,3.74232435 L3.79012094,3.5077128 C3.85132176,3.50248211 3.90607248,3.46109818 3.93112283,3.39817613 L5.01308726,0.684220572 C5.23854026,0.118845213 5.86554864,-0.151150366 6.41260593,0.0862303529 C6.67350855,0.199948757 6.87993807,0.414928183 6.98681359,0.684220572 L8.06877804,3.3980223 C8.09382837,3.46109818 8.14857911,3.50263596 8.20977992,3.5077128 L11.0182674,3.74247818 C11.6071753,3.79170814 12.0432311,4.3260071 11.9965805,4.93261256 C11.9746663,5.22209277 11.8429987,5.49123316 11.6298256,5.68229258 L9.49004701,7.59456897 C9.44024635,7.63902978 9.41774605,7.7110286 9.43349624,7.77995054 L10.087205,10.6391345 C10.2225068,11.2306633 9.87120209,11.8266535 9.29774444,11.9692666 C9.02158512,12.0380065 8.73007522,11.9899974 8.48878365,11.836038 L6.08440156,10.3037554 C6.03276544,10.2705141 5.96713542,10.2705141 5.9154993,10.3037554 L3.51096721,11.836038 L3.51111722,11.8358841 Z" id="路径"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -83,16 +83,18 @@
<el-image style="border-radius: 4px;" class="course-image" :src="this.webBaseUrl+'/ad/index_course.png'" fit="fit"></el-image>
<span class="course-type">录播课</span>
</div>
<div title="高效谈判系列课" class="course-title portal-title-tow two-line-ellipsis">高效谈判系列课</div>
<div style="display:flex">
<div style="flex:80%" title="高效谈判系列课" class="course-title portal-title-tow two-line-ellipsis">高效谈判系列课</div>
<div >
<svg-icon style="font-size: 32px;margin-top: 8px;" icon-class="collectedCourse"></svg-icon>
</div>
</div>
<div class="course-author">
<!-- <div class="course-author-left" > </div> -->
<div>
<span class="study-num">3000+人学习</span>
</div>
<div style="display:flex">
<div>
<svg-icon style="font-size: 32px;margin-top: -5px;" icon-class="collectedCourse"></svg-icon>
</div>
<div style="padding-left:15px">
<div>
<span class="course-score-value">5.0</span>
@@ -103,7 +105,12 @@
</a>
</div>
<!--内容列表内容-->
<div v-for="course in courseList.list" :key="course.id" class="xindex-course">
<div v-for="course in courseList.list" :key="course.id" class="xindex-course" style="position: relative;">
<div style="position: absolute;right:25px;bottom: 72px">
<interactBar nodeWidth="20px" :courseExclusive="true" :type="1" :data="course" :comments="false" :praises="false" :shares="false" :views="false">
</interactBar>
<!-- <svg-icon style="font-size: 32px;margin-top: -5px;" icon-class="collectedCourse"></svg-icon> -->
</div>
<a :href="toCourseDetail(course)">
<div class="xindex-course-image">
<course-image :course="course"></course-image>
@@ -117,11 +124,7 @@
<span class="study-num" >{{formatNum(course.studys)}}人学习</span>
</div>
<div style="display: flex;">
<div>
<!-- <interactBar nodeWidth="20px" :type="1" :data="course" :comments="false" :praises="false" :shares="false" :views="false">
</interactBar> -->
<svg-icon style="font-size: 32px;margin-top: -5px;" icon-class="collectedCourse"></svg-icon>
</div>
<div v-if="course.score">
<span class="course-score-value" style="margin-left:10px">{{ toScore(course.score) }}</span>
</div>
@@ -1624,7 +1627,13 @@
/*早期浏览器*/
user-select: none;
}
.course-title-box{
display: flex;
.interact-bar-index{
}
}
.course-author {
// margin: 5px 15px;
// padding-bottom: 10px;

View File

@@ -82,22 +82,21 @@
<div class="xcourse-list">
<div class="xcourse-card" v-for="(cinfo,cidx) in courseList" :key="cinfo.id" v-if="(courseList.length<=course.pageSize) || (cidx<parseInt(courseList.length/columns)*columns)">
<div class="course-card">
<div class="course-card-favorite">
<interactBar :type="1" nodeWidth="20px" :data="cinfo" :courseExclusive="true" :comments="false" :praises="false" :shares="false" :views="false"></interactBar>
</div>
<a :href="toCourseDetail(cinfo)">
<div class="course-image-box">
<course-image :course="cinfo"></course-image>
<span v-if="cinfo.type == 20 || 10" class="course-type-left">录播课</span>
</div>
<div class="course-title two-line-ellipsis" :title="cinfo.title" v-html="cinfo.name"></div>
<div style="width:80%" class="course-title two-line-ellipsis" :title="cinfo.title" v-html="cinfo.name"></div>
<div class="course-info">
<div class="course-info-user">
<span class="course-info-author" v-if="cinfo.teacher">{{cinfo.teacher=='BOE教师'? '':cinfo.teacher}}</span>
<span class="course-info-studys" >{{formatNum(cinfo.studies)}}人学习</span>
</div>
<div class="course-info-score">
<div class="cor-praises" v-if="cinfo.source == 2">
<!-- <interactBar :type="1" nodeWidth="20px" :data="cinfo" :courseExclusive="true" :comments="false" :praises="false" :shares="false" :views="false"></interactBar> -->
<svg-icon style="font-size: 32px;" icon-class="collectedCourse"></svg-icon>
</div>
<div>
<div v-if="cinfo.score">
<span class="course-score-value">{{toScore(cinfo.score)}}</span>

View File

@@ -453,7 +453,7 @@ export default {
if(res.status==200){
this.dataList.count=res.result.count;
if(res.result.length!=0){
let courseIds=[];
@@ -470,6 +470,7 @@ export default {
item.question.content=item.content;
item.question.bestAnswer=item.bestAnswer;
item.question.id=item.id;
}
if(item.type == 3){
item.cases = {title:'',summary:''};
@@ -479,7 +480,10 @@ export default {
}
})
this.loadCouserTeacher(res.result.list,courseIds);
this.dataList.list = res.result.list;
res.result.list.forEach(item=>{
item.isAll = false;
})
this.dataList.list.push(...res.result.list);
this.getAllUserData(res.result.list);
}else{
this.dataList.list=[]