mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-07-19 22:52:59 +08:00
联系方式增加抖音二维码
This commit is contained in:
parent
5b30d5d880
commit
cdc8074f88
29
app/Console/Migrations/V20241110191316.php
Normal file
29
app/Console/Migrations/V20241110191316.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (c) 2024 深圳市酷瓜软件有限公司
|
||||
* @license https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* @link https://www.koogua.com
|
||||
*/
|
||||
|
||||
namespace App\Console\Migrations;
|
||||
|
||||
class V20241110191316 extends Migration
|
||||
{
|
||||
|
||||
public function run()
|
||||
{
|
||||
$this->handleContactSettings();
|
||||
}
|
||||
|
||||
protected function handleContactSettings()
|
||||
{
|
||||
$setting = [
|
||||
'section' => 'contact',
|
||||
'item_key' => 'douyin',
|
||||
'item_value' => '',
|
||||
];
|
||||
|
||||
$this->saveSetting($setting);
|
||||
}
|
||||
|
||||
}
|
@ -40,6 +40,15 @@
|
||||
<button class="layui-btn" type="button" id="upload-toutiao">上传</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">抖音二维码</label>
|
||||
<div class="layui-inline" style="width:40%;">
|
||||
<input class="layui-input" type="text" name="douyin" placeholder="请确保存储已正确配置" value="{{ contact.douyin }}">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn" type="button" id="upload-douyin">上传</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">微博帐号</label>
|
||||
<div class="layui-input-block">
|
||||
@ -138,6 +147,22 @@
|
||||
}
|
||||
});
|
||||
|
||||
upload.render({
|
||||
elem: '#upload-douyin',
|
||||
url: '/admin/upload/icon/img',
|
||||
exts: 'gif|jpg|png',
|
||||
before: function () {
|
||||
layer.load();
|
||||
},
|
||||
done: function (res, index, upload) {
|
||||
$('input[name=douyin]').val(res.data.url);
|
||||
layer.closeAll('loading');
|
||||
},
|
||||
error: function (index, upload) {
|
||||
layer.msg('上传文件失败', {icon: 2});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
@ -33,6 +33,9 @@
|
||||
{% if contact_info.toutiao %}
|
||||
<a class="toutiao" href="javascript:" title="头条号"><span class="iconfont icon-toutiao"></span></a>
|
||||
{% endif %}
|
||||
{% if contact_info.douyin %}
|
||||
<a class="douyin" href="javascript:" title="抖音号"><span class="iconfont icon-douyin"></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>
|
||||
|
@ -13,6 +13,7 @@
|
||||
qq: '{{ contact_info.qq }}',
|
||||
wechat: '{{ contact_info.wechat }}',
|
||||
toutiao: '{{ contact_info.toutiao }}',
|
||||
douyin: '{{ contact_info.douyin }}',
|
||||
weibo: '{{ contact_info.weibo }}',
|
||||
zhihu: '{{ contact_info.zhihu }}',
|
||||
phone: '{{ contact_info.phone }}',
|
||||
|
@ -36,6 +36,17 @@ layui.use(['jquery', 'helper', 'util'], function () {
|
||||
});
|
||||
}
|
||||
|
||||
var showDouYinCode = function () {
|
||||
var content = '<div class="qrcode"><img src="' + window.contact.douyin + '" alt="扫码关注"></div>';
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
shadeClose: true,
|
||||
content: content,
|
||||
});
|
||||
}
|
||||
|
||||
var bars = [];
|
||||
|
||||
if (window.contact.wechat) {
|
||||
@ -75,4 +86,8 @@ layui.use(['jquery', 'helper', 'util'], function () {
|
||||
showTouTiaoCode();
|
||||
});
|
||||
|
||||
$('.icon-douyin').on('click', function () {
|
||||
showDouYinCode();
|
||||
});
|
||||
|
||||
});
|
@ -1,18 +1,22 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 2760791 */
|
||||
src: url('iconfont.woff2?t=1716885700001') format('woff2'),
|
||||
url('iconfont.woff?t=1716885700001') format('woff'),
|
||||
url('iconfont.ttf?t=1716885700001') format('truetype');
|
||||
src: url('iconfont.woff2?t=1731240803792') format('woff2'),
|
||||
url('iconfont.woff?t=1731240803792') format('woff'),
|
||||
url('iconfont.ttf?t=1731240803792') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont", serif !important;
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-douyin:before {
|
||||
content: "\e610";
|
||||
}
|
||||
|
||||
.icon-pdf:before {
|
||||
content: "\e7b8";
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user