Commit 40a83263 authored by hujun's avatar hujun

设置城市

parent 215a3f5f
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
namespace app\index\controller; namespace app\index\controller;
use app\extra\RedisExt;
use app\index\extend\Basic; use app\index\extend\Basic;
use app\model\AAgents; use app\model\AAgents;
use app\model\GHousesToAgents; use app\model\GHousesToAgents;
...@@ -234,4 +235,39 @@ class Broker extends Basic ...@@ -234,4 +235,39 @@ class Broker extends Basic
$data = $m_store->getStoreDistrict($field, $where); $data = $m_store->getStoreDistrict($field, $where);
return $this->response(200, '', $data); return $this->response(200, '', $data);
} }
/**
* 获取所属城市
*
* @return \think\Response
*/
public function getCurrentCity() {
$data['city'] = $this->city;
return $this->response(200, '', $data);
}
/**
* 设置城市
*
* @return \think\Response
*/
public function settingCity() {
if (empty($this->params['city'])) {
return $this->response(101, '参数错误');
}
$msg = '';
$code = 200;
try {
$redis_ = RedisExt::getRedis();
$redis_->set("agent_city_" . $this->userId, $this->params['city']);
} catch (\Exception $e) {
$code = 101;
$msg = $e->getMessage();
}
return $this->response($code, $msg);
}
} }
\ No newline at end of file
...@@ -107,6 +107,8 @@ Route::group('index', [ ...@@ -107,6 +107,8 @@ Route::group('index', [
'delTohouses' => [ 'index/broker/delTohouses', [ 'method' => 'POST' ] ], //解除经纪人和楼盘关系 'delTohouses' => [ 'index/broker/delTohouses', [ 'method' => 'POST' ] ], //解除经纪人和楼盘关系
'getAgentsTohouses' => [ 'index/broker/getAgentsTohouses', [ 'method' => 'GET' ] ], //获取经纪人和楼盘关系信息 'getAgentsTohouses' => [ 'index/broker/getAgentsTohouses', [ 'method' => 'GET' ] ], //获取经纪人和楼盘关系信息
'getAgentDistrictStore' => [ 'index/broker/getAgentDistrictStore', [ 'method' => 'GET' ] ], //获取经纪人id获取部门门店名称 'getAgentDistrictStore' => [ 'index/broker/getAgentDistrictStore', [ 'method' => 'GET' ] ], //获取经纪人id获取部门门店名称
'getCurrentCity' => [ 'index/broker/getCurrentCity', [ 'method' => 'GET' ] ], //获取所属城市
'settingCity' => [ 'index/broker/settingCity', [ 'method' => 'POST' ] ], //设置所属城市
'batchChangDish' => [ 'index/houses/batchChangDish', [ 'method' => 'post' ] ],//批量修改盘方 'batchChangDish' => [ 'index/houses/batchChangDish', [ 'method' => 'post' ] ],//批量修改盘方
'transformLandlord' => [ 'index/houses/transformLandlord', [ 'method' => 'post' ] ],//转换房东手机号 'transformLandlord' => [ 'index/houses/transformLandlord', [ 'method' => 'post' ] ],//转换房东手机号
'lockHouse' => [ 'index/houses/lockHouse', [ 'method' => 'post' ] ],//锁盘 'lockHouse' => [ 'index/houses/lockHouse', [ 'method' => 'post' ] ],//锁盘
......
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