|
@@ -329,7 +329,7 @@ class Forum extends Base
|
|
|
$c['is_like'] = PlatformLike::checkTags($this->user_id, $c['id'], 8);
|
|
|
}
|
|
|
$val['children'] = $children ? $children : null;
|
|
|
- $val['children_num'] = count($children);
|
|
|
+ $val['children_num'] = numTransform(count($children));
|
|
|
});
|
|
|
$this->success('ok',['list'=>$list,'total_num'=>$total_num]);
|
|
|
}
|
|
@@ -594,6 +594,7 @@ class Forum extends Base
|
|
|
->select()->toArray();
|
|
|
array_walk($list,function (&$v){
|
|
|
$v['reply_num'] = ForumReply::where('forum_id',$v['forum_id'])->where('is_deleted',0)->count();
|
|
|
+ $v['reply_num'] = numTransform($v['reply_num']);
|
|
|
$v['like_num'] = PlatformLike::getPraiseNum($v['forum_id'],3);
|
|
|
});
|
|
|
$total_num = ForumReply::where($where)->alias('r')->count();
|