|
|
@@ -240,7 +240,7 @@ class PostRecordService extends BaseService
|
|
|
}
|
|
|
$count = $this->model->where(['source_id'=>$sourceId,'type'=> 2,'status'=>1,'mark'=>1])->count('id');
|
|
|
$this->error = $status==1? '点赞成功':'取消点赞成功';
|
|
|
- $this->errorData = $status==2? [] : ['count'=>$count,'data'=>['id' => $sourceId,'user_id'=>$userId,'status'=>$status]];
|
|
|
+ $this->errorData = $status==2? ['count'=>$count,'data'=>[]] : ['count'=>$count,'data'=>['id' => $sourceId,'user_id'=>$userId,'status'=>$status]];
|
|
|
return true;
|
|
|
}else{
|
|
|
if(!$sourceId = $this->model->insertGetId($data)){
|
|
|
@@ -254,7 +254,7 @@ class PostRecordService extends BaseService
|
|
|
}
|
|
|
$this->error = $status==1? '点赞成功':'取消点赞成功';
|
|
|
$count = $this->model->where(['source_id'=>$sourceId,'type'=> 2,'status'=>1,'mark'=>1])->count('id');
|
|
|
- $this->errorData = $status==2? [] : ['count'=>$count,'data'=>['id' => $sourceId,'user_id'=>$userId,'status'=>$status]];
|
|
|
+ $this->errorData = $status==2? ['count'=>$count,'data'=>[]] : ['count'=>$count,'data'=>['id' => $sourceId,'user_id'=>$userId,'status'=>$status]];
|
|
|
return true;
|
|
|
}
|
|
|
}
|