This commit is contained in:
daihh
2022-05-31 19:11:30 +08:00
parent 4ff5fbc390
commit e1382f96c8

View File

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