wupengfei 2 years ago
parent
commit
0597a0b1b1
2 changed files with 3 additions and 2 deletions
  1. 1 1
      .idea/workspace.xml
  2. 2 1
      application/api/controller/Forum.php

+ 1 - 1
.idea/workspace.xml

@@ -198,7 +198,7 @@
       <workItem from="1669952538953" duration="9708000" />
       <workItem from="1670201125142" duration="9015000" />
       <workItem from="1670287594399" duration="11535000" />
-      <workItem from="1670461023846" duration="19779000" />
+      <workItem from="1670461023846" duration="19999000" />
     </task>
     <servers />
   </component>

+ 2 - 1
application/api/controller/Forum.php

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