Commit baa88081 authored by clone's avatar clone

城市选择

parent e3f3a8e2
...@@ -28,10 +28,10 @@ class Location extends Basic ...@@ -28,10 +28,10 @@ class Location extends Basic
public function saveSiteCity() public function saveSiteCity()
{ {
$params = $this->params; $params = $this->params;
/* $params = array( $params = array(
"agent_id" => 1, "agent_id" => 1,
"city" => "上海" "city" => "上海"
);*/ );
$checkResult = $this->validate($params, "LocationValidate.saveSiteCityVerify"); $checkResult = $this->validate($params, "LocationValidate.saveSiteCityVerify");
if (true !== $checkResult) { if (true !== $checkResult) {
return $this->response("101", $checkResult); return $this->response("101", $checkResult);
...@@ -41,7 +41,13 @@ class Location extends Basic ...@@ -41,7 +41,13 @@ class Location extends Basic
if ($params["city"] == "杭州") { if ($params["city"] == "杭州") {
$city = "杭州"; $city = "杭州";
} }
if ($this->redis_) {
$this->redis_->set(self::CITY_AGENTS . $agent_id, $city); $this->redis_->set(self::CITY_AGENTS . $agent_id, $city);
} else {
return $this->response("101", "redis service not found");
}
return $this->response("200", "success", []);
} }
} }
\ No newline at end of file
...@@ -86,6 +86,7 @@ class Shop extends Basic ...@@ -86,6 +86,7 @@ class Shop extends Basic
$field = "id,internal_title as title,internal_address as address,city,disc,business_district_id,status,industry_type $field = "id,internal_title as title,internal_address as address,city,disc,business_district_id,status,industry_type
,shop_area_start,shop_area_end,shop_type,residue_num,shop_sign,is_carefully_chosen,rent_type,rent_price"; ,shop_area_start,shop_area_end,shop_type,residue_num,shop_sign,is_carefully_chosen,rent_type,rent_price";
$conditions["city"] = trim($this->city);
} }
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo']; $pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
...@@ -354,8 +355,8 @@ class Shop extends Basic ...@@ -354,8 +355,8 @@ class Shop extends Basic
//上传人 //上传人
$m_agent = new AAgents(); $m_agent = new AAgents();
$upload_data = $m_agent->getAgentById('name,phone',['agent_id'=>$result['upload_id']]); $upload_data = $m_agent->getAgentById('name,phone', [ 'agent_id' => $result['upload_id'] ]);
$result['upload_user'] = $upload_data[0]['name'] .'-'. $upload_data[0]['phone']; $result['upload_user'] = $upload_data[0]['name'] . '-' . $upload_data[0]['phone'];
//独家方 //独家方
if ($result['is_exclusive_type'] == 1) { if ($result['is_exclusive_type'] == 1) {
...@@ -377,8 +378,8 @@ class Shop extends Basic ...@@ -377,8 +378,8 @@ class Shop extends Basic
$get_params['agents_id'] = $params["user_id"]; $get_params['agents_id'] = $params["user_id"];
$get_params['house_id'] = $params["id"]; $get_params['house_id'] = $params["id"];
$collect_house = new ACollectHouse(); $collect_house = new ACollectHouse();
$res = $collect_house->getCollectHouse($field,$get_params); $res = $collect_house->getCollectHouse($field, $get_params);
if($res && ($res[0]['status'] == 1)){//如果存在 if ($res && ($res[0]['status'] == 1)) {//如果存在
$result["is_collect"] = 1; $result["is_collect"] = 1;
} }
} }
......
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