作者 赵彬吉

update

... ... @@ -21,7 +21,7 @@ class Visit extends Base
//连接数据库
protected $connection = 'custom_mysql';
protected $appends = ['device_text'];
protected $fillable = ['id','ip','device_port','country','city','url','referrer_url','depth','domain','is_inquiry','original_id','updated_date', 'created_at'];
protected $fillable = ['id','ip','device_port','country','city','url','referrer_url','depth','domain','is_inquiry','original_id','updated_date', 'created_at', 'user_agent'];
const DEVICE_PC = 1;
const DEVICE_MOBILE = 2;
... ...
... ... @@ -17,6 +17,6 @@ class VisitItem extends Base
//连接数据库
protected $connection = 'custom_mysql';
protected $fillable = ['ip','customer_visit_id','device_port','country','city','url','referrer_url','domain','updated_date','created_at'];
protected $fillable = ['ip','customer_visit_id','device_port','country','city','url','referrer_url','domain','updated_date','created_at', 'user_agent'];
}
... ...
... ... @@ -132,6 +132,7 @@ class SyncSubmitTaskService
$visit_data['country'] = $data['country'];
$visit_data['updated_date'] = $data['submit_at']->toDateString();
$visit_data['created_at'] = $data['submit_at'];
$visit_data['user_agent'] = $data['user_agent'];
Visit::saveData($visit_data, $date);
return true;
... ...