我的收藏接口替换

This commit is contained in:
zhaofang
2022-06-09 12:08:16 +08:00
parent abf4c9ec6d
commit 7a62d6df51
7 changed files with 54 additions and 34 deletions

View File

@@ -7,11 +7,11 @@
<div class="article-info-title one-line-ellipsis">
{{ item.title }}
</div>
<div class="article-info-summary two-line-ellipsis">{{ item.summary }}</div>
<div class="article-info-summary two-line-ellipsis">{{ item.summary || item.content}}</div>
<div class="article-info-tools">
<authorInfo :avatar="item.avatar" :name="item.name" :info="item.orgInfo" :sex="item.sex"> </authorInfo>
<span>发布时间{{ item.sysCreateTime | timeFilter }}</span>
<span>收藏时间{{ item.time | timeFilter }}</span>
<span>发布时间{{ item.sysCreateTime || item.publishTime | timeFilter }}</span>
<span>收藏时间{{ item.time || item.favoritesTime | timeFilter }}</span>
<el-button @click.stop="delItem(item)" type="text" style="color: #8590A6" icon="el-icon-remove">取消收藏</el-button>
</div>
</div>
@@ -46,9 +46,7 @@ export default {
},
methods: {
jump(item) {
// let routeData = this.$router.resolve({ path: '/article/detail?id=' + item.articleId }); // , query: { id: 1 }
// window.open(routeData.href, '_blank');
this.$router.push({path:'/article/detail',query:{id:item.articleId}})
this.$router.push({path:'/article/detail',query:{id:item.articleId || item.id}})
},
delItem(item) {
this.$confirm('您确定要取消收藏所选文章吗?', '删除提示', {
@@ -61,10 +59,10 @@ export default {
})
.catch(() => {});
},
jump(item){
this.$router.push({path:'/article/detail',query:{id:item.articleId}})
// window.open('/article/detail?id=' + item.articleId)
}
// jump(item){
// this.$router.push({path:'/article/detail',query:{id:item.articleId}})
// // window.open('/article/detail?id=' + item.articleId)
// }
}
};
</script>

View File

@@ -67,7 +67,6 @@ export default {
},
},
created() {
console.log(this.items)
},
}

View File

@@ -8,17 +8,16 @@
</div>
<div class="article-info-date">
<el-button @click="delItem(item)" type="text" icon="el-icon-remove">取消收藏</el-button>
<el-button @click="delItem(item)" type="text" style="color: #8590A6" icon="el-icon-remove">取消收藏</el-button>
</div>
</div>
<div class="article-info-summary three-line-ellipsis">
<router-link :to="'/case/detail?id='+item.cases.id" target="_blank" > {{item.cases.summary}}</router-link>
</div>
<div class="article-info-tools">
<authorInfo :avatar="item.avatar" :name="item.name" :info="item.orgInfo"></authorInfo>
<span>发布时间{{ item.cases.sysCreateTime | timeFilter }}</span>
<span>收藏时间{{ item.time | timeFilter }}</span>
<span style="margin-top:2px">发布时间{{ item.cases.sysCreateTime || item.publishTime | timeFilter }}</span>
<span style="margin-top:2px">收藏时间{{ item.time || item.favoritesTime | timeFilter }}</span>
<!-- <interactBar :type="0" :data="item.cases" :shares="false" :views="false"></interactBar> -->
</div>
</div>

View File

@@ -12,7 +12,7 @@
<span>{{ item.title }}</span>
</div>
<div class="uc-course-text">讲师{{ item.authorName}}</div>
<div class="uc-course-text">收藏日期{{ item.time }}</div>
<div class="uc-course-text">收藏日期{{ item.time || item.favoritesTime}}</div>
</div>
<div class="flex-between">
<el-button v-if="remove" @click.stop="delItem(item)" type="text" icon="el-icon-remove" style="color:#8590A6;font-size:14px;">
@@ -75,7 +75,12 @@ export default {
coudetail(item) {
// let routeData = this.$router.resolve({ path: '/course/detail?id=' + item.objId });
// window.open(routeData.href, '_blank');
this.$router.push({path:'/course/detail',query:{id:item.objId}})
if(item.contentType == '20') {
this.$router.push({path:'/course/detail',query:{id:item.objId || item.id}})
} else {
this.$router.push({path:'/course/micro',query:{id:item.objId || item.id}})
}
},
delItem(item) {
this.$confirm('您确定要删除所选收藏吗?', '删除提示', {

View File

@@ -16,8 +16,8 @@
</div>
<div class="article-info-tools">
<authorInfo :avatar="item.avatar" :name="item.name" :info="item.orgInfo" :sex="item.sex"></authorInfo>
<span>发布时间{{ item.question.sysCreateTime | timeFilter }}</span>
<span>收藏时间{{ item.time | timeFilter }}</span>
<span>发布时间{{ item.question.sysCreateTime || item.publishTime | timeFilter }}</span>
<span>收藏时间{{ item.time || item.favoritesTime | timeFilter }}</span>
<el-button @click.stop="delCollectItem(item)" type="text" icon="el-icon-remove" style="color:#8590A6">取消收藏</el-button>
</div>
</div>