mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-23 03:50:56 +08:00
增加联系方式开启开关
This commit is contained in:
parent
9815f98ff9
commit
ee6b90d18f
@ -6,6 +6,13 @@
|
||||
<fieldset class="layui-elem-field layui-field-title">
|
||||
<legend>联系方式</legend>
|
||||
</fieldset>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">开启服务</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="enabled" value="1" title="是" {% if contact.enabled == 1 %}checked="checked"{% endif %}>
|
||||
<input type="radio" name="enabled" value="0" title="否" {% if contact.enabled == 0 %}checked="checked"{% endif %}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">微信二维码</label>
|
||||
<div class="layui-inline" style="width:40%;">
|
||||
|
@ -16,35 +16,37 @@
|
||||
<a href="{{ site_info.police_link }}" target="_blank">{{ site_info.police_sn }}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="row contact">
|
||||
{% if contact_info.qq %}
|
||||
{% set link_url = 'https://wpa.qq.com/msgrd?v=3&uin=%s&site=qq&menu=yes'|format(contact_info.qq) %}
|
||||
<a class="qq" href="{{ link_url }}" title="客服QQ:{{ contact_info.qq }}"><span class="iconfont icon-qq"></span></a>
|
||||
{% endif %}
|
||||
{% if contact_info.wechat %}
|
||||
<a class="wechat" href="javascript:" title="微信公众号"><span class="iconfont icon-wechat"></span></a>
|
||||
{% endif %}
|
||||
{% if contact_info.toutiao %}
|
||||
<a class="toutiao" href="javascript:" title="头条号"><span class="iconfont icon-toutiao"></span></a>
|
||||
{% endif %}
|
||||
{% if contact_info.weibo %}
|
||||
{% set link_url = 'https://weibo.com/u/%s'|format(contact_info.weibo) %}
|
||||
<a class="weibo" href="{{ link_url }}" title="微博主页"><span class="iconfont icon-weibo"></span></a>
|
||||
{% endif %}
|
||||
{% if contact_info.zhihu %}
|
||||
{% set link_url = 'https://www.zhihu.com/people/%s'|format(contact_info.zhihu) %}
|
||||
<a class="zhihu" href="{{ link_url }}" title="知乎主页"><span class="iconfont icon-zhihu"></span></a>
|
||||
{% endif %}
|
||||
{% if contact_info.email %}
|
||||
{% set link_url = 'mailto:%s'|format(contact_info.email) %}
|
||||
<a class="mail" href="{{ link_url }}" title="联系邮箱:{{ contact_info.email }}"><span class="iconfont icon-mail"></span></a>
|
||||
{% endif %}
|
||||
{% if contact_info.phone %}
|
||||
<a class="phone" href="javascript:" title="联系电话:{{ contact_info.phone }}"><span class="iconfont icon-phone"></span></a>
|
||||
{% 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) %}
|
||||
<a class="location" href="{{ link_url }}" title="联系地址:{{ contact_info.address }}"><span class="iconfont icon-location"></span></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if contact_info.enabled == 1 %}
|
||||
<div class="row contact">
|
||||
{% if contact_info.qq %}
|
||||
{% set link_url = 'https://wpa.qq.com/msgrd?v=3&uin=%s&site=qq&menu=yes'|format(contact_info.qq) %}
|
||||
<a class="qq" href="{{ link_url }}" title="客服QQ:{{ contact_info.qq }}"><span class="iconfont icon-qq"></span></a>
|
||||
{% endif %}
|
||||
{% if contact_info.wechat %}
|
||||
<a class="wechat" href="javascript:" title="微信公众号"><span class="iconfont icon-wechat"></span></a>
|
||||
{% endif %}
|
||||
{% if contact_info.toutiao %}
|
||||
<a class="toutiao" href="javascript:" title="头条号"><span class="iconfont icon-toutiao"></span></a>
|
||||
{% endif %}
|
||||
{% if contact_info.weibo %}
|
||||
{% set link_url = 'https://weibo.com/u/%s'|format(contact_info.weibo) %}
|
||||
<a class="weibo" href="{{ link_url }}" title="微博主页"><span class="iconfont icon-weibo"></span></a>
|
||||
{% endif %}
|
||||
{% if contact_info.zhihu %}
|
||||
{% set link_url = 'https://www.zhihu.com/people/%s'|format(contact_info.zhihu) %}
|
||||
<a class="zhihu" href="{{ link_url }}" title="知乎主页"><span class="iconfont icon-zhihu"></span></a>
|
||||
{% endif %}
|
||||
{% if contact_info.email %}
|
||||
{% set link_url = 'mailto:%s'|format(contact_info.email) %}
|
||||
<a class="mail" href="{{ link_url }}" title="联系邮箱:{{ contact_info.email }}"><span class="iconfont icon-mail"></span></a>
|
||||
{% endif %}
|
||||
{% if contact_info.phone %}
|
||||
<a class="phone" href="javascript:" title="联系电话:{{ contact_info.phone }}"><span class="iconfont icon-phone"></span></a>
|
||||
{% 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) %}
|
||||
<a class="location" href="{{ link_url }}" title="联系地址:{{ contact_info.address }}"><span class="iconfont icon-location"></span></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
@ -9,6 +9,7 @@
|
||||
};
|
||||
|
||||
window.contact = {
|
||||
enabled: '{{ contact_info.enabled }}',
|
||||
qq: '{{ contact_info.qq }}',
|
||||
wechat: '{{ contact_info.wechat }}',
|
||||
toutiao: '{{ contact_info.toutiao }}',
|
||||
|
@ -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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user