wupengfei 2 年之前
父節點
當前提交
f75a9d438f
共有 2 個文件被更改,包括 8 次插入1 次删除
  1. 2 1
      .idea/workspace.xml
  2. 6 0
      application/api/controller/Press.php

+ 2 - 1
.idea/workspace.xml

@@ -3,6 +3,7 @@
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Press.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Press.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -192,7 +193,7 @@
       <workItem from="1669682447842" duration="24394000" />
       <workItem from="1669769873624" duration="5352000" />
       <workItem from="1669776182613" duration="18162000" />
-      <workItem from="1669855685721" duration="1761000" />
+      <workItem from="1669855685721" duration="2716000" />
     </task>
     <servers />
   </component>

+ 6 - 0
application/api/controller/Press.php

@@ -639,6 +639,9 @@ class Press extends Base
         foreach ($list as &$v) {
             $v['images_arr'] = $v['images'] ? explode('|',$v['images']) : null;
             $v['cover'] =   $v['images_arr'] ? $v['images_arr'][0] : null;
+           /* $v['comment_num'] = PressComment::where(['first_id'=>$v['press_id'],'type'=>1,'is_deleted'=>0])->count();
+            $v['collect_num'] = UserCollect::getCollectNum(4,$v['press_id']);
+            $v['praise_num'] = PlatformLike::getPraiseNum($v['press_id'],1);*/
         }
         $this->success('ok',['list'=>$list]);
     }
@@ -716,6 +719,9 @@ class Press extends Base
             $v['images_arr'] = $v['images'] ? explode('|',$v['images']) : null;
             $v['cover'] =   $v['images_arr'] ? $v['images_arr'][0] : null;
             $v['time'] = date("Y-m-d H:i:s",$v['update_int']);
+            /* $v['comment_num'] = PressComment::where(['first_id'=>$v['press_id'],'type'=>1,'is_deleted'=>0])->count();
+         $v['collect_num'] = UserCollect::getCollectNum(4,$v['press_id']);
+         $v['praise_num'] = PlatformLike::getPraiseNum($v['press_id'],1);*/
         }
         $this->success('ok',['list'=>$list]);
     }