正在显示
1 个修改的文件
包含
1 行增加
和
3 行删除
| @@ -77,10 +77,8 @@ class RankDataController extends BaseController | @@ -77,10 +77,8 @@ class RankDataController extends BaseController | ||
| 77 | public function export(RankDataLogic $logic){ | 77 | public function export(RankDataLogic $logic){ |
| 78 | $lang = $this->request['lang'] ??''; | 78 | $lang = $this->request['lang'] ??''; |
| 79 | $data = $logic->keywords_rank_list(true); | 79 | $data = $logic->keywords_rank_list(true); |
| 80 | - | ||
| 81 | $img_position = $video_position= false; | 80 | $img_position = $video_position= false; |
| 82 | foreach ($data as &$item){ | 81 | foreach ($data as &$item){ |
| 83 | - $item['domain'] = explode(':', $item['domain'])[1]; | ||
| 84 | $item['lang'] = $this->request['lang'] ?: 'en'; | 82 | $item['lang'] = $this->request['lang'] ?: 'en'; |
| 85 | $item['g_text'] = RankData::gMap()[$item['g']]??''; | 83 | $item['g_text'] = RankData::gMap()[$item['g']]??''; |
| 86 | $item['img_position'] = $item['img_position'] ?? ''; | 84 | $item['img_position'] = $item['img_position'] ?? ''; |
| @@ -199,7 +197,7 @@ class RankDataController extends BaseController | @@ -199,7 +197,7 @@ class RankDataController extends BaseController | ||
| 199 | $promises['video_position'] = $client->getAsync('/google_video?'.Arr::query($param)); | 197 | $promises['video_position'] = $client->getAsync('/google_video?'.Arr::query($param)); |
| 200 | 198 | ||
| 201 | // 等待所有请求响应完成 | 199 | // 等待所有请求响应完成 |
| 202 | - $results = Utils:: settle($promises)->wait(); | 200 | + $results = Utils::settle($promises)->wait(); |
| 203 | foreach ($results as $key => $result) { | 201 | foreach ($results as $key => $result) { |
| 204 | if ($result['state'] == 'fulfilled') { | 202 | if ($result['state'] == 'fulfilled') { |
| 205 | $res = Arr::s2a($result['value']->getBody()->getContents()); | 203 | $res = Arr::s2a($result['value']->getBody()->getContents()); |
-
请 注册 或 登录 后发表评论