Commit a7c7b2ac authored by clone's avatar clone

bug

parent 6bc77fb7
......@@ -66,6 +66,7 @@ class Shop extends Basic
"shop_type" => 0, //商铺类型(0商场,1街铺)
"address" => "111",
"disc" => "黄浦区",
"city" => "上海市",
"industry_type" => "休闲娱乐",
"shop_area_start" => 45,//面积起始范围 街铺start和end面积一样
"shop_area_end" => 65,//面积结束范围
......@@ -83,11 +84,13 @@ class Shop extends Basic
if (empty($params['site_area'])) {
return $this->response("101", "请求来源不能为空");
}
if (empty($params['city']) && ($params['city'] == "杭州市" || $params['city'] == "上海市")) {
return $this->response("101", "城市不能为空");
}
$field = "id,external_title as title,external_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";
$conditions["city"] = trim($this->user_city);
$conditions["city"] = trim($params['city']);
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
......
......@@ -13,6 +13,7 @@ use app\extra\RedisExt;
use app\model\Users;
use think\Controller;
use think\Exception;
use Think\Log;
use think\Request;
use think\Response;
use Qiniu;
......@@ -102,7 +103,7 @@ class Basic extends Controller
$this->timeStamp_ = $result->timeStamp_;
}
$this->getCity($this->userId);
//$this->getCity($this->userId);
$requestPath = $this->request->routeInfo()["rule"][0] . "/" . $this->request->routeInfo()["rule"][1];
//过滤掉不需要验证token的接口
......@@ -113,7 +114,7 @@ class Basic extends Controller
/**
* 默认城市选择
* @param $agentId
* @param $userId
*/
public function getCity($userId)
{
......@@ -125,11 +126,11 @@ class Basic extends Controller
} else {
$this->user_city = "上海市";
}
Log::record("-------basic-------".$redis_->get("user_city_" . $userId),"info");
} catch (Exception $exception) {
$this->user_city = "上海市";
}
}
/**
......
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