mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-21 08:46:44 +08:00
我的收藏笔记tab
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<!-- <span>收藏时间:{{ item.time || item.favoritesTime | timeFilter }}</span> -->
|
||||
</div>
|
||||
<div class="article-info-summary two-line-ellipsis">{{ item.summary || item.content}}</div>
|
||||
<interactBar :type="2" :readonly="true" :data="items" :views="false" :shares="false"></interactBar>
|
||||
<interactBar :type="2" :readonly="true" :data="item" :views="false" :shares="false"></interactBar>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<router-link :to="'/case/detail?id='+item.cases.id" > {{item.cases.summary}}</router-link>
|
||||
</div>
|
||||
<div>
|
||||
<interactBar :type="3" :readonly="true" :data="items" :views="false" :shares="false"></interactBar>
|
||||
<interactBar :type="3" :readonly="true" :data="item" :views="false" :shares="false"></interactBar>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import interactBar from '@/components/Portal/interactBar.vue';
|
||||
// import interactBar from '@/components/Portal/interactBar.vue';
|
||||
import courseImage from '@/components/Course/courseImage.vue';
|
||||
export default {
|
||||
name: 'comStudyItem',
|
||||
@@ -75,9 +75,12 @@ export default {
|
||||
};
|
||||
},
|
||||
components: {
|
||||
interactBar,
|
||||
// interactBar,
|
||||
courseImage
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.items,'items');
|
||||
},
|
||||
methods: {
|
||||
coudetail(item) {
|
||||
// let routeData = this.$router.resolve({ path: '/course/detail?id=' + item.objId });
|
||||
@@ -103,27 +106,27 @@ export default {
|
||||
contentTypeFilter(value) {
|
||||
let obj = {};
|
||||
switch (value) {
|
||||
case '10': {
|
||||
case 10: {
|
||||
obj.class = 'uc-course-type2';
|
||||
obj.text = '录播';
|
||||
break;
|
||||
}
|
||||
case '21': {
|
||||
case 21: {
|
||||
obj.class = 'uc-course-type2';
|
||||
obj.text = '直播';
|
||||
break;
|
||||
}
|
||||
case '20': {
|
||||
case 20: {
|
||||
obj.class = 'uc-course-type2';
|
||||
obj.text = '录播';
|
||||
break;
|
||||
}
|
||||
case '30': {
|
||||
case 30: {
|
||||
obj.class = 'uc-course-type2';
|
||||
obj.text = '面授';
|
||||
break;
|
||||
}
|
||||
case '90': {
|
||||
case 90: {
|
||||
obj.class = 'uc-course-type2';
|
||||
obj.text = '混合';
|
||||
break;
|
||||
|
||||
109
src/components/HomePage/favoritesNote.vue
Normal file
109
src/components/HomePage/favoritesNote.vue
Normal file
@@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<div class="note-list">
|
||||
<ul v-if="list.length > 0">
|
||||
<li class="note-list-index" v-for="item in list" :key="item.id">
|
||||
<p style="margin-bottom:18px;">
|
||||
<span style="font-size: 16px;font-weight: 600;color: #333;">{{item.courseName}}</span> <span class="qa-bq">#笔记#</span>
|
||||
|
||||
<span class="follow-hide" style="float:right">
|
||||
<el-button @click.stop="delCollectItem(item)" type="text" icon="el-icon-star-on" style="color:#8590A6">取消收藏</el-button>
|
||||
</span>
|
||||
</p>
|
||||
<!-- <h6 class="note-title-info follow-home-title">
|
||||
|
||||
</h6> -->
|
||||
<p class="note-text">
|
||||
{{item.content}}
|
||||
</p>
|
||||
<div>
|
||||
<interactBar :type="6" :data="item" :shares="false" :views="false" :readonly="true"></interactBar>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div v-else class="home-no-list">
|
||||
<img class="img" :src="`${webBaseUrl}/images/homeWu/no-note.png`" alt="" srcset="">
|
||||
<p class="text">还没有笔记</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import interactBar from "@/components/Portal/interactBar.vue";
|
||||
// import author from "@/components/Portal/authorInfo.vue";
|
||||
export default{
|
||||
name:"NoteList",
|
||||
components: {
|
||||
interactBar,
|
||||
// timeShow,
|
||||
// author
|
||||
},
|
||||
props:{
|
||||
list:{
|
||||
type:Array,
|
||||
default:()=>[]
|
||||
},
|
||||
isDynamic:{
|
||||
type:Boolean,
|
||||
default:false,
|
||||
},
|
||||
personal:{
|
||||
type:Boolean,
|
||||
default:false,
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
noteList:[]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods:{
|
||||
delCollectItem(item) {
|
||||
this.$confirm('您确定要取消收藏吗?', '取消提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
this.$emit('confirm', item);
|
||||
// apiFavorites.del(item){
|
||||
// console.log(this.$parent,"我拿到的父组件")
|
||||
// }
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
emitHide(id) {
|
||||
this.$emit('hideIndex',id)
|
||||
},
|
||||
//展示全部
|
||||
changeIsAll(item) {
|
||||
item.isAll = !item.isAll;
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.note-list{
|
||||
ul{
|
||||
margin: 0;
|
||||
}
|
||||
.note-list-index{
|
||||
padding: 30px 0;
|
||||
border-bottom: 1px solid rgba($color: #999999, $alpha: 0.2) !important;
|
||||
}
|
||||
.note-title-info{
|
||||
margin: 0;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.note-text{
|
||||
margin-bottom: 18px;
|
||||
font-size: 14px;
|
||||
color: #333330;
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<div class="one-line-ellipsis" style="color: #333330;font-size: 14px;padding-top:1px">{{ item.question.bestAnswer }}</div>
|
||||
</div>
|
||||
<interactBar :type="4" :readonly="true" :data="items" :views="false" :shares="false"></interactBar>
|
||||
<interactBar :type="4" :readonly="true" :data="item" :views="false" :shares="false"></interactBar>
|
||||
|
||||
<!-- <div class="article-info-tools"> -->
|
||||
<!-- <authorInfo :avatar="item.avatar" :name="item.name" :info="item.orgInfo" :sex="item.sex"></authorInfo> -->
|
||||
|
||||
Reference in New Issue
Block a user