Commit 1760d83d authored by chenzq's avatar chenzq

添加分公司的地址筛选

parent e9715ba0
...@@ -48,13 +48,16 @@ else { ...@@ -48,13 +48,16 @@ else {
$where['to_uid !='] = $uid; $where['to_uid !='] = $uid;
} }
$province = pdo_getall('sys_region',array('parent_id'=>1)); $province = pdo_getall('sys_region',array('parent_id'=> 1));
$num = $_GPC['province']; $parent_id = isset($_GPC["agency_id"])?$_GPC["agency_id"]:1;
$city= pdo_get('sys_region',array('id'=>$num)); //$city= pdo_getall('sys_region',array('agency_id'=>$agency_id));
$company = pdo_getall('longbing_company_company',array('uniacid' => $_W['uniacid'], 'status' => 1,'id'=>$city)); $type=pdo_getall('sys_region',array('parent_id'=>$parent_id,'type'=>2));
$city_id = isset($_GPC["id"])?$_GPC["id"]:1;
//$company = pdo_getall('longbing_company_company',array('uniacid' => $_W['uniacid'], 'status' => 1,'id'=>$city));
//$company = pdo_getall('longbing_company_company', array('uniacid' => $_W['uniacid'], 'status' => 1)); $company = pdo_getall('longbing_company_company', array('uniacid' => $_W['uniacid'], 'status' => 1));
$company_first = pdo_getall('longbing_company_company', array('uniacid' => $_W['uniacid'], 'status' => 1,'city'=>$city_id));
$where['uid'] = $uid; $where['uid'] = $uid;
$where['status'] = 1; $where['status'] = 1;
$cards = pdo_getslice('longbing_company_collection', $where, $limit, $count, array(), '', array('id desc')); $cards = pdo_getslice('longbing_company_collection', $where, $limit, $count, array(), '', array('id desc'));
...@@ -66,7 +69,7 @@ if (empty($cards) && !$keyword) { ...@@ -66,7 +69,7 @@ if (empty($cards) && !$keyword) {
'page' => $curr, 'page' => $curr,
'total_page' => ceil($count / 10), 'total_page' => ceil($count / 10),
'list' => array(), 'list' => array(),
'company' => $company '$company' => $company
); );
return $this->result(0, '', $data); return $this->result(0, '', $data);
} }
...@@ -205,7 +208,21 @@ foreach ($cards as $k => $v) { ...@@ -205,7 +208,21 @@ foreach ($cards as $k => $v) {
} }
} }
$data = array('page' => $curr, 'total_page' => ceil($count / 10), 'list' => $cards, 'company' => $company); $data = array(
'page' => $curr,
'total_page' => ceil($count / 10),
'list' => $cards,
'pro'=>array(
'province'=>$province,
'ci'=>array(
'city'=> $type,
'com'=>array(
'company' => $company_first
)
)
)
);
$data['where'] = $where; $data['where'] = $where;
return $this->result(0, '', $data); return $this->result(0, '', $data);
......
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