Commit b514ee5c authored by clone's avatar clone

bug

parent 20620bf2
...@@ -12,6 +12,7 @@ namespace app\api_broker\extend; ...@@ -12,6 +12,7 @@ namespace app\api_broker\extend;
use app\extra\RedisExt; use app\extra\RedisExt;
use app\model\AAgents; use app\model\AAgents;
use app\model\GOperatingRecords; use app\model\GOperatingRecords;
use think\Exception;
use UnexpectedValueException; use UnexpectedValueException;
use InvalidArgumentException; use InvalidArgumentException;
use think\Controller; use think\Controller;
...@@ -114,6 +115,7 @@ class Basic extends Controller ...@@ -114,6 +115,7 @@ class Basic extends Controller
*/ */
public function getCity($agentId) public function getCity($agentId)
{ {
try {
$redis_ = RedisExt::getRedis(); $redis_ = RedisExt::getRedis();
if ($redis_) { if ($redis_) {
$city = $redis_->get("agent_city_" . $agentId); $city = $redis_->get("agent_city_" . $agentId);
...@@ -121,6 +123,10 @@ class Basic extends Controller ...@@ -121,6 +123,10 @@ class Basic extends Controller
} else { } else {
$this->city = "上海市"; $this->city = "上海市";
} }
} catch (Exception $exception) {
$this->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