|
@@ -780,7 +780,12 @@ class Forum extends Base
|
|
$where[] = ['c.pid', '=', 0];
|
|
$where[] = ['c.pid', '=', 0];
|
|
$where[] = ['c.reply_id',$type == 1 ? '=' :'>',0];
|
|
$where[] = ['c.reply_id',$type == 1 ? '=' :'>',0];
|
|
$where[] = ['c.is_deleted', '=', 0];
|
|
$where[] = ['c.is_deleted', '=', 0];
|
|
- $list = ForumReplyComment::field('c.*,m.name,m.headimg,f.title,r.content reply_content,f.level,r.user_id reply_user')->alias('c')
|
|
|
|
|
|
+ if($type == 1){
|
|
|
|
+ $field = 'c.*,m.name,m.headimg,f.content title,r.content reply_content,f.level,r.user_id reply_user';
|
|
|
|
+ }else{
|
|
|
|
+ $field = 'c.*,m.name,m.headimg,f.title,r.content reply_content,f.level,r.user_id reply_user';
|
|
|
|
+ }
|
|
|
|
+ $list = ForumReplyComment::field($field)->alias('c')
|
|
->where($where)
|
|
->where($where)
|
|
->leftJoin('forum_reply r', 'c.reply_id = r.id')
|
|
->leftJoin('forum_reply r', 'c.reply_id = r.id')
|
|
->leftJoin('store_member m', 'm.id = r.user_id')
|
|
->leftJoin('store_member m', 'm.id = r.user_id')
|
|
@@ -792,6 +797,7 @@ class Forum extends Base
|
|
array_walk($list, function (&$v)use ($user_info) {
|
|
array_walk($list, function (&$v)use ($user_info) {
|
|
$v['name'] = $user_info['name'];
|
|
$v['name'] = $user_info['name'];
|
|
$v['headimg'] = $user_info['headimg'];
|
|
$v['headimg'] = $user_info['headimg'];
|
|
|
|
+ $v['title'] = strip_tags($v['title']);
|
|
if($v['reply_id']) {
|
|
if($v['reply_id']) {
|
|
$v['show_title'] = $v['reply_content'];
|
|
$v['show_title'] = $v['reply_content'];
|
|
unset($v['reply_content']);
|
|
unset($v['reply_content']);
|