Commit 2939348c authored by zhuwei's avatar zhuwei

bug

parent 00a70345
...@@ -70,12 +70,16 @@ class HomePageLog extends Basic ...@@ -70,12 +70,16 @@ class HomePageLog extends Basic
if ((preg_match("/^1\d{10}$/", $params['name_or_phone']) != 1) and (strlen($params['name_or_phone']) < 6)) { if ((preg_match("/^1\d{10}$/", $params['name_or_phone']) != 1) and (strlen($params['name_or_phone']) < 6)) {
return $this->response("101", '手机号有误或者姓名不满两位汉字'); return $this->response("101", '手机号有误或者姓名不满两位汉字');
} }
$agent_params["phone|name"] = $params["name_or_phone"]; // $agent_params["phone|name"] = $params["name_or_phone"];
$agent_params["phone|name"] = array( "like", "%" . trim($params["name_or_phone"]) . "%" );
$agent_field = "id"; $agent_field = "id";
$model = new AAgents(); $model = new AAgents();
$res_a = $model->getAgentsIdsArray($agent_field, $agent_params); $res_a = $model->getAgentsIdsArray($agent_field, $agent_params);
if ($res_a) { if ($res_a) {
$where_["f.agent_id"] = [ 'in', $res_a ]; $where_["f.agent_id"] = [ 'in', $res_a ];
} else {
return $this->response("200", "request null");
} }
} }
...@@ -171,13 +175,15 @@ class HomePageLog extends Basic ...@@ -171,13 +175,15 @@ class HomePageLog extends Basic
if ((preg_match("/^1\d{10}$/", $params['name_or_phone']) != 1) and (strlen($params['name_or_phone']) < 6)) { if ((preg_match("/^1\d{10}$/", $params['name_or_phone']) != 1) and (strlen($params['name_or_phone']) < 6)) {
return $this->response("101", '手机号有误或者姓名不满两位汉字'); return $this->response("101", '手机号有误或者姓名不满两位汉字');
} }
//$agent_params["phone|name"] = array( "like", "%" . trim($params["name_or_phone"]) . "%" ); $agent_params["phone|name"] = array( "like", "%" . trim($params["name_or_phone"]) . "%" );
$agent_params["phone|name"] = $params["name_or_phone"]; // $agent_params["phone|name"] = $params["name_or_phone"];
$agent_field = "id"; $agent_field = "id";
$model = new AAgents(); $model = new AAgents();
$res_a = $model->getAgentsIdsArray($agent_field, $agent_params); $res_a = $model->getAgentsIdsArray($agent_field, $agent_params);
if ($res_a) { if ($res_a) {
$where_["f.agent_id"] = [ 'in', $res_a ]; $where_["f.agent_id"] = [ 'in', $res_a ];
} else {
return $this->response("200", "request null");
} }
} }
......
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