作者 lyh

更新查询所有ip

@@ -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 }