正在显示
2 个修改的文件
包含
12 行增加
和
2 行删除
| @@ -30,10 +30,10 @@ class ServerConfigController extends BaseController | @@ -30,10 +30,10 @@ class ServerConfigController extends BaseController | ||
| 30 | */ | 30 | */ |
| 31 | public function lists(ServerConfigLogic $logic){ | 31 | public function lists(ServerConfigLogic $logic){ |
| 32 | if(isset($this->map['title']) && !empty($this->map['title'])){ | 32 | if(isset($this->map['title']) && !empty($this->map['title'])){ |
| 33 | - $this->map['title'] = ['like','%'.$this->map['title'],'%']; | 33 | + $this->map['title'] = ['like','%'.$this->map['title'].'%']; |
| 34 | } | 34 | } |
| 35 | if(isset($this->map['host']) && !empty($this->map['host'])){ | 35 | if(isset($this->map['host']) && !empty($this->map['host'])){ |
| 36 | - $this->map['host'] = ['like','%'.$this->map['host'],'%']; | 36 | + $this->map['host'] = ['like','%'.$this->map['host'].'%']; |
| 37 | } | 37 | } |
| 38 | $lists = $logic->serviceConfigList($this->map,$this->page,$this->row,$this->order); | 38 | $lists = $logic->serviceConfigList($this->map,$this->page,$this->row,$this->order); |
| 39 | $this->response('success',Code::SUCCESS,$lists); | 39 | $this->response('success',Code::SUCCESS,$lists); |
| @@ -16,6 +16,7 @@ use GuzzleHttp\Exception\GuzzleException; | @@ -16,6 +16,7 @@ use GuzzleHttp\Exception\GuzzleException; | ||
| 16 | use Illuminate\Database\Eloquent\Builder; | 16 | use Illuminate\Database\Eloquent\Builder; |
| 17 | use Illuminate\Database\Eloquent\Collection; | 17 | use Illuminate\Database\Eloquent\Collection; |
| 18 | use Illuminate\Database\Eloquent\Model; | 18 | use Illuminate\Database\Eloquent\Model; |
| 19 | +use Illuminate\Support\Carbon; | ||
| 19 | use Illuminate\Support\Facades\DB; | 20 | use Illuminate\Support\Facades\DB; |
| 20 | 21 | ||
| 21 | class DomainInfoLogic extends BaseLogic | 22 | class DomainInfoLogic extends BaseLogic |
| @@ -51,6 +52,15 @@ class DomainInfoLogic extends BaseLogic | @@ -51,6 +52,15 @@ class DomainInfoLogic extends BaseLogic | ||
| 51 | return $this->success(); | 52 | return $this->success(); |
| 52 | } | 53 | } |
| 53 | 54 | ||
| 55 | + public function getDomainInfo($domain) | ||
| 56 | + { | ||
| 57 | + // 获取域名的开始时间 | ||
| 58 | + $data['domain_start_time'] = Carbon::parse(dns_get_record($domain, DNS_TXT)['0']['entries']['0'])->toDateTimeString(); | ||
| 59 | + // 获取域名的到期时间 | ||
| 60 | + $data['domain_end_time'] = Carbon::parse(dns_get_record($domain, DNS_TXT)['1']['entries']['0'])->toDateTimeString(); | ||
| 61 | + return $this->success($data); | ||
| 62 | + } | ||
| 63 | + | ||
| 54 | /** | 64 | /** |
| 55 | * @remark :验证域名是否存在 | 65 | * @remark :验证域名是否存在 |
| 56 | * @name :verifyDomain | 66 | * @name :verifyDomain |
-
请 注册 或 登录 后发表评论