Browse Source

fix:代理商身份

super-yimizi 1 day ago
parent
commit
7e47d1df74
1 changed files with 3 additions and 21 deletions
  1. 3 21
      application/api/controller/commission/Agent.php

+ 3 - 21
application/api/controller/commission/Agent.php

@@ -121,27 +121,9 @@ class Agent extends Commission
             $applyInfo = ApplyModel::where('user_id', $this->service->user->id)
                 ->with(['identity'])
                 ->order('id desc')
-                ->find();
-                
-            if ($applyInfo) {
-                $data['apply_info'] = [
-                    'id' => $applyInfo->id,
-                    'apply_type' => $applyInfo->apply_type,
-                    'apply_type_text' => $applyInfo->apply_type_text,
-                    'status' => $applyInfo->status,
-                    'status_text' => $applyInfo->status_text,
-                    'identity_name' => $applyInfo->identity->name ?? '',
-                    'area_text' => implode('-', array_filter([
-                        $applyInfo->province_name,
-                        $applyInfo->city_name,
-                        $applyInfo->district_name
-                    ])),
-                    'createtime' => $applyInfo->createtime ? date('Y-m-d H:i:s', $applyInfo->createtime) : '',
-                    'audit_time' => $applyInfo->audit_time ? date('Y-m-d H:i:s', $applyInfo->audit_time) : '',
-                ];
-            } else {
-                $data['apply_info'] = null;
-            }
+                ->find();           
+            $data['apply_info'] = $applyInfo;
+            
         }
 
         $this->success('分销商信息', $data);