diff --git a/app/Http/Admin/Views/setting/contact.volt b/app/Http/Admin/Views/setting/contact.volt
index 10d1e673..07b4e455 100644
--- a/app/Http/Admin/Views/setting/contact.volt
+++ b/app/Http/Admin/Views/setting/contact.volt
@@ -19,7 +19,16 @@
-
+
+
+
+
@@ -28,13 +37,7 @@
-
-
-
-
@@ -103,6 +106,22 @@
}
});
+ upload.render({
+ elem: '#upload-qq',
+ url: '/admin/upload/icon/img',
+ exts: 'gif|jpg|png',
+ before: function () {
+ layer.load();
+ },
+ done: function (res, index, upload) {
+ $('input[name=qq]').val(res.data.url);
+ layer.closeAll('loading');
+ },
+ error: function (index, upload) {
+ layer.msg('上传文件失败', {icon: 2});
+ }
+ });
+
upload.render({
elem: '#upload-toutiao',
url: '/admin/upload/icon/img',
diff --git a/app/Http/Home/Views/partials/footer.volt b/app/Http/Home/Views/partials/footer.volt
index 594fc247..7c4a8713 100644
--- a/app/Http/Home/Views/partials/footer.volt
+++ b/app/Http/Home/Views/partials/footer.volt
@@ -24,13 +24,12 @@
{% 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.qq %}
+
+ {% endif %}
{% if contact_info.toutiao %}
{% endif %}
diff --git a/public/static/home/js/fixbar.js b/public/static/home/js/fixbar.js
index d3617241..11e3159e 100644
--- a/public/static/home/js/fixbar.js
+++ b/public/static/home/js/fixbar.js
@@ -3,10 +3,6 @@ layui.use(['jquery', 'helper', 'util'], function () {
var $ = layui.jquery;
var util = layui.util;
- var showQQDialog = function () {
- window.open('https://wpa.qq.com/msgrd?v=3&uin=' + window.contact.qq + '&site=qq&menu=yes');
- }
-
var showWechatCode = function () {
var content = '
';
layer.open({
@@ -18,6 +14,17 @@ layui.use(['jquery', 'helper', 'util'], function () {
});
}
+ var showQQCode = function () {
+ var content = '
';
+ layer.open({
+ type: 1,
+ title: false,
+ closeBtn: 0,
+ shadeClose: true,
+ content: content,
+ });
+ }
+
var showTouTiaoCode = function () {
var content = '

';
layer.open({
@@ -31,13 +38,6 @@ layui.use(['jquery', 'helper', 'util'], function () {
var bars = [];
- if (window.contact.qq) {
- bars.push({
- type: 'qq',
- icon: 'layui-icon-login-qq',
- });
- }
-
if (window.contact.wechat) {
bars.push({
type: 'wechat',
@@ -45,13 +45,20 @@ layui.use(['jquery', 'helper', 'util'], function () {
});
}
+ if (window.contact.qq) {
+ bars.push({
+ type: 'qq',
+ icon: 'layui-icon-login-qq',
+ });
+ }
+
util.fixbar({
bars: bars,
click: function (type) {
- if (type === 'qq') {
- showQQDialog();
- } else if (type === 'wechat') {
+ if (type === 'wechat') {
showWechatCode();
+ } else if (type === 'qq') {
+ showQQCode();
}
}
});
@@ -60,6 +67,10 @@ layui.use(['jquery', 'helper', 'util'], function () {
showWechatCode();
});
+ $('.icon-qq').on('click', function () {
+ showQQCode();
+ });
+
$('.icon-toutiao').on('click', function () {
showTouTiaoCode();
});