Commit 638572af authored by zhuwei's avatar zhuwei Committed by hujun

接口调整

parent 557fd13f
...@@ -265,25 +265,22 @@ class Broker extends Basic ...@@ -265,25 +265,22 @@ class Broker extends Basic
} }
if ($UPhoneFollowPp_res) { $user = new Users();
$user = new Users(); $user_res =$user->useraction_search_user_res($user_id);
$user_res =$user->useraction_search_user_res($user_id); //dump($user_res);
//dump($user_res); $user_res['user_pic']=HEADERIMGURL.$user_res['user_pic'];
$user_res['user_pic']=HEADERIMGURL.$user_res['user_pic']; $table= new Agents();
$table= new Agents(); $Agents_res =$table->Agents_res($v['agent_id']);
$Agents_res =$table->Agents_res($v['agent_id']); //dump($Agents_res);
//dump($Agents_res); $user_res['agentinfo']=$Agents_res?$Agents_res['realname'].'/'.$Agents_res['phone']:'未知';
$user_res['agentinfo']=$Agents_res?$Agents_res['realname'].'/'.$Agents_res['phone']:'未知';
$records = new GOperatingRecords(); $records = new GOperatingRecords();
$records_result = $records->user_history($user_id); $records_result = $records->user_history($user_id);
//dump($records_result); //dump($records_result);
//dump($user_id); //dump($user_id);
return $this->response("200", "success!", ['user_info'=>$user_res,'user_date'=>$UPhoneFollowPp_res,'user_history'=>$records_result]);
return $this->response("200", "success!", ['user_info'=>$user_res,'user_date'=>$UPhoneFollowPp_res,'user_history'=>$records_result]);
} else {
return $this->response("101", "失败!");
}
} }
/** /**
......
...@@ -196,4 +196,20 @@ class Remark extends Basic ...@@ -196,4 +196,20 @@ class Remark extends Basic
} }
public function select_by_phone() {
$params = $this->params;
$params['phone'] ='181';
$phone = $params['phone'];
$table= new Agents();
$Agents_res =$table->select_by_phone($phone);
// dump($Agents_res);
if ($Agents_res) {
return $this->response("200", "success!", $Agents_res);
} else {
return $this->response("201", "success!", ['user_date'=>'']);
}
}
} }
\ No newline at end of file
...@@ -256,5 +256,18 @@ class Agents extends Model ...@@ -256,5 +256,18 @@ class Agents extends Model
return $agents_data; return $agents_data;
} }
public function select_by_phone($phone) {
$agents = db('agents')
->where('phone','like','%'.$phone.'%')
->where('level', 2)
->whereor('level', 5)
->field('id,realname,agentshopname,phone')
->limit(10)
->page(1)
->select();
return $agents;
}
} }
...@@ -160,6 +160,7 @@ Route::group('index', [ ...@@ -160,6 +160,7 @@ Route::group('index', [
'bindPhoneListIndex' => ['index/Phone/bindPhoneListIndex', [ 'method' => 'get' ] ], //号码绑定列表 'bindPhoneListIndex' => ['index/Phone/bindPhoneListIndex', [ 'method' => 'get' ] ], //号码绑定列表
'useraction_search' => ['index/remark/useraction_search', [ 'method' => 'get|post' ] ], //后台客户详情 'useraction_search' => ['index/remark/useraction_search', [ 'method' => 'get|post' ] ], //后台客户详情
'select_by_phone' => ['index/remark/select_by_phone', [ 'method' => 'get|post' ] ], //后台客户详情--客方搜索
]); ]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment