mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-22 03:32:47 +08:00
fixbar增加电话图标
This commit is contained in:
parent
123e1ec97f
commit
2a1b4b69fd
@ -1,4 +1,4 @@
|
|||||||
layui.use(['jquery', 'helper', 'util'], function () {
|
layui.use(['jquery', 'util'], function () {
|
||||||
|
|
||||||
var $ = layui.jquery;
|
var $ = layui.jquery;
|
||||||
var util = layui.util;
|
var util = layui.util;
|
||||||
@ -47,6 +47,17 @@ layui.use(['jquery', 'helper', 'util'], function () {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var showPhoneCode = function () {
|
||||||
|
var content = '<div class="layui-font-32 layui-font-red layui-padding-5">' + window.contact.phone + '</div>';
|
||||||
|
layer.open({
|
||||||
|
type: 1,
|
||||||
|
title: false,
|
||||||
|
closeBtn: 0,
|
||||||
|
shadeClose: true,
|
||||||
|
content: content,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
var bars = [];
|
var bars = [];
|
||||||
|
|
||||||
if (window.contact.wechat) {
|
if (window.contact.wechat) {
|
||||||
@ -63,6 +74,13 @@ layui.use(['jquery', 'helper', 'util'], function () {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (window.contact.phone) {
|
||||||
|
bars.push({
|
||||||
|
type: 'phone',
|
||||||
|
content: '<i class="iconfont icon-phone layui-font-30"></i>',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
util.fixbar({
|
util.fixbar({
|
||||||
bars: bars,
|
bars: bars,
|
||||||
click: function (type) {
|
click: function (type) {
|
||||||
@ -70,24 +88,30 @@ layui.use(['jquery', 'helper', 'util'], function () {
|
|||||||
showWechatCode();
|
showWechatCode();
|
||||||
} else if (type === 'qq') {
|
} else if (type === 'qq') {
|
||||||
showQQCode();
|
showQQCode();
|
||||||
|
} else if (type === 'phone') {
|
||||||
|
showPhoneCode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.icon-wechat').on('click', function () {
|
$('.contact > .wechat').on('click', function () {
|
||||||
showWechatCode();
|
showWechatCode();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.icon-qq').on('click', function () {
|
$('.contact > .qq').on('click', function () {
|
||||||
showQQCode();
|
showQQCode();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.icon-toutiao').on('click', function () {
|
$('.contact > .toutiao').on('click', function () {
|
||||||
showTouTiaoCode();
|
showTouTiaoCode();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.icon-douyin').on('click', function () {
|
$('.contact > .douyin').on('click', function () {
|
||||||
showDouYinCode();
|
showDouYinCode();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.contact > .phone').on('click', function () {
|
||||||
|
showPhoneCode();
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
Loading…
x
Reference in New Issue
Block a user