...
|
...
|
@@ -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);
|
...
|
...
|
|