From ee6b90d18fec96bafa333ca877394af0e1c76ff1 Mon Sep 17 00:00:00 2001 From: koogua Date: Mon, 23 Aug 2021 09:45:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=81=94=E7=B3=BB=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E5=BC=80=E5=90=AF=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Admin/Views/setting/contact.volt | 7 +++ app/Http/Home/Views/partials/footer.volt | 64 ++++++++++++----------- app/Http/Home/Views/partials/js_vars.volt | 1 + db/migrations/20210820064755.php | 5 ++ 4 files changed, 46 insertions(+), 31 deletions(-) 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',