dyjh 6 years ago
parent
commit
23c992aa00
1 changed files with 5 additions and 0 deletions
  1. 5 0
      app/Http/Controllers/Api/V1/AlbumController.php

+ 5 - 0
app/Http/Controllers/Api/V1/AlbumController.php

@@ -285,17 +285,21 @@ class AlbumController extends Controller
                     ];
                     ];
 
 
             }
             }
+            print_r(11);
         if (Auth::loginUsingId($check->id)) {
         if (Auth::loginUsingId($check->id)) {
             $userAuth = Auth::user();
             $userAuth = Auth::user();
             if($check->is_dealer ==0){
             if($check->is_dealer ==0){
+                print_r(33);
                 if($request->input('agent_id')!=0){
                 if($request->input('agent_id')!=0){
                     $userAuth->up_agent_id = $request->input('agent_id');
                     $userAuth->up_agent_id = $request->input('agent_id');
                 }
                 }
+                print_r($request->input('agent_id'));
                 $add_record['agent_id'] = $request->input('agent_id');
                 $add_record['agent_id'] = $request->input('agent_id');
                 $add_record['open_id'] = $check->wechat_open_id;
                 $add_record['open_id'] = $check->wechat_open_id;
                 $add_record['action'] = 4;
                 $add_record['action'] = 4;
                 $add_record['store_id'] = $datas['store_id'];
                 $add_record['store_id'] = $datas['store_id'];
                 $add_record['detail'] = null;
                 $add_record['detail'] = null;
+                print_r(22);
                 AlbumWatchRecord::create($add_record);
                 AlbumWatchRecord::create($add_record);
                 $user_agent = AlbumAgentModel::where('id',$add_record['agent_id'])->first();
                 $user_agent = AlbumAgentModel::where('id',$add_record['agent_id'])->first();
                 $agent = AlbumUserModel::where('id',$user_agent->user_id)->first();
                 $agent = AlbumUserModel::where('id',$user_agent->user_id)->first();
@@ -307,6 +311,7 @@ class AlbumController extends Controller
             }else{
             }else{
                 $userAuth->up_agent_id = 0;
                 $userAuth->up_agent_id = 0;
             }
             }
+            die;
             $userAuth->save();
             $userAuth->save();
             $user['up_agent_id'] = $userAuth->up_agent_id;
             $user['up_agent_id'] = $userAuth->up_agent_id;
             $token = $userAuth->createToken($userAuth->id . '-' . $userAuth->openid)->accessToken;
             $token = $userAuth->createToken($userAuth->id . '-' . $userAuth->openid)->accessToken;