From 0d1d7d3c67a427b81edce8ce0325ae39b1787f56 Mon Sep 17 00:00:00 2001 From: net909 Date: Wed, 7 Aug 2024 14:05:44 +0800 Subject: [PATCH] update --- app/lib/OptimizeService.php | 6 +++++- app/lib/dns/baidu.php | 1 - app/lib/dns/dnspod.php | 3 ++- app/view/domain/record.html | 2 +- app/view/optimizeip/opipset.html | 4 ++-- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/lib/OptimizeService.php b/app/lib/OptimizeService.php index 1f125b9..10c4aeb 100644 --- a/app/lib/OptimizeService.php +++ b/app/lib/OptimizeService.php @@ -21,7 +21,9 @@ class OptimizeService private $del_num = 0; public static function get_license($api, $key){ - if($api == 1){ + if($api == 2){ + throw new Exception('当前接口暂不支持'); + }elseif($api == 1){ $url = 'https://api.hostmonit.com/get_license?license='.$key; }else{ $url = 'https://monitor.gacjie.cn/api/client/get_account_integral?license='.$key; @@ -40,6 +42,8 @@ class OptimizeService public function get_ip_address($cdn_type = 1, $ip_type = 'v4'){ $api = config_get('optimize_ip_api', 0); if($api == 1){ + $url = 'https://api.345673.xyz/get_data'; + }elseif($api == 1){ $url = 'https://api.hostmonit.com/get_optimization_ip'; }else{ $url = 'https://monitor.gacjie.cn/api/client/get_ip_address'; diff --git a/app/lib/dns/baidu.php b/app/lib/dns/baidu.php index f9f40ae..dc2ca1a 100644 --- a/app/lib/dns/baidu.php +++ b/app/lib/dns/baidu.php @@ -49,7 +49,6 @@ class baidu implements DnsInterface { //获取解析记录列表 public function getDomainRecords($PageNumber=1, $PageSize=20, $KeyWord = null, $SubDomain = null, $Value = null, $Type = null, $Line = null, $Status = null){ - $marker = cookie('baidu_record_marker'); $query = ['rr' => $KeyWord]; if(!isNullOrEmpty(($SubDomain))){ $param['rr'] = $SubDomain; diff --git a/app/lib/dns/dnspod.php b/app/lib/dns/dnspod.php index 12483bf..670826e 100644 --- a/app/lib/dns/dnspod.php +++ b/app/lib/dns/dnspod.php @@ -210,7 +210,8 @@ class dnspod implements DnsInterface { private function processLineList(&$list, $line_list, $parent){ foreach($line_list as $row){ - if(!isNullOrEmpty($row['LineId']) && $row['Useful'] && !isset($list[$row['LineId']])){ + if(isNullOrEmpty($row['LineId'])) $row['LineId'] = 'N.'.$row['LineName']; + if($row['Useful'] && !isset($list[$row['LineId']])){ $list[$row['LineId']] = ['name'=>$row['LineName'], 'parent'=>$parent]; if($row['SubGroup']){ $this->processLineList($list, $row['SubGroup'], $row['LineId']); diff --git a/app/view/domain/record.html b/app/view/domain/record.html index 78991c4..5645f5a 100644 --- a/app/view/domain/record.html +++ b/app/view/domain/record.html @@ -372,7 +372,7 @@ function changeLine(obj, elem){ if($(obj).find("option:selected").text() == '子集线路(非必填)') return; var tempLine = recordLine.filter((x) => x.parent == line) if(tempLine.length > 0){ - var option = ''; + var option = line.substr(0,2) == 'N.' ? '' : ''; $.each(tempLine, function(index, item){ option += ''; }) diff --git a/app/view/optimizeip/opipset.html b/app/view/optimizeip/opipset.html index 136e05f..8eb5d93 100644 --- a/app/view/optimizeip/opipset.html +++ b/app/view/optimizeip/opipset.html @@ -13,7 +13,7 @@

使用说明

-

  • 数据接口:GacJieMonitor 数据接口支持CloudFlare、CloudFront、Gcore;HostMonit 只支持CloudFlare。
  • +

  • 数据接口:GacJieMonitor 数据接口支持CloudFlare、CloudFront、Gcore;HostMonit 只支持CloudFlare;345673.xyz 只支持CloudFlare。
  • 接口密钥:默认o1zrmHAF为免费KEY可永久免费使用。
  • 计划任务:将以下命令添加到计划任务,周期设置为15分钟以上
  • cd {:app()->getRootPath()} && php think opiptask

    @@ -27,7 +27,7 @@
    -
    +