作者 sgj

bug tiaoshi

... ... @@ -350,16 +350,19 @@ class Cms extends Api
$channel = $channel->toArray();
$channel['url'] = $channel['fullurl'];
$map_log['user_id']=$user_id;
$map_log['article_id']=$article_id;
$log=CmsLikeLog::get($map_log);
if (empty($log)){
$archives['is_like']=0;
}else{
$archives['is_like']=1;
if (!empty($user_id)){
$map_log['user_id']=$user_id;
$map_log['article_id']=$article_id;
$log=CmsLikeLog::get($map_log);
if (empty($log)){
$archives['is_like']=0;
}else{
$archives['is_like']=1;
}
$archives['read_score']=$get_score;
unset($channel['channeltpl'], $channel['listtpl'], $channel['showtpl'], $channel['status'], $channel['weigh'], $channel['parent_id']);
}
$archives['read_score']=$get_score;
unset($channel['channeltpl'], $channel['listtpl'], $channel['showtpl'], $channel['status'], $channel['weigh'], $channel['parent_id']);
$this->success('', ['archivesInfo' => $archives,'commentList' => $commentList]);
}
... ...