Commit 91d56a2e authored by zhuwei's avatar zhuwei

通讯录修改

parent 986e8741
......@@ -41,16 +41,20 @@ class Agent extends Basic
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
if (!empty($params['site_id'])) {
$where['Agents.site_id'] = $params['site_id'] ;
if (!empty($params['keyword'])) {
$where['Agents.name|Agents.phone'] = [ 'LIKE', '%' . $params['keyword'] . '%' ];
}
$field = 'Agents.id as agent_id,';
$field .= 'Agents.name,';
$field .= 'Agents.img,';
$field .= 'Agents.phone';
$res = $this->aAgents->getPhoneBookList($field, $where,$pageSize,$pageNo);
$res_total = $this->aAgents->getPhoneBookListTotal($params);
$res = $this->aAgents->getPhoneBookList($field, $where, $pageSize, $pageNo);
foreach ($res as $key => $val) {
$res[$key]['head_portrait'] = AGENTHEADERIMGURL . $val['img'];
}
$res_total = $this->aAgents->getPhoneBookListTotal($where);
return $this->response("200", "成功",['data'=>$res,'total'=>$res_total]);
......
......@@ -52,7 +52,7 @@ class WxAuthorization extends Basic
{
$code = empty($_GET['code']) ? null : $_GET['code'];
if (!$code) {
$this->_wxApi->getWxCode($this->url);
$this->_wxApi->getWxCode(CURRENT_URL . "/index/getWxInfoV2");
} else {
$userInfo = $this->_wxApi->getUserInfoByAccessToken($code);
dump($userInfo);
......
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