正在显示
4 个修改的文件
包含
36 行增加
和
2 行删除
| @@ -313,6 +313,8 @@ class DomainInfoLogic extends BaseLogic | @@ -313,6 +313,8 @@ class DomainInfoLogic extends BaseLogic | ||
| 313 | 'amp_type' => $this->param['amp_type'] ?? 0, | 313 | 'amp_type' => $this->param['amp_type'] ?? 0, |
| 314 | 'amp_private_key' => $this->param['amp_key'] ?? '', | 314 | 'amp_private_key' => $this->param['amp_key'] ?? '', |
| 315 | 'amp_private_cert' => $this->param['amp_cert'] ?? '', | 315 | 'amp_private_cert' => $this->param['amp_cert'] ?? '', |
| 316 | + 'not_allow_country'=>json_encode($this->param['not_allow_country'] ?? []), | ||
| 317 | + 'not_allow_ip'=>json_encode($this->param['not_allow_ip'] ?? []), | ||
| 316 | ]; | 318 | ]; |
| 317 | $this->model->edit($data,['id'=>$this->param['id']]); | 319 | $this->model->edit($data,['id'=>$this->param['id']]); |
| 318 | //主站生成证书 | 320 | //主站生成证书 |
| @@ -66,6 +66,8 @@ class EditAmpDomainBt implements ShouldQueue | @@ -66,6 +66,8 @@ class EditAmpDomainBt implements ShouldQueue | ||
| 66 | $api_url_amp = 'http://' . $server_info['domain'] . '/api/createSiteAmp'; | 66 | $api_url_amp = 'http://' . $server_info['domain'] . '/api/createSiteAmp'; |
| 67 | $api_param_amp = [ | 67 | $api_param_amp = [ |
| 68 | 'domain' => $domain_info['domain'], | 68 | 'domain' => $domain_info['domain'], |
| 69 | + 'not_allow_country' => $domain_info['not_allow_country'], | ||
| 70 | + 'not_allow_ip' => $domain_info['not_allow_ip'] | ||
| 69 | ]; | 71 | ]; |
| 70 | if ($domain_info['amp_type'] == 2) { | 72 | if ($domain_info['amp_type'] == 2) { |
| 71 | $api_param_amp['private_key'] = $domain_info['amp_private_key']; | 73 | $api_param_amp['private_key'] = $domain_info['amp_private_key']; |
| @@ -72,7 +72,9 @@ class EditDomainBt implements ShouldQueue | @@ -72,7 +72,9 @@ class EditDomainBt implements ShouldQueue | ||
| 72 | 'cert' => $domain_info['private_cert'], | 72 | 'cert' => $domain_info['private_cert'], |
| 73 | 'rewrite' => $domain_info['extend_config'], | 73 | 'rewrite' => $domain_info['extend_config'], |
| 74 | 'other_domain' => $domain_info['other_domain'], | 74 | 'other_domain' => $domain_info['other_domain'], |
| 75 | - 'is_https' => $domain_info['is_https'] | 75 | + 'is_https' => $domain_info['is_https'], |
| 76 | + 'not_allow_country' => $domain_info['not_allow_country'], | ||
| 77 | + 'not_allow_ip' => $domain_info['not_allow_ip'] | ||
| 76 | ]; | 78 | ]; |
| 77 | } else { | 79 | } else { |
| 78 | $api_url = 'http://' . $server_info['domain'] . '/api/applySsl'; | 80 | $api_url = 'http://' . $server_info['domain'] . '/api/applySsl'; |
| @@ -80,7 +82,9 @@ class EditDomainBt implements ShouldQueue | @@ -80,7 +82,9 @@ class EditDomainBt implements ShouldQueue | ||
| 80 | 'domain' => $domain_info['domain'], | 82 | 'domain' => $domain_info['domain'], |
| 81 | 'rewrite' => $domain_info['extend_config'], | 83 | 'rewrite' => $domain_info['extend_config'], |
| 82 | 'other_domain' => $domain_info['other_domain'], | 84 | 'other_domain' => $domain_info['other_domain'], |
| 83 | - 'is_https' => $domain_info['is_https'] | 85 | + 'is_https' => $domain_info['is_https'], |
| 86 | + 'not_allow_country' => $domain_info['not_allow_country'], | ||
| 87 | + 'not_allow_ip' => $domain_info['not_allow_ip'] | ||
| 84 | ]; | 88 | ]; |
| 85 | } | 89 | } |
| 86 | 90 |
| @@ -107,4 +107,30 @@ class DomainInfo extends Base | @@ -107,4 +107,30 @@ class DomainInfo extends Base | ||
| 107 | $value = Arr::s2a($value); | 107 | $value = Arr::s2a($value); |
| 108 | return $value; | 108 | return $value; |
| 109 | } | 109 | } |
| 110 | + | ||
| 111 | + /** | ||
| 112 | + * 禁止访问国家 | ||
| 113 | + * @param $value | ||
| 114 | + * @return array|mixed | ||
| 115 | + * @author Akun | ||
| 116 | + * @date 2024/07/01 17:05 | ||
| 117 | + */ | ||
| 118 | + public function getNotAllowCountryAttribute($value) | ||
| 119 | + { | ||
| 120 | + $value = Arr::s2a($value); | ||
| 121 | + return $value; | ||
| 122 | + } | ||
| 123 | + | ||
| 124 | + /** | ||
| 125 | + * 禁止访问ip | ||
| 126 | + * @param $value | ||
| 127 | + * @return array|mixed | ||
| 128 | + * @author Akun | ||
| 129 | + * @date 2024/07/01 17:05 | ||
| 130 | + */ | ||
| 131 | + public function getNotAllowIpAttribute($value) | ||
| 132 | + { | ||
| 133 | + $value = Arr::s2a($value); | ||
| 134 | + return $value; | ||
| 135 | + } | ||
| 110 | } | 136 | } |
-
请 注册 或 登录 后发表评论