diff --git a/app/lib/deploy/btpanel.php b/app/lib/deploy/btpanel.php index 596bcac..3aed11a 100644 --- a/app/lib/deploy/btpanel.php +++ b/app/lib/deploy/btpanel.php @@ -26,7 +26,7 @@ class btpanel implements DeployInterface $path = '/config?action=get_config'; $response = $this->request($path, []); $result = json_decode($response, true); - if (isset($result['status']) && $result['status'] == 1) { + if (isset($result['status']) && ($result['status']==1 || isset($result['sites_path']))) { return true; } else { throw new Exception(isset($result['msg']) ? $result['msg'] : '面板地址无法连接'); diff --git a/app/lib/dns/cloudflare.php b/app/lib/dns/cloudflare.php index e806198..d515675 100644 --- a/app/lib/dns/cloudflare.php +++ b/app/lib/dns/cloudflare.php @@ -75,10 +75,10 @@ class cloudflare implements DnsInterface if ($data) { $list = []; foreach ($data['result'] as $row) { - $name = $row['zone_name'] == $row['name'] ? '@' : str_replace('.'.$row['zone_name'], '', $row['name']); + $name = $this->domain == $row['name'] ? '@' : str_replace('.'.$this->domain, '', $row['name']); $list[] = [ 'RecordId' => $row['id'], - 'Domain' => $row['zone_name'], + 'Domain' => $this->domain, 'Name' => $name, 'Type' => $row['type'], 'Value' => $row['content'], @@ -107,11 +107,11 @@ class cloudflare implements DnsInterface { $data = $this->send_reuqest('GET', '/zones/'.$this->domainid.'/dns_records/'.$RecordId); if ($data) { - $name = $data['result']['zone_name'] == $data['result']['name'] ? '@' : str_replace('.' . $data['result']['zone_name'], '', $data['result']['name']); + $name = $this->domain == $data['result']['name'] ? '@' : str_replace('.' . $this->domain, '', $data['result']['name']); return [ 'RecordId' => $data['result']['id'], - 'Domain' => $data['result']['zone_name'], - 'Name' => str_replace('.'.$data['result']['zone_name'], '', $data['result']['name']), + 'Domain' => $this->domain, + 'Name' => $name, 'Type' => $data['result']['type'], 'Value' => $data['result']['content'], 'Line' => $data['result']['proxied'] ? '1' : '0',