Commit 02be1549 authored by hujun's avatar hujun

1

parent 2706ca94
...@@ -124,9 +124,23 @@ class Basic extends Controller ...@@ -124,9 +124,23 @@ class Basic extends Controller
$this->siteId = $redis_->get("agent_site_id_" . $agentId); $this->siteId = $redis_->get("agent_site_id_" . $agentId);
} }
if(empty($this->city) || empty($this->siteId)){ if(empty($this->city) || empty($this->siteId)){
//取数据库 $m_agent = new AAgents();
$this->city = "上海市"; $m_site = new ASite();
$this->siteId = "10001"; $site_id = $m_agent->getAgentsById($agentId, 'site_id');
if ($site_id) {
$this->siteId = $site_id;
$city = $m_site->getSiteById($site_id, 'city');
if ($city) {
$this->city = $city;
} else {
echo json_encode(array( "code" => "300", "msg" => '账号位置信息错误,请联系运营', "data" => [], "type" => "json" ));
exit;
}
} else {
echo json_encode(array( "code" => "300", "msg" => '账号位置信息错误,请联系运营', "data" => [], "type" => "json" ));
exit;
}
} }
} catch (Exception $exception) { } catch (Exception $exception) {
echo json_encode(array( "code" => "300", "msg" => $exception, "data" => [], "type" => "json" )); echo json_encode(array( "code" => "300", "msg" => $exception, "data" => [], "type" => "json" ));
......
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