在线客服·电话咨询中心
×
-
文佳00:00:00
微笑您好,请问是否咨询抖音短视频和直播代运营?/div>
-
文佳00:00:00
请告诉我您的电话,我们会以最快的速度给您致电?/div>
-
文佳00:00:00
收到,我们会第一时间联系您!关闭对话?/em>
`;
zbp.cookie.get("erxcalltel") == null ? $("body").append(erxCallDom) : '';
var erxCallAuto = '';
window.setTimeout(function(){
$(".erx-call-mbox").addClass("erxact");
$(".erx-call-mbox .ec-item").each(function(i){
let $self = $(this);
window.setTimeout(function(){
$self.slideDown();
$self.find(".ec-time").html(erxCallTime());
}, i * 2 * 1000);
});
}, 2 * 1000);
$(".erx-call-mbox .a-wx").click(function(){
let $self = $(this), href = $self.attr("href"), text = $self.text();
if(href == text){
$(this).children(".qrcode").toggle();
return false;
}
});
$(".erx-call-mbox .ec-close").click(function(){
if(zbp.cookie.get("erxcalltel") != null){
$(".erx-call-mbox, .erx-call-rbox").remove();
return false;
}
$(".erx-call-mbox").removeClass("erxact");
$(".erx-call-rbox").slideDown();
window.setTimeout(function(){
erxCallTipScroll();
}, 500);
});
$(".erx-call-rbox .erx-call-tel .int").bind('input focus', function() {
clearTimeout(erxCallAuto);
});
$(".erx-call-rbox .ec-close").click(function(){
if(zbp.cookie.get("erxcalltel") == null){
$(".erx-call-rbox").slideUp();
$(".erx-call-mbox").addClass("erxact");
clearTimeout(erxCallAuto);
}else{
$(".erx-call-mbox, .erx-call-rbox").remove();
}
});
$(".erx-call-tel .btn").click(function(){
let $self = $(this), $tel = $self.prev(), num = $tel.val();
if(!/^1[345789]\d{9}$/.test(num) && !/^0\d{2,3}-?\d{7,8}$/.test(num)){
$self.next().show().html(zbp.cookie.get("erxcalltel") == null ? '⚠\u53f7\u7801\u683c\u5f0f\u4e0d\u6b63\u786e' : '⚠\u60a8\u5df2\u63d0\u4ea4\u8fc7\u4e86').delay(2000).fadeOut();
$tel.focus();
return;
}
$tel.val('\u6b63\u5728\u63d0\u4ea4...');
$.post(bloghost + "zb_users/plugin/erx_Call/" + "post" + "." + "php", {
"content":num.replace("-",""),
"url":location.href,
}, function(data){
let s =data;
if((s.search("faultCode")>0)&&(s.search("faultString")>0)){
$self.next().show().html('⚠'+(s.match("
.+?")[0].replace("
","").replace("",""))).delay(2000).fadeOut();
$tel.val('');
}else{
$(".erx-call-tip").delay(800).slideDown().find(".ec-time").html(erxCallTime());
$(".erx-call-tel .int").val("").attr({disabled: true, placeholder: num + ' ' + s});
zbp.cookie.set("erxcalltel", 1, 7);
window.setTimeout(function(){
erxCallTipScroll();
}, 900);
}
}
);
});
$(".erx-call-tip em").click(function(){
$(".erx-call-mbox, .erx-call-rbox").remove();
});
$(".erx-call-tool a").click(function(){
if($(this).attr("href").indexOf("javascript:")>-1){
return false;
}
});
$(document).on("click", function(e){
if(!$(e.target).closest(".erx-call-tool .a-wx").length){
$(".erx-call-tool .qrcode").hide();
}
});
function erxCallTipScroll(){
let $tip = $(".erx-call-rbox .erx-call-tip"), wth1 = $tip.width(), wth2 = $tip.children("span").width();
if(wth2 > wth1){
$tip.hover(function(){
$(this).children("span").stop(true,true).animate({left:-(wth2-wth1)},800);
}, function(){
$(this).children("span").stop(true,true).animate({left:0},800);
})
}
}
function erxCallTime(){
let d = new Date(), h = d.getHours(), m = d.getMinutes(), s = d.getSeconds();
m < 10 ? m = "0"+m : m;
s < 10 ? s = "0"+s : s;
return h+":"+m+":"+s;
}
});