WIN-2308041133\Administrator 8 months ago
parent
commit
c8ca5683da
1 changed files with 4 additions and 2 deletions
  1. 4 2
      application/api/controller/Platform.php

+ 4 - 2
application/api/controller/Platform.php

@@ -57,7 +57,7 @@ class Platform extends Api
             ->where($map)
             ->count();
 //        var_dump(model('VideoShare')->getLastSql());die();
-        $data = ['config' => $config, 'doctor' => $list,'count' => $count];
+        $data = ['config' => $config, 'doctor' => $list,'total'=>$total,'count' => $count];
         $this->success('请求成功', $data);
     }
     public function user_share_count($uid){
@@ -65,7 +65,9 @@ class Platform extends Api
         $map['uid'] = $uid;
         $count = model('VideoShare')
             ->where($map)
-            ->count();
+            ->group('vid')
+            ->field('vid,SUM(num)')
+            ->select();
         return $count;
     }
 //    每个短剧更具贡献值分红