作者 刘锟

update

@@ -353,7 +353,11 @@ public function transmit($request, $type = self::TYPEVISIT, $traffic = self::TRA @@ -353,7 +353,11 @@ public function transmit($request, $type = self::TYPEVISIT, $traffic = self::TRA
353 } 353 }
354 $data["device_port"] = $this->userAgentHandle($request->userAgent(), $data["device_port"] ?? self::DEVICE_PORT_ONE); 354 $data["device_port"] = $this->userAgentHandle($request->userAgent(), $data["device_port"] ?? self::DEVICE_PORT_ONE);
355 $req["data"] = $data; 355 $req["data"] = $data;
356 - $req["referer"] = $this->visitInfoHandle($data["referrer_url"] ?? $request->header('Referer')); 356 + $referrer_url = $data["referrer_url"] ?? $request->header('Referer');
  357 + if($type == self::TYPEVISIT){
  358 + $referrer_url = $this->visitInfoHandle($referrer_url);
  359 + }
  360 + $req["referer"] = $referrer_url;
357 $req["domain"] = $request->getHost(); 361 $req["domain"] = $request->getHost();
358 $req["ip"] = $request->getClientIp(); 362 $req["ip"] = $request->getClientIp();
359 $req["user_agent"] = $request->userAgent(); 363 $req["user_agent"] = $request->userAgent();