diff --git a/app/Http/Admin/Views/setting/contact.volt b/app/Http/Admin/Views/setting/contact.volt index 4e83f8a2..94973dcb 100644 --- a/app/Http/Admin/Views/setting/contact.volt +++ b/app/Http/Admin/Views/setting/contact.volt @@ -6,6 +6,13 @@
联系方式
+
+ +
+ + +
+
diff --git a/app/Http/Home/Views/partials/footer.volt b/app/Http/Home/Views/partials/footer.volt index b67b94ef..2435a520 100644 --- a/app/Http/Home/Views/partials/footer.volt +++ b/app/Http/Home/Views/partials/footer.volt @@ -16,35 +16,37 @@ {{ site_info.police_sn }} {% endif %}
-
- {% if contact_info.qq %} - {% set link_url = 'https://wpa.qq.com/msgrd?v=3&uin=%s&site=qq&menu=yes'|format(contact_info.qq) %} - - {% endif %} - {% if contact_info.wechat %} - - {% endif %} - {% if contact_info.toutiao %} - - {% endif %} - {% if contact_info.weibo %} - {% set link_url = 'https://weibo.com/u/%s'|format(contact_info.weibo) %} - - {% endif %} - {% if contact_info.zhihu %} - {% set link_url = 'https://www.zhihu.com/people/%s'|format(contact_info.zhihu) %} - - {% endif %} - {% if contact_info.email %} - {% set link_url = 'mailto:%s'|format(contact_info.email) %} - - {% endif %} - {% if contact_info.phone %} - - {% endif %} - {% if contact_info.address %} - {% set link_url = 'https://map.baidu.com/search/%s?querytype=s&wd=%s'|format(contact_info.address,contact_info.address) %} - - {% endif %} -
+ {% if contact_info.enabled == 1 %} +
+ {% if contact_info.qq %} + {% set link_url = 'https://wpa.qq.com/msgrd?v=3&uin=%s&site=qq&menu=yes'|format(contact_info.qq) %} + + {% endif %} + {% if contact_info.wechat %} + + {% endif %} + {% if contact_info.toutiao %} + + {% endif %} + {% if contact_info.weibo %} + {% set link_url = 'https://weibo.com/u/%s'|format(contact_info.weibo) %} + + {% endif %} + {% if contact_info.zhihu %} + {% set link_url = 'https://www.zhihu.com/people/%s'|format(contact_info.zhihu) %} + + {% endif %} + {% if contact_info.email %} + {% set link_url = 'mailto:%s'|format(contact_info.email) %} + + {% endif %} + {% if contact_info.phone %} + + {% endif %} + {% if contact_info.address %} + {% set link_url = 'https://map.baidu.com/search/%s?querytype=s&wd=%s'|format(contact_info.address,contact_info.address) %} + + {% endif %} +
+ {% endif %}
\ No newline at end of file diff --git a/app/Http/Home/Views/partials/js_vars.volt b/app/Http/Home/Views/partials/js_vars.volt index f66dcc30..14bd81cd 100644 --- a/app/Http/Home/Views/partials/js_vars.volt +++ b/app/Http/Home/Views/partials/js_vars.volt @@ -9,6 +9,7 @@ }; window.contact = { + enabled: '{{ contact_info.enabled }}', qq: '{{ contact_info.qq }}', wechat: '{{ contact_info.wechat }}', toutiao: '{{ contact_info.toutiao }}', diff --git a/db/migrations/20210820064755.php b/db/migrations/20210820064755.php index 69769783..657de33f 100644 --- a/db/migrations/20210820064755.php +++ b/db/migrations/20210820064755.php @@ -18,6 +18,11 @@ final class V20210820064755 extends AbstractMigration protected function handleContactSetting() { $rows = [ + [ + 'section' => 'contact', + 'item_key' => 'enabled', + 'item_value' => '0', + ], [ 'section' => 'contact', 'item_key' => 'qq',