request->param('click_id'); $gzh_appid = $this->request->param('gzh_appid'); $ip = $this->request->param('ip'); $user_agent = $this->request->param('user_agent'); $user_agent = $user_agent ? urldecode($user_agent) : ''; Log::info("接收数据:". json_encode($this->request->param(""))); if (empty($click_id)) { exit(json_encode(['ret' => 101, 'msg' => '缺少参数'])); } $data = [ 'click_id' => $click_id, ]; if ($gzh_appid) { $data['gzh_appid'] = trim($gzh_appid); } $key = CacheConstants::gdtClickKey($ip, $user_agent); Redis::instance()->hMSet($key, $data); Redis::instance()->expire($key, CacheConstants::GDT_CLICLK_CACHE_EXPIRE_TIME); exit(json_encode(['ret' => 0, 'msg' => '接收成功'])); } }