Merge branch 'master-server' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
1 个修改的文件
包含
7 行增加
和
1 行删除
| @@ -38,9 +38,15 @@ class ServersIpController extends BaseController | @@ -38,9 +38,15 @@ class ServersIpController extends BaseController | ||
| 38 | $this->response('當前服務器不存在',Code::SERVER_ERROR); | 38 | $this->response('當前服務器不存在',Code::SERVER_ERROR); |
| 39 | } | 39 | } |
| 40 | $serversIpModel = new ServersIpModel(); | 40 | $serversIpModel = new ServersIpModel(); |
| 41 | - $this->map['total'] = ['<',$info['ip_total']]; | ||
| 42 | $this->map['status'] = 0; | 41 | $this->map['status'] = 0; |
| 43 | $data = $serversIpModel->list($this->map); | 42 | $data = $serversIpModel->list($this->map); |
| 43 | + foreach ($data as $k => $v){ | ||
| 44 | + $v['is_optional'] = 0;//是否可选择 | ||
| 45 | + if($v['total'] >= $info['ip_total']){ | ||
| 46 | + $v['is_optional'] = 1;//不可选择 | ||
| 47 | + } | ||
| 48 | + $data[$k] = $v; | ||
| 49 | + } | ||
| 44 | $this->response('success',Code::SUCCESS,$data); | 50 | $this->response('success',Code::SUCCESS,$data); |
| 45 | } | 51 | } |
| 46 | 52 |
-
请 注册 或 登录 后发表评论