我的收藏接口替换

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>