mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-08 02:16:43 +08:00
提交
This commit is contained in:
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user