Merge remote-tracking branch 'origin/bjy' into case

# Conflicts:
#	src/components/Course/collectItem.vue
#	src/components/Course/weikeContent.vue
This commit is contained in:
86182
2022-06-07 16:22:47 +08:00
11 changed files with 129 additions and 45 deletions

View File

@@ -238,21 +238,25 @@ export default {
})
},
checkHas(){
if(this.type>0){
apiPraises.has(this.type,this.data.id).then(rs=>{
if(rs.status==200 && rs.result){
this.isPraise=true;
}else{
this.isPraise=false;
}
});
apiFavorites.has(this.type,this.data.id).then(rs=>{
if(rs.status==200 && rs.result){
this.isFavorite=true;
}else{
this.isFavorite=false;
}
})
if(this.type>0 && !this.readonly && this.data.id){
if(this.favorites){
apiFavorites.has(this.type,this.data.id).then(rs=>{
if(rs.status==200 && rs.result){
this.isFavorite=true;
}else{
this.isFavorite=false;
}
})
}
if(this.praises){
apiPraises.has(this.type,this.data.id).then(rs=>{
if(rs.status==200 && rs.result){
this.isPraise=true;
}else{
this.isPraise=false;
}
});
}
}
},
addShare(){