|
@@ -730,13 +730,14 @@ class Forum extends Base
|
|
|
if ($title = input('title')) $where[] = ['r.content', 'like', '%' . $title . '%'];
|
|
|
$list = ForumReply::where($where)
|
|
|
->alias('r')
|
|
|
- ->field('r.id,r.content,r.forum_id,r.create_at,f.title,u.name ,u.headimg,f.browse_num,f.level')
|
|
|
+ ->field('r.id,r.content,r.forum_id,r.create_at,f.content title,u.name ,u.headimg,f.browse_num,f.level')
|
|
|
->leftJoin('user_forum f', 'r.forum_id = f.id')
|
|
|
->leftJoin('store_member u', 'r.user_id = u.id')
|
|
|
->limit($this->off_set, $this->page_num)
|
|
|
->order('r.id desc')
|
|
|
->select()->toArray();
|
|
|
array_walk($list, function (&$v) {
|
|
|
+ $v['title'] = strip_tags($v['title']);
|
|
|
$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);
|