正在显示
3 个修改的文件
包含
3 行增加
和
2 行删除
| @@ -21,7 +21,7 @@ class Visit extends Base | @@ -21,7 +21,7 @@ class Visit extends Base | ||
| 21 | //连接数据库 | 21 | //连接数据库 |
| 22 | protected $connection = 'custom_mysql'; | 22 | protected $connection = 'custom_mysql'; |
| 23 | protected $appends = ['device_text']; | 23 | protected $appends = ['device_text']; |
| 24 | - protected $fillable = ['id','ip','device_port','country','city','url','referrer_url','depth','domain','is_inquiry','original_id','updated_date', 'created_at']; | 24 | + protected $fillable = ['id','ip','device_port','country','city','url','referrer_url','depth','domain','is_inquiry','original_id','updated_date', 'created_at', 'user_agent']; |
| 25 | 25 | ||
| 26 | const DEVICE_PC = 1; | 26 | const DEVICE_PC = 1; |
| 27 | const DEVICE_MOBILE = 2; | 27 | const DEVICE_MOBILE = 2; |
| @@ -17,6 +17,6 @@ class VisitItem extends Base | @@ -17,6 +17,6 @@ class VisitItem extends Base | ||
| 17 | //连接数据库 | 17 | //连接数据库 |
| 18 | protected $connection = 'custom_mysql'; | 18 | protected $connection = 'custom_mysql'; |
| 19 | 19 | ||
| 20 | - protected $fillable = ['ip','customer_visit_id','device_port','country','city','url','referrer_url','domain','updated_date','created_at']; | 20 | + protected $fillable = ['ip','customer_visit_id','device_port','country','city','url','referrer_url','domain','updated_date','created_at', 'user_agent']; |
| 21 | 21 | ||
| 22 | } | 22 | } |
| @@ -132,6 +132,7 @@ class SyncSubmitTaskService | @@ -132,6 +132,7 @@ class SyncSubmitTaskService | ||
| 132 | $visit_data['country'] = $data['country']; | 132 | $visit_data['country'] = $data['country']; |
| 133 | $visit_data['updated_date'] = $data['submit_at']->toDateString(); | 133 | $visit_data['updated_date'] = $data['submit_at']->toDateString(); |
| 134 | $visit_data['created_at'] = $data['submit_at']; | 134 | $visit_data['created_at'] = $data['submit_at']; |
| 135 | + $visit_data['user_agent'] = $data['user_agent']; | ||
| 135 | Visit::saveData($visit_data, $date); | 136 | Visit::saveData($visit_data, $date); |
| 136 | 137 | ||
| 137 | return true; | 138 | return true; |
-
请 注册 或 登录 后发表评论