From c9e51fc21f234c39be715a2975b893dcab26e707 Mon Sep 17 00:00:00 2001 From: "dong.ai" Date: Sun, 14 Sep 2025 16:03:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=94=B6=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Portal/interactBar.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/Portal/interactBar.vue b/src/components/Portal/interactBar.vue index a1faad95..1e635755 100644 --- a/src/components/Portal/interactBar.vue +++ b/src/components/Portal/interactBar.vue @@ -506,9 +506,11 @@ export default { return; } //需要判断是否已点赞,已点赞的不再加 + console.log(data,'---------------'); + let postData={ objType:this.type, - objId:this.data.id, + objId:this.data.id || this.data.courseId, title:'', } if(this.loading) { @@ -516,7 +518,7 @@ export default { } this.loading=true; if(this.type==1){ - postData.title=this.data.name; + postData.title=this.data.name||this.data.courseName; }else if(this.type==60){ postData.title=this.data.content; } else if(this.type==5){ @@ -525,7 +527,7 @@ export default { postData.title=this.data.title; } if(this.isFavorite) {// 已经收藏,再次点击取消收藏 - apiFavorites.remove(this.type,this.data.id).then(res=>{ + apiFavorites.remove(this.type,this.data.id||this.data.courseId).then(res=>{ this.loading=false; if(res.status==200){ this.isFavorite=false;