正在显示
3 个修改的文件
包含
9 行增加
和
5 行删除
| @@ -293,7 +293,7 @@ class OptimizationReportController extends BaseController | @@ -293,7 +293,7 @@ class OptimizationReportController extends BaseController | ||
| 293 | $flg_ext = $this->getExtFlag($ext_projects, $domain, $api_no); | 293 | $flg_ext = $this->getExtFlag($ext_projects, $domain, $api_no); |
| 294 | $ext_domain = str_replace('www.', '', $this->getExtendProjects($api_no)['ext'] ?? '');//关联域名 | 294 | $ext_domain = str_replace('www.', '', $this->getExtendProjects($api_no)['ext'] ?? '');//关联域名 |
| 295 | //关联域名 | 295 | //关联域名 |
| 296 | - $relate_domain = str_replace('www.', '', InquiryRelateDomain::getRelateDomain($domain)['globalso_domain']??""); | 296 | + $relate_domain = str_replace('www.', '', InquiryRelateDomain::getRelateDomain($domain, 'globalso_domain')); |
| 297 | //AI站点域名 | 297 | //AI站点域名 |
| 298 | $ai_projects = $this->getAiProjects()['data'] ?? []; | 298 | $ai_projects = $this->getAiProjects()['data'] ?? []; |
| 299 | $flg_ai = $this->getAiFlag($ai_projects, $domain); | 299 | $flg_ai = $this->getAiFlag($ai_projects, $domain); |
| @@ -235,7 +235,7 @@ class RankDataLogic extends BaseLogic | @@ -235,7 +235,7 @@ class RankDataLogic extends BaseLogic | ||
| 235 | $ext_domain = str_replace('www.', '', $this->getExtendProjects($api_no)['ext'] ?? ''); | 235 | $ext_domain = str_replace('www.', '', $this->getExtendProjects($api_no)['ext'] ?? ''); |
| 236 | $main_domain = str_replace('www.', '', $this->getExtendProjects($api_no)['url'] ?? ''); | 236 | $main_domain = str_replace('www.', '', $this->getExtendProjects($api_no)['url'] ?? ''); |
| 237 | //关联域名 | 237 | //关联域名 |
| 238 | - $relate_domain = str_replace('www.', '', InquiryRelateDomain::getRelateDomain($domain)['globalso_domain']??""); | 238 | + $relate_domain = str_replace('www.', '', InquiryRelateDomain::getRelateDomain($domain, 'globalso_domain')); |
| 239 | //AI站点域名 | 239 | //AI站点域名 |
| 240 | $ai_projects = $this->getAiProjects()['data'] ?? []; | 240 | $ai_projects = $this->getAiProjects()['data'] ?? []; |
| 241 | $flg_ai = $this->getAiFlag($ai_projects, $domain); | 241 | $flg_ai = $this->getAiFlag($ai_projects, $domain); |
| @@ -28,8 +28,8 @@ class InquiryRelateDomain extends Base | @@ -28,8 +28,8 @@ class InquiryRelateDomain extends Base | ||
| 28 | * @author zbj | 28 | * @author zbj |
| 29 | * @date 2025/4/12 | 29 | * @date 2025/4/12 |
| 30 | */ | 30 | */ |
| 31 | - public static function getRelateDomain($domain){ | ||
| 32 | - $list_cache_key = 'RelateDomainList'; | 31 | + public static function getRelateDomain($domain, $k = 'domain'){ |
| 32 | + $list_cache_key = 'RelateDomainList_' . $k; | ||
| 33 | $data = Cache::get($list_cache_key); | 33 | $data = Cache::get($list_cache_key); |
| 34 | if(!$data){ | 34 | if(!$data){ |
| 35 | $data = []; | 35 | $data = []; |
| @@ -41,7 +41,11 @@ class InquiryRelateDomain extends Base | @@ -41,7 +41,11 @@ class InquiryRelateDomain extends Base | ||
| 41 | $res = Arr::s2a($res); | 41 | $res = Arr::s2a($res); |
| 42 | $arr = []; | 42 | $arr = []; |
| 43 | foreach ($res['data']['data'] as $item){ | 43 | foreach ($res['data']['data'] as $item){ |
| 44 | - $arr[$item['domain']] = $item['globalso_domain']; | 44 | + if($k == 'domain'){ |
| 45 | + $arr[$item['domain']] = $item['globalso_domain']; | ||
| 46 | + }else{ | ||
| 47 | + $arr[$item['globalso_domain']] = $item['domain']; | ||
| 48 | + } | ||
| 45 | } | 49 | } |
| 46 | $data = array_merge($data, $arr); | 50 | $data = array_merge($data, $arr); |
| 47 | if ($res['data']['last_page'] == $page) { | 51 | if ($res['data']['last_page'] == $page) { |
-
请 注册 或 登录 后发表评论