Commit 2fed234f authored by hujun's avatar hujun

city

parent 66ed74a8
......@@ -829,14 +829,16 @@ class Shop extends Basic
* @return \think\Response
*/
public function getHouseAddress() {
if (empty($this->params['address'])) {
if (empty($this->params['address']) || empty($this->params['city'])) {
return $this->response(101, '参数错误');
}
$data = [];
$msg = "";
try {
$m_house = new GHouses();
$data = $m_house->getHouseInfo('id,internal_address as address', ['internal_address'=>['LIKE', $this->params['address']. '%']]);
$where['internal_address'] = ['LIKE', $this->params['address']. '%'];
$where['city'] = $this->params['city'];
$data = $m_house->getHouseInfo('id,internal_address as address', $where);
$code = 200;
} catch (\Exception $e) {
$code = 101;
......
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