if (!window.jQuery) {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = '//style.51sole.com/masterwebsite/js/jquery-1.9.1.min.js';
document.body.appendChild(script);
}
window.addEventListener('load', function () {
$("body").append(`
![](//style.51sole.com/masterwebsite/activity/20240308/images/succeed.png)
线索提交成功
扫码添加微信
为您提供一对一专人服务
![]()
`);
$("body").append(`
`);
var _showcode='False';
var regtel = /1[3,4,5,6,7,8,9]{1}[0-9]{9}|(\d{2}-)?\d{3,4}-\d{7,8}|[48]00-\d{3,4}-\d{3,4}/;
$(function () {
// 同意服务条款
$(".agreeBox .check-box").click(function(){
if(!$(this).hasClass("checked")){
$(".agreeBox p").css("opacity",0);
$(this).addClass("checked");
if($(this).parents("#fixLjxjDialog").length>0){
$("#sendxj2").removeAttr("disabled");
}else{
$("#sendxj2").removeAttr("disabled");
}
}else{
$(".agreeBox p").css("opacity",1);
$(".agreeBox .check-box").removeClass("checked");
if($(this).parents("#fixLjxjDialog").length>0){
$("#sendxj2").attr("disabled","disabled");
}else{
$("#sendxj2").attr("disabled","disabled");
}
}
return false
});
if (!window.layer) {
$("body").append('');
}
if ($(".footerFixedClientInfo").length) {
$("body").css("padding-bottom", "86px");
}
$(".footerFixedClientClose").click(function(){
$(".footerFixedClientInfo").hide();
$("body").css("padding-bottom",0)
});
$("#getfooterFixedInfoCallPhone").click(function () {
showDialog("fixQuickCallBackBox");
});
$("#getfooterFixedInfoCodeBtn").click(function () {
if ($("#getfooterFixedInfoCodeBtn").hasClass("disabled")) {
return false;
}
var countdown = 60; // 设置倒计时时间(秒)
var tel = $("#footerFixedInfoTel").val();
if (tel == "") {
layer.msg("请输入手机号!", {
icon: 2
});
$("#footerFixedInfoTel").focus();
return false;
}
if (!regtel.test(tel)) {
layer.msg("请输入正确的手机号!", {
icon: 3
});
return false;
}
// 禁用按钮防止重复点击
$("#getfooterFixedInfoCodeBtn").addClass("disabled").text(countdown + " 秒后重新获取");
var timer = setInterval(function () {
if (countdown > 0) {
countdown--;
$("#getfooterFixedInfoCodeBtn").text(countdown + " 秒后重新获取");
} else {
// 倒计时结束,清除计时器,并启用按钮,并恢复按钮文本
clearInterval(timer);
$("#getfooterFixedInfoCodeBtn").removeClass("disabled").text("获取验证码");
}
}, 1000);
$.ajax({
url: 'https://www.51sole.com/Alhvip/alhHandler.ashx?method=SendSmsCode&mobile=' + tel, //处理请求
type: 'POST',
success: function (data, status) {
if (data.state == 1) {
layer.msg(data.msg);
} else {
layer.msg(data.msg);
}
},
data: { },
error: function (data, status) { }
});
});
$(".fixed_r_xf_box_tj_close").click(function(){
$(this).closest('.fixed_r_xf_box_tj').addClass("fixed_r_xf_box_hide");
});
// 10秒回电
$('.fixed_r_xf_box').on('click', '.fixed_r_xf_qhd', function () {
showDialog("fixQuickCallBackBox");
});
// 留言询价
$('.fixed_r_xf_box').on('click', '.fixed_r_xf_xzyl', function () {
showDialog("fixLjxjDialog");
});
// 弹层关闭
$('body').on("click", ".dialogClose,.mask, .dialogbtnClose,dialogBox", function () {
$(".mask").fadeOut(600);
$(".dialogBox").animate({ top: "-8888px" }, 600);
return false;
});
// 获取验证码
$("#getCodeBtns").click(function () {
var countdown = 60; // 设置倒计时时间(秒)
var tel = $("#tels").val();
if (tel == "") {
layer.msg("请输入手机号!", { icon: 2 });
$("#tels").focus();
return false;
}
if (!regtel.test(tel)) {
layer.msg("请输入正确的手机号!", { icon: 3 });
return false;
}
// 禁用按钮防止重复点击
$("#getCodeBtns").prop("disabled", true).val(countdown + " 秒后重新获取");
var timer = setInterval(function () {
if (countdown > 0) {
countdown--;
$("#getCodeBtns").val(countdown + " 秒后重新获取");
} else {
// 倒计时结束,清除计时器,并启用按钮,并恢复按钮文本
clearInterval(timer);
$("#getCodeBtns").prop("disabled", false).val("获取验证码");
}
}, 1000);
$.ajax({
url: 'https://www.51sole.com/Alhvip/alhHandler.ashx?method=SendSmsCode&mobile=' + $("#tels").val(), //处理请求
type: 'POST',
success: function (data, status) {
if (data.state == 1) {
layer.msg(data.msg);
} else {
layer.msg(data.msg);
}
},
data: { },
error: function (data, status) { }
});
});
//留言询价 提交
$("#sendxj2").click(function () {
var cgNum = 1,
nickName = $("#nickName2").val(),
tel = $("#tels").val(),
comName = "",
cgDesc = $("#pName").val();
var code = $("#telcode2").val();
if (tel == "") {
layer.msg("请输入手机号!", { icon: 2 });
$("#tels").focus();
return false;
}
if (!regtel.test(tel)) {
layer.msg("请输入正确的手机号!", { icon: 3 });
return false;
}
if (code == "" && _showcode=="True") {
layer.msg("请输入验证码!", { icon: 2 });
return false;
}
if (nickName == "") {
layer.msg("请填写您的姓名!", { icon: 2 });
return false;
}
$("#sendxj2").attr("disabled","disabled");
console.log('LzylAccountID:',$("#hLzylAccountID").val())
$.ajax({
type: "POST", url: "https://www.51sole.com/ascx/pdcdHandler.ashx",
data: "t=sendxj&infotype=7&infoid=0&aid="+$("#hLzylAccountID").val()+"&SmallIndustryID=0&cgNum=" + cgNum + "&nickName=" + nickName + "&tel=" + tel + "&comName=" + comName + "&cgDesc=" + cgDesc + "&InfoTitle=留言询价&code=" + code+"&requestUrl="+encodeURIComponent(window.location),
success: function (data) {
$("#sendxj2").removeAttr("disabled");
if (data.state == 1) {
$(".mask").fadeOut(600);
$(".dialogBox").animate({ top: "-8888px" }, 600);
$("#pcodeshow").removeAttr("style");
_showcode="True";
showDialog("fixLzylxjDialog2");
$(".tip2").find("img").attr("src",'https://cos2.solepic.com/20240705/202407051020017512.png');
$(".tip2").show();
$(".tip1,.phone2").hide();
$("#tels").val("");
$.ajax({
type: "POST",
url: "https://open.51sole.com/platform/yanxHandler.ashx?op=retain&phone=" + tel + "&stamp=" + Date.parse(new Date()).toString().substr(0, 10),
dataType: 'json',
data: {},
success: function (json) { console.log(json) }
});
}
else
{
layer.msg(data.msg);
}
}
});
});
$('body').on("click", ".sendxjpd", function () {
var footerFixedInfoName = $("#footerFixedInfoName").val();
var footerFixedInfoTel = $("#footerFixedInfoTel").val();
var footerFixedInfoTelcode = $("#footerFixedInfoTelcode").val();
var footerFixedInfoContent = $("#footerFixedInfoContent").val();
var regtel2 = /1[3,4,5,6,7,8,9]{1}[0-9]{9}|(\d{2}-)?\d{3,4}-\d{7,8}|[48]00-\d{3,4}-\d{3,4}/;
if (footerFixedInfoTel == "") {
layer.msg("请输入手机号!", {
icon: 2
});
$("#footerFixedInfoTel").focus();
return false;
}
if (!regtel2.test(footerFixedInfoTel)) {
layer.msg("请输入正确的手机号!", {
icon: 3
});
$("#footerFixedInfoTel").focus();
return false;
}
if (footerFixedInfoTelcode == "" && _showcode=="True") {
layer.msg("请输入验证码!", {
icon: 2
});
$("#footerFixedInfoTelcode").focus();
return false;
}
$(".sendxjpd").attr("disabled","disabled");
$.ajax({
type: "POST", url: "https://www.51sole.com/ascx/pdcdHandler.ashx",
data: "t=sendxj&infotype=7&infoid=0&aid=0&SmallIndustryID=0&cgNum=1&nickName="+footerFixedInfoName+"&tel=" + footerFixedInfoTel + "&comName=&cgDesc=" + footerFixedInfoContent + "&InfoTitle=底部留言询价&code=" + footerFixedInfoTelcode+"&requestUrl="+encodeURIComponent(window.location),
success: function (data) {
$(".sendxjpd").removeAttr("disabled");
if (data.state == 1) {
$("#pcodeshow").removeAttr("style");
_showcode="True";
showtellcode();
showDialog("fixLzylxjDialog2");
$(".tip2").find("img").attr("src",'https://cos2.solepic.com/20240705/202407051020017512.png');
$(".tip2").show();
$(".tip1,.phone2").hide();
$("#footerFixedInfoName,#footerFixedInfoTel,#footerFixedInfoTelcode,#footerFixedInfoContent").val("");
$.ajax({
type: "POST",
url: "https://open.51sole.com/platform/yanxHandler.ashx?op=retain&phone=" + footerFixedInfoTel + "&stamp=" + Date.parse(new Date()).toString().substr(0, 10),
dataType: 'json',
data: {},
success: function (json) { console.log(json) }
});
}
else
{
layer.msg(data.msg);
}
}
});
return false;
});
// 10秒回电 提交
var timer;
$("#sendcall2").click(function () {
var tel = $("#txtcall2").val();
if (tel == "") {
layer.msg("请输入手机号码");
return false;
}
var url = window.location;
var data = {
"Accountid": 0,
"Tel": tel,
"Url": encodeURIComponent(url)
};
console.log("data", data)
$("#sendcall2").attr("disabled","disabled");
$.ajax({
type: "POST",
url: "https://open.51sole.com/platform/huaweicloud/CloudHandler.ashx?op=createCall",
dataType: 'json',
data: data,
success: function (json) {
if (json.code == 0) {
$("#sendcall2").attr("value", "拨号中....");
let num = 30;
timer = setInterval(function () {
num--
if (num <= 0) {
clearInterval(timer);
$("#sendcall2").attr("value", "立即提交");
$("#sendcall2").removeAttr("disabled");
return;
}
}, 1000);
}
else {
layer.msg(json.message);
}
}
});
});
// 返回顶部
$(".fixed_r_xf_go_top").click(function () {
$("html, body").animate({
scrollTop: 0
}, 300);
});
});
$(window).scroll(function () {
if ($(document).scrollTop() > 400) {
$(".fixed_r_xf_go_top").css("visibility", "initial");
} else {
$(".fixed_r_xf_go_top").css("visibility", "hidden");
}
});
function showtellcode()
{
$("#dvfooter").attr("class","footerFixedClientInfo");
if(_showcode=="True" && parseInt(0)>0)$("#dvfooter").attr("class","footerFixedClientInfo");
else if(_showcode=="True")$("#dvfooter").attr("class","footerFixedClientInfo noCallBack");
else if(0>0)$("#dvfooter").attr("class","footerFixedClientInfo hasCallBackNoTelCode");
else $("#dvfooter").attr("class","footerFixedClientInfo noCallBackNoTelCode");
}
function showDialog(dialogId) {
$(".mask").fadeIn(600);
var thisHeight = parseInt($("#" + dialogId + "").height()) / 2;
$("#" + dialogId + "").animate({ top: "50%", marginTop: "-" + thisHeight + "px" }, 400);
}
function setCookie(c_name, value, expiredays){
var exdate= new Date();
exdate.setDate(exdate.getDate() + expiredays);
document.cookie=c_name+ "=" + escape(value) + ((expiredays==0) ? "" : ";expires="+exdate.toGMTString());
}
function getCookie(c_name){
if (document.cookie.length>0){
c_start=document.cookie.indexOf(c_name + "=")
if (c_start!=-1){
c_start=c_start + c_name.length+1
c_end=document.cookie.indexOf(";",c_start)
if (c_end==-1) c_end=document.cookie.length
return unescape(document.cookie.substring(c_start,c_end))
}
}
return ""
}
});
function showDialog2(dialogId,aid,tt) {
$("#hLzylAccountID").val(aid)
console.log('LzylAccountID',$("#hLzylAccountID").val());
$('#pname').text(tt);
$("#txtDesc2").val(tt);
$(".mask").fadeIn(600);
var thisHeight = parseInt($("#" + dialogId + "").height()) / 2;
$("#" + dialogId + "").animate({ top: "50%", marginTop: "-" + thisHeight + "px" }, 400);
}