Commit 92048cd4 authored by hujun's avatar hujun

登录

parent 1e4ef520
......@@ -4,6 +4,7 @@ namespace app\index\controller;
use app\api\untils\JwtUntils;
use app\api_broker\service\BrokerService;
use app\extra\RedisExt;
use app\index\extend\Basic;
use app\model\AAgents;
use app\model\ASite;
......@@ -127,10 +128,13 @@ class Login extends Basic
$update_data['last_login_ip'] = $last_login_ip;
$this->m_agent->updateData($user_data['id'], $update_data);
$redis_ = RedisExt::getRedis();
$site_city = [];
if (!empty($user_data['site_id'])) {
$m_site = new ASite();
$site_city = $m_site->getSite('city', ['id'=>$user_data['site_id'], 'is_del'=>0]);
$redis_->set("agent_city_" . $user_data['id'], $site_city[0]['city']);
$redis_->set("agent_site_id_" . $user_data['id'], $user_data['site_id']);
}
$user_data['city'] = $site_city[0]['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