正在显示
1 个修改的文件
包含
0 行增加
和
4 行删除
| @@ -48,18 +48,14 @@ class RankData extends BaseCommands | @@ -48,18 +48,14 @@ class RankData extends BaseCommands | ||
| 48 | } | 48 | } |
| 49 | foreach ($list as $item){ | 49 | foreach ($list as $item){ |
| 50 | $model = GoogleRankModel::where('project_id', $item['project_id'])->where('lang', '')->first(); | 50 | $model = GoogleRankModel::where('project_id', $item['project_id'])->where('lang', '')->first(); |
| 51 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export('测试-----2222', true) . PHP_EOL, FILE_APPEND); | ||
| 52 | if (!$model || $model->updated_date != date('Y-m-d')) { | 51 | if (!$model || $model->updated_date != date('Y-m-d')) { |
| 53 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($item['api_no'], true) . PHP_EOL, FILE_APPEND); | ||
| 54 | $res = $api->getGoogleRank($item['api_no']); | 52 | $res = $api->getGoogleRank($item['api_no']); |
| 55 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($res, true) . PHP_EOL, FILE_APPEND); | ||
| 56 | if(!$res){ | 53 | if(!$res){ |
| 57 | $error++; | 54 | $error++; |
| 58 | continue; | 55 | continue; |
| 59 | } | 56 | } |
| 60 | //收录数 | 57 | //收录数 |
| 61 | $indexed_pages_num = $site_res[$item['api_no']] ?? 0; | 58 | $indexed_pages_num = $site_res[$item['api_no']] ?? 0; |
| 62 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export('测试-----333', true) . PHP_EOL, FILE_APPEND); | ||
| 63 | $this->save_rank($item['project_id'], $res, $indexed_pages_num); | 59 | $this->save_rank($item['project_id'], $res, $indexed_pages_num); |
| 64 | } | 60 | } |
| 65 | //有小语种的 | 61 | //有小语种的 |
-
请 注册 或 登录 后发表评论