|
@@ -60,6 +60,11 @@ HTML
|
|
|
$form->text('contact_number')->value($distInfo->contact_number);
|
|
|
$form->text('service_hotline')->value($distInfo->service_hotline);
|
|
|
$form->text('whats_app')->value($distInfo->whats_app);
|
|
|
+ $form->text('facebook')->value($distInfo->facebook);
|
|
|
+ $form->text('instagram')->value($distInfo->instagram);
|
|
|
+ $form->text('youtube')->value($distInfo->youtube);
|
|
|
+ $form->text('linkedin')->value($distInfo->linkedin);
|
|
|
+ $form->text('tiktok')->value($distInfo->tiktok);
|
|
|
$form->text('copy_right')->value($distInfo->copy_right);
|
|
|
$form->text('seo_title')->value($distInfo->seo_title)->required();
|
|
|
$form->text('seo_keywords')->value($distInfo->seo_keywords);
|
|
@@ -80,6 +85,7 @@ HTML
|
|
|
if (!in_array($domainType, [0,1])) {
|
|
|
return $form->response()->error('Invalid argument');
|
|
|
}
|
|
|
+ /*
|
|
|
if ($domainType == 1) {
|
|
|
if (str_starts_with($customDomain,env('TOP_DOMAIN'))) {
|
|
|
return $form->response()->error('Error in domain format');
|
|
@@ -87,7 +93,8 @@ HTML
|
|
|
if (!isDomainOnly($customDomain)) {
|
|
|
return $form->response()->error('Error in domain format');
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
+ $customDomain = $this->removeHttpAndPort($customDomain);
|
|
|
DistAdminDistributor::updateDomain($domainType,$customDomain);
|
|
|
|
|
|
//站点配置
|
|
@@ -96,7 +103,6 @@ HTML
|
|
|
return $form->response()->success('Success');
|
|
|
}
|
|
|
|
|
|
-
|
|
|
public function upload()
|
|
|
{
|
|
|
$disk = $this->disk('oss');
|
|
@@ -120,5 +126,18 @@ HTML
|
|
|
: $this->responseErrorMessage('文件上传失败');
|
|
|
}
|
|
|
|
|
|
+ private function removeHttpAndPort($url) {
|
|
|
+ // 使用正则表达式去除 http:// 和 https://
|
|
|
+ $url = preg_replace('#^https?://#', '', $url);
|
|
|
+ // 使用正则表达式去除端口号
|
|
|
+ $url = preg_replace('#:\d+/#', '/', $url);
|
|
|
+ $url = preg_replace('#:\d+$#', '', $url);
|
|
|
+ $url = trim($url);
|
|
|
+ $url = trim($url,'/');
|
|
|
+ $url = trim($url,'\\');
|
|
|
+ return $url;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|