正在显示
1 个修改的文件
包含
2 行增加
和
0 行删除
| @@ -171,11 +171,13 @@ class ServersIpController extends BaseController | @@ -171,11 +171,13 @@ class ServersIpController extends BaseController | ||
| 171 | $serversIpModel = new ServersIpModel(); | 171 | $serversIpModel = new ServersIpModel(); |
| 172 | $this->map['status'] = 0; | 172 | $this->map['status'] = 0; |
| 173 | $list = $serversIpModel->list($this->map); | 173 | $list = $serversIpModel->list($this->map); |
| 174 | + if(!empty($list)){ | ||
| 174 | foreach ($list as $v){ | 175 | foreach ($list as $v){ |
| 175 | $position = strpos($v['domain'], '.'); | 176 | $position = strpos($v['domain'], '.'); |
| 176 | $result = substr($v['domain'], 0, $position); | 177 | $result = substr($v['domain'], 0, $position); |
| 177 | $data[] = ['记录类型'=>'A','主机记录'=>$result,'解析线路'=>'默认','记录值'=>$v['ip'],'MAX优先级'=>'','TTL值'=>600,'状态(暂停/启用)'=>'启用','备注'=>$info['server_name']]; | 178 | $data[] = ['记录类型'=>'A','主机记录'=>$result,'解析线路'=>'默认','记录值'=>$v['ip'],'MAX优先级'=>'','TTL值'=>600,'状态(暂停/启用)'=>'启用','备注'=>$info['server_name']]; |
| 178 | } | 179 | } |
| 180 | + } | ||
| 179 | $this->response('success',Code::SUCCESS,$data); | 181 | $this->response('success',Code::SUCCESS,$data); |
| 180 | } | 182 | } |
| 181 | } | 183 | } |
-
请 注册 或 登录 后发表评论