作者 赵彬吉

update

@@ -75,13 +75,13 @@ class QuanqiusouApi @@ -75,13 +75,13 @@ class QuanqiusouApi
75 /** 75 /**
76 * 获取谷歌排名数据 76 * 获取谷歌排名数据
77 * @param $api_no 77 * @param $api_no
78 - * @param int $lang 78 + * @param string $lang
79 * @param int $day 79 * @param int $day
80 * @return array|false|mixed 80 * @return array|false|mixed
81 * @author zbj 81 * @author zbj
82 * @date 2023/5/11 82 * @date 2023/5/11
83 */ 83 */
84 - public function getGoogleRank($api_no, int $lang = 0, int $day = 7, $force = true) 84 + public function getGoogleRank($api_no, string $lang = '', int $day = 7, $force = true)
85 { 85 {
86 $key = "quanqiusou_api_rank_{$api_no}_{$lang}_{$day}_" . date('Y-m-d'); 86 $key = "quanqiusou_api_rank_{$api_no}_{$lang}_{$day}_" . date('Y-m-d');
87 $res = Cache::get($key); 87 $res = Cache::get($key);
@@ -379,7 +379,7 @@ class RankDataLogic extends BaseLogic @@ -379,7 +379,7 @@ class RankDataLogic extends BaseLogic
379 379
380 $model = RankData::where('project_id', $project_id)->where('lang', '')->first(); 380 $model = RankData::where('project_id', $project_id)->where('lang', '')->first();
381 if (!$model || $model->updated_date != date('Y-m-d') || $force) { 381 if (!$model || $model->updated_date != date('Y-m-d') || $force) {
382 - $res = $api->getGoogleRank($api_no, 0, 7, $force); 382 + $res = $api->getGoogleRank($api_no, '', 7, $force);
383 if (!$res) { 383 if (!$res) {
384 throw new \Exception("接口数据获取失败,api_no:{$api_no}"); 384 throw new \Exception("接口数据获取失败,api_no:{$api_no}");
385 } 385 }