浏览代码

Update api

dyjh 6 年之前
父节点
当前提交
0ae7b02e47
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      app/Http/Controllers/Api/V1/AlbumController.php

+ 2 - 1
app/Http/Controllers/Api/V1/AlbumController.php

@@ -700,7 +700,8 @@ class AlbumController extends Controller
         if($userAuth->is_dealer!=1) return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '该用户不是经销商!', $validator->messages());
         if($userAuth->is_dealer!=1) return $this->error(ErrorCode::CLIENT_WRONG_PARAMS, '该用户不是经销商!', $validator->messages());
         $user_agent = AlbumAgentModel::where('user_id',$userAuth->id)->first();
         $user_agent = AlbumAgentModel::where('user_id',$userAuth->id)->first();
         $res = AlbumWatchRecord::where([['agent_id',$user_agent->id],['store_id',$store_id]])->get();
         $res = AlbumWatchRecord::where([['agent_id',$user_agent->id],['store_id',$store_id]])->get();
-        $count = AlbumWatchRecord::where([['agent_id',$user_agent->id],['store_id',$store_id]])->groupBy('open_id')->get();
+        $count_user = AlbumWatchRecord::where([['agent_id',$user_agent->id],['store_id',$store_id]])->groupBy('open_id')->get();
+        $count = count($count_user);
         dd($count);
         dd($count);
         $action = '';
         $action = '';
         foreach($res as $key=>$val){
         foreach($res as $key=>$val){