合并分支 'akun' 到 'master'
Akun 查看合并请求 !739
正在显示
1 个修改的文件
包含
12 行增加
和
1 行删除
| @@ -198,6 +198,17 @@ class DomainInfoLogic extends BaseLogic | @@ -198,6 +198,17 @@ class DomainInfoLogic extends BaseLogic | ||
| 198 | } | 198 | } |
| 199 | } | 199 | } |
| 200 | 200 | ||
| 201 | + $not_allow_ip = array_filter($this->param['not_allow_ip'] ?? []); | ||
| 202 | + if($not_allow_ip){ | ||
| 203 | + //判断禁止访问IP是否填写正确 | ||
| 204 | + foreach ($not_allow_ip as $vn){ | ||
| 205 | + $vn_count = count(explode('.',$vn)); | ||
| 206 | + if($vn_count != 4){ | ||
| 207 | + $this->fail('禁止访问IP填写有误'); | ||
| 208 | + } | ||
| 209 | + } | ||
| 210 | + } | ||
| 211 | + | ||
| 201 | //保存301跳转数据+其他域名 | 212 | //保存301跳转数据+其他域名 |
| 202 | $data = [ | 213 | $data = [ |
| 203 | 'other_domain'=>json_encode(array_filter($this->param['other_domain'] ?? [])), | 214 | 'other_domain'=>json_encode(array_filter($this->param['other_domain'] ?? [])), |
| @@ -211,7 +222,7 @@ class DomainInfoLogic extends BaseLogic | @@ -211,7 +222,7 @@ class DomainInfoLogic extends BaseLogic | ||
| 211 | 'amp_private_key' => $this->param['amp_key'] ?? '', | 222 | 'amp_private_key' => $this->param['amp_key'] ?? '', |
| 212 | 'amp_private_cert' => $this->param['amp_cert'] ?? '', | 223 | 'amp_private_cert' => $this->param['amp_cert'] ?? '', |
| 213 | 'not_allow_country'=>json_encode(array_filter($this->param['not_allow_country'] ?? [])), | 224 | 'not_allow_country'=>json_encode(array_filter($this->param['not_allow_country'] ?? [])), |
| 214 | - 'not_allow_ip'=>json_encode(array_filter($this->param['not_allow_ip'] ?? [])), | 225 | + 'not_allow_ip'=>json_encode($not_allow_ip), |
| 215 | 'is_redirect' => $this->param['is_redirect'] ?? 0, | 226 | 'is_redirect' => $this->param['is_redirect'] ?? 0, |
| 216 | ]; | 227 | ]; |
| 217 | $this->model->edit($data,['id'=>$this->param['id']]); | 228 | $this->model->edit($data,['id'=>$this->param['id']]); |
-
请 注册 或 登录 后发表评论