mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-17 23:06:45 +08:00
课程下边点赞鼠标悬停提示
This commit is contained in:
@@ -135,12 +135,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="display: flex;align-items: center;padding-top: 15px;">
|
<div style="display: flex;align-items: center;padding-top: 15px;">
|
||||||
<div @click="praiseContent" style="cursor: pointer;">
|
<div @click="praiseContent" style="cursor: pointer;">
|
||||||
<img class="icon-small" v-if="isPraise" :src="require('@/assets/images/icon/praise-active.png')">
|
<el-tooltip class="item" effect="light" :content="isPraise?'取消点赞':'点赞'" placement="top-start">
|
||||||
<img class="icon-small" v-else :src="require('@/assets/images/icon/praise.png')"><span style="margin-left: 5px;color: #666666;font-size: 18px;">{{courseInfo.praises}}</span>
|
<img class="icon-small" v-if="isPraise" :src="require('@/assets/images/icon/praise-active.png')">
|
||||||
|
<img class="icon-small" v-else :src="require('@/assets/images/icon/praise.png')">
|
||||||
|
</el-tooltip>
|
||||||
|
<span style="margin-left: 5px;color: #666666;font-size: 18px;">{{courseInfo.praises}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-left: 15px;cursor: pointer;" @click="treadContent">
|
<div style="margin-left: 15px;cursor: pointer;" @click="treadContent">
|
||||||
<img class="icon-small" v-if="isTrample" :src="require('@/assets/images/icon/trample-active.png')">
|
<el-tooltip class="item" effect="light" :content="isTrample?'取消踩':'踩'" placement="top-start">
|
||||||
<img class="icon-small" v-else :src="require('@/assets/images/icon/trample.png')"><span style="margin-left: 5px;color: #666666;font-size: 18px;">{{courseInfo.trampleCount}}</span>
|
<img class="icon-small" v-if="isTrample" :src="require('@/assets/images/icon/trample-active.png')">
|
||||||
|
<img class="icon-small" v-else :src="require('@/assets/images/icon/trample.png')">
|
||||||
|
</el-tooltip>
|
||||||
|
<span style="margin-left: 5px;color: #666666;font-size: 18px;">{{courseInfo.trampleCount}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -132,13 +132,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="display: flex;justify-content: flex-end;cursor: pointer;">
|
<div style="display: flex;justify-content: flex-end;cursor: pointer;">
|
||||||
<div @click="praiseContent">
|
<div @click="praiseContent">
|
||||||
<img class="icon-small" v-if="isPraise" :src="require('@/assets/images/icon/praise-active.png')" />
|
<el-tooltip class="item" effect="light" :content="isPraise?'取消点赞':'点赞'" placement="top-start">
|
||||||
<img class="icon-small" v-else :src="require('@/assets/images/icon/praise.png')" />
|
<img class="icon-small" v-if="isPraise" :src="require('@/assets/images/icon/praise-active.png')" />
|
||||||
|
<img class="icon-small" v-else :src="require('@/assets/images/icon/praise.png')" />
|
||||||
|
</el-tooltip>
|
||||||
{{ courseInfo.praises }}
|
{{ courseInfo.praises }}
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-left: 15px;" @click="treadContent">
|
<div style="margin-left: 15px;" @click="treadContent">
|
||||||
|
<el-tooltip class="item" effect="light" :content="isTrample?'取消踩':'踩'" placement="top-start">
|
||||||
<img class="icon-small" v-if="isTrample" :src="require('@/assets/images/icon/trample-active.png')" />
|
<img class="icon-small" v-if="isTrample" :src="require('@/assets/images/icon/trample-active.png')" />
|
||||||
<img class="icon-small" v-else :src="require('@/assets/images/icon/trample.png')" />
|
<img class="icon-small" v-else :src="require('@/assets/images/icon/trample.png')" />
|
||||||
|
</el-tooltip>
|
||||||
{{ courseInfo.trampleCount }}
|
{{ courseInfo.trampleCount }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -257,8 +261,8 @@ import pdfPreview from '@/components/PdfPreview/index.vue';
|
|||||||
import audioPlayer from '@/components/AudioPlayer/index.vue';
|
import audioPlayer from '@/components/AudioPlayer/index.vue';
|
||||||
import videoPlayer from '@/components/VideoPlayer/index.vue';
|
import videoPlayer from '@/components/VideoPlayer/index.vue';
|
||||||
import hyperLink from '@/components/Course/hyperLink.vue';
|
import hyperLink from '@/components/Course/hyperLink.vue';
|
||||||
import studyUtil from '@/utils/study.js';
|
import studyUtil from '@/utils/study.js';
|
||||||
import {encrypt} from '@/utils/jsencrypt.js';
|
import {encrypt} from '@/utils/jsencrypt.js';
|
||||||
import cookies from 'vue-cookies'
|
import cookies from 'vue-cookies'
|
||||||
export default {
|
export default {
|
||||||
name: 'ucStudyIndex',
|
name: 'ucStudyIndex',
|
||||||
@@ -345,22 +349,22 @@ export default {
|
|||||||
return treeList;
|
return treeList;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
createPlayUrl(fid,u){
|
createPlayUrl(fid,u){
|
||||||
let nowDate=new Date();
|
let nowDate=new Date();
|
||||||
let ctime=parseInt(nowDate.getTime()/1000);
|
let ctime=parseInt(nowDate.getTime()/1000);
|
||||||
let beforeUrl=parseInt(nowDate.getTime()/1000)+'/'+fid;
|
let beforeUrl=parseInt(nowDate.getTime()/1000)+'/'+fid;
|
||||||
//console.log(beforeUrl,'beforeUrl');
|
//console.log(beforeUrl,'beforeUrl');
|
||||||
let urlSign=encodeURIComponent(encrypt(beforeUrl));
|
let urlSign=encodeURIComponent(encrypt(beforeUrl));
|
||||||
//console.log(urlSign,'urlSign');
|
//console.log(urlSign,'urlSign');
|
||||||
cookies.set('PLAYSIGN_TIME', ctime);//写客户端的cookie保存
|
cookies.set('PLAYSIGN_TIME', ctime);//写客户端的cookie保存
|
||||||
//以下判断是为了区分本地环境和服务器环境
|
//以下判断是为了区分本地环境和服务器环境
|
||||||
if(process.env.NODE_ENV == 'development'){
|
if(process.env.NODE_ENV == 'development'){
|
||||||
this.blobUrl=process.env.VUE_APP_FILE_BASE_URL+u;
|
this.blobUrl=process.env.VUE_APP_FILE_BASE_URL+u;
|
||||||
}else{
|
}else{
|
||||||
this.blobUrl=process.env.VUE_APP_BASE_API+'/xboe/m/course/cware/resource?sign='+urlSign;
|
this.blobUrl=process.env.VUE_APP_BASE_API+'/xboe/m/course/cware/resource?sign='+urlSign;
|
||||||
}
|
}
|
||||||
console.log(this.blobUrl,'this.blobUrl');
|
console.log(this.blobUrl,'this.blobUrl');
|
||||||
},
|
},
|
||||||
widthOpen(url) {
|
widthOpen(url) {
|
||||||
window.open(url, '_blank');
|
window.open(url, '_blank');
|
||||||
@@ -822,14 +826,14 @@ export default {
|
|||||||
// if (r.content != '' && r.content.indexOf('.pdf') == -1) {
|
// if (r.content != '' && r.content.indexOf('.pdf') == -1) {
|
||||||
apiCourseFile.detail(r.contentRefId).then(cfrs => {
|
apiCourseFile.detail(r.contentRefId).then(cfrs => {
|
||||||
if (cfrs.status == 200) {
|
if (cfrs.status == 200) {
|
||||||
r.content = cfrs.result.previewFilePath;
|
r.content = cfrs.result.previewFilePath;
|
||||||
this.curCFile = cfrs.result;
|
this.curCFile = cfrs.result;
|
||||||
if(cfrs.result.previewFilePath == '' && cfrs.result.filePath.indexOf('pdf') > -1) {
|
if(cfrs.result.previewFilePath == '' && cfrs.result.filePath.indexOf('pdf') > -1) {
|
||||||
r.content = cfrs.result.filePath;
|
r.content = cfrs.result.filePath;
|
||||||
|
this.curCFile.converStatus=2;
|
||||||
|
}
|
||||||
|
if(r.content && r.content.indexOf('.pdf')>-1){
|
||||||
this.curCFile.converStatus=2;
|
this.curCFile.converStatus=2;
|
||||||
}
|
|
||||||
if(r.content && r.content.indexOf('.pdf')>-1){
|
|
||||||
this.curCFile.converStatus=2;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this.$message.error('加载pdf课件文件失败');
|
$this.$message.error('加载pdf课件文件失败');
|
||||||
|
|||||||
Reference in New Issue
Block a user