作者 郭宇鹏
1 个管道 的构建 通过 耗费 0 秒

'12-30'

... ... @@ -135,7 +135,7 @@ class Article extends BaseApi
$article->show_num += 1;
$article->save();
//5.查询是否当前用户是否点赞
$article_zan = model('article_zan')->where('user_id',$this->auth->id)->find();
$article_zan = model('article_zan')->where('user_id',$this->auth->id)->where('article_id',$article['id'])->find();
$article_zan?$article['is_zan'] = 1:$article['is_zan'] = 0;
//6.返回结果
$this->success('获取动态成功',$article);
... ...