锘?/var sc = ""; //var sc = ""; //var sc = ""; var sc= ""; //sc += ""; sc+= ""; document.write(sc); //浜岀淮鐮佸睍绀虹ず渚 http://cmscloudim.zhuchao.cc/pages/MakeQRCodePage.aspx?link=www.czleade.cn //鑾峰彇闄や簡鍩熷悕鍚庨潰鐨勫弬鏁帮細var s=window.location.pathname + window.location.search var server = "http://cmscloudim.zhuchao.cc"; var qrcodeurl = "http://cmscloudim.zhuchao.cc/pages/MakeQRCodePage.aspx?link="; var cid = "0"; var setobj; var time = 0; var tel = "", qq = "",mobile="";wx="" var isopentc = false;//鏄惁鍙互鎵撳紑寮圭獥; $(function () { //alert("杩欐槸鍙戦€佺煭淇℃祴璇?!!"); //alert(window.location.toString()) //鎻愪氦鐣欒█ $("body").on("click", "#btnsave1,#btnsave2", function () { var rel = $(this).attr("rel"); var company = $("#txtcompany" + rel).val(); var name = $("#txtsender" + rel).val(); var mobile = $("#txttelephone" + rel).val(); var email = $("#txtemail" + rel).val(); var content = $("#txtcontent" + rel).val(); sendmessage(company, name, mobile, email, content); }); //鍏嶈垂鐢佃瘽鍜ㄨ $("body").on("click", "#btnmobilevisit1,#btnmobilevisit2", function () { var rel = $(this).attr("rel"); var company = ""; var name = "鍏嶈垂鐢佃瘽鍜ㄨ瀹㈡埛"; var mobile = $("#txttelephone_visit" + rel).val(); var email = ""; //var content = "鍏嶈垂鐢佃瘽鍜ㄨ瀹㈡埛,鐢佃瘽" + $("#txttelephone_visit" + rel).val() + ",璇峰敖蹇洖鐢?; var content = ""; sendmessage2(company, name, mobile, email, content); }); //鍏虫帀鍐嶅脊鍑?绋嶅悗鍐嶈) $("body").on("click", "#clo1,#clo2", function () { //layer.close(layer.index); //console.log(time); $(".tc").hide(300); if (time++ <= setobj.num) { setTimeout(function () { showmessinfo() }, setobj.next * 1000); } }) //寮瑰嚭灞傛樉绀 gettcsetinfo(); //鍙充晶瀹㈡湇鏄剧ず ShowMsgInfo(); $("body").not(".message_olr_list").children().bind("click", function () { $(".oll_tel").fadeOut(300); $(".oll_mes").fadeOut(300); $(".oll_ewm").fadeOut(300); $(".message_olr_list li a").removeClass("act"); }) $("body").not(".message_ol").children().bind("click", function () { $(".oll_tel").fadeOut(300); $(".oll_mes").fadeOut(300); $(".oll_ewm").fadeOut(300); $(".message_olr_list li a").removeClass("act"); }) //$("body").not("#divmsginfo").children().bind("click", function () { //}) }) //鑾峰彇閰嶇疆淇℃伅 //http://www.cnblogs.com/fire-phoenix/archive/2009/11/13/1614144.html(璺ㄥ煙) function gettcsetinfo() { var link = window.location.pathname; console.log("pathname:"+link); if (link == "/" || (link != "/supply/" && link.indexOf("/supply/") >=0)) { cid = $("#SendMessageScript").attr("cid"); /* $.post("Message/MessageTool.ashx", { "action": "GetTCSetInfo", "cid": cid}, function (data) { alert("sss"); })*/ //閮界敤璺ㄥ煙璁块棶 $.getJSON( server + "/ashx/MessageTool.ashx?callback=?", { "action": "GetTCSetInfo", "cid": cid }, function (data) { //console.log(data) setobj = data; setTimeout(function () {showmessinfo() },20000); } ); } } //鏄剧ず寮瑰嚭灞 function showmessinfo() { //鏆傛椂涓€鐩翠负true if (isopentc) { time++; //寮瑰嚭灞傚彧鏈夊湪isopentc涓簍rue鐨勬椂鍊欐墠浼氭樉绀?濡傛樉绀轰簡鐣欒█妗?寮瑰嚭灞備笉鍐嶆樉绀 $(".tc").show(300); } } //鍙戦€佸晢鏈虹暀瑷€ function sendmessage(company, name, mobile, email, content) { var telreg1 = /^1[3,4,5,7,8]\d{9}$/; var telreg2 = /^0\d{2,3}-?\d{7,8}$/; if (!telreg1.test(mobile) && !telreg2.test(mobile)) { //alert("璇疯緭鍏ユ纭殑鎵嬫満鍙风爜"); layer.msg('璇疯緭鍏ユ纭殑鎵嬫満鍙风爜', { icon:6, time: 2000 }) return false; } /* if ($.trim(content) == "") { alert("璇疯緭鍏ヤ綘瑕佸挩璇㈢殑鍐呭"); return false; } */ if (company != "" && !iscnoren(company)) { layer.msg('鍏徃鍚嶅繀椤讳负涓枃鎴栬嫳鏂?, { icon: 6, time: 2500 }) return false; } if (name != "" && !iscnoren(name)) { layer.msg('濮撳悕蹇呴』涓轰腑鏂囨垨鑻辨枃', { icon: 6, time: 2500 }) return false; } if (email != "" && !isEmail(email)) { layer.msg('璇疯緭鍏ユ纭牸寮忕殑閭', { icon: 6, time: 2500 }) return false; } cid = $("#SendMessageScript").attr("cid"); var siteurl = window.location.href.toString(); layer.load(); $.getJSON( server + "/ashx/MessageSend.ashx?callback=?", { "sender": encodeURIComponent(name), "company": encodeURIComponent(company), "cid": cid, "telephone": encodeURIComponent(mobile), "email": encodeURIComponent(email), "content": encodeURIComponent(content), "siteurl": encodeURIComponent(siteurl) }, function (data) { //console.log(data) layer.closeAll('loading'); if (1==1) { /* layer.msg('鍙戦€佹垚鍔燂紝鎴戜滑浼氬敖蹇笌鎮ㄨ仈绯伙紒', { icon:1, time: 2000 }, function () { $(".oll_mes").fadeOut(100); $(".ol_zxly").fadeOut(100); $("a.ol_mes").removeClass("act"); }) */ ShowPCAlert('鎴戜滑浼氬敖蹇笌鎮ㄨ仈绯伙紒', function () { $(".oll_mes").fadeOut(100); $(".ol_zxly").fadeOut(100); $("a.ol_mes").removeClass("act"); }, 3); clearinfo(); } else { //layer.msg('鐣欒█澶辫触', { icon: 2, time: 2000 }) var error = data.info; if (error == "") error = "鐣欒█澶辫触"; /* ShowPCAlert(error, function () { $(".oll_mes").fadeOut(100); $(".ol_zxly").fadeOut(100); $("a.ol_mes").removeClass("act"); }, 4); */ layer.msg(error, { icon: 2, time: 4000 },function(){ $(".oll_mes").fadeOut(100); $(".ol_zxly").fadeOut(100); $("a.ol_mes").removeClass("act"); }); } } ); } function clearinfo() { $("#txtcompany1").val(""); $("#txtsender1").val(""); $("#txttelephone1").val(""); $("#txtemail1").val(""); $("#txtcontent1").val(""); $("#txtcompany2").val(""); $("#txtsender2").val(""); $("#txttelephone2").val(""); $("#txtemail2").val(""); $("#txtcontent2").val(""); } function isEmail(str) { var reg = /^(\w)+(\.\w+)*@(\w)+((\.\w+)+)$/; return reg.test(str); } function iscnoren(str) { var reg = /^[\u0391-\uFFE5A-Za-z]+$/; return reg.test(str); } function sendmessage2(company, name, mobile, email, content) { var telreg1 = /^1[3,4,5,7,8]\d{9}$/; var telreg2 = /^0\d{2,3}-?\d{7,8}$/; if (!telreg1.test(mobile) && !telreg2.test(mobile)) { //alert("璇疯緭鍏ユ纭殑鎵嬫満鍙风爜"); layer.msg('璇疯緭鍏ユ纭殑鎵嬫満鍙风爜', { icon: 6, time: 2500 }) return false; } cid = $("#SendMessageScript").attr("cid"); var siteurl = window.location.href.toString(); $.getJSON( server + "/ashx/MessageSend.ashx?callback=?", { "sender": encodeURIComponent(name), "company": encodeURIComponent(company), "cid": cid, "telephone": encodeURIComponent(mobile), "email": encodeURIComponent(email), "content": encodeURIComponent(content), "siteurl": encodeURIComponent(siteurl) }, function (data) { if (1==1) { //鍏抽棴鐢佃瘽灞 $("#txttelephone_visit1").val(""); $("#txttelephone_visit2").val(""); /* layer.msg('鍙戦€佹垚鍔燂紝鎴戜滑浼氬敖蹇笌鎮ㄨ仈绯伙紒', { icon:1, time: 2000 }, function () { $(".ol_dhzx").fadeOut(100); $(".oll_tel").fadeOut(100); $("a.ol_tel").removeClass("act"); }) */ ShowPCAlert('鎴戜滑浼氬敖蹇笌鎮ㄨ仈绯伙紒', function () { $(".ol_dhzx").fadeOut(100); $(".oll_tel").fadeOut(100); $("a.ol_tel").removeClass("act"); }, 3); } else { var error = data.info; if (error == "") error = "鎻愪氦澶辫触"; /* ShowPCAlert(error, function () { $(".ol_dhzx").fadeOut(100); $(".oll_tel").fadeOut(100); $("a.ol_tel").removeClass("act"); }, 4); */ layer.msg(error, { icon: 2, time: 4000 },function(){ $(".ol_dhzx").fadeOut(100); $(".oll_tel").fadeOut(100); $("a.ol_tel").removeClass("act"); }); } //$(".dhtjcg").fadeIn(300); //alert('浼氬敖蹇畨鎺掑鏈嶈仈绯绘偍锛?); } ); } /*娴嬭瘯寮瑰嚭灞 function showmessinfo() { var html = '
鍏徃鍚嶇О锛欬input type="text" id="txtcompany"/>
'; html+= '
濮撳悕锛欬input type="text" id="txtsender"/>
'; html += '
鐢佃瘽锛欬input type="text" id="txttelephone"/>
'; html += '
閭锛欬input type="text" id="txtemail"/>
'; html += '
璇︾粏鍐呭锛欬textarea rows="2" cols="10" id="txtcontent">
'; html += '
  
'; layer.open({ type: 1, zIndex:9999, skin: 'layui-layer-rim', //鍔犱笂杈规 area: ['600px', '340px'], //瀹介珮 content: html }); } */ //寮瑰嚭灞 DailoagMsgInfo = function () { //var idtemp = "divmsginfo_" + Math.floor(Math.random() * 100); this.showHTml = function () { var str = '
'; str += '
'; str += '
'; str += '
'; str += ''; str += '
'; str += '
'; str += '
'; str += '
'; str += ''; str += '

' + mobile + '

'; str += '
'; str += '
'; str += ''; str += ''; str += '
'; str += '
'; str += '
'; str += '
'; str += '鍦ㄧ嚎鐣欒█'; str += '
'; str += '
'; str += '
'; str += '
'; str += '
'; str += '
'; str += '
'; str += ''; str += '
'; str += '
'; str += '
'; str += ''; str += '

鎵竴鎵紝鐪嬫墜鏈虹綉绔橖/p>'; str += '

'; str += '
'; str += ''; str += '

鎵竴鎵紝鍔犲井淇″ソ鍙婞/p>'; str += '

'; str += '
'; str += '
'; str += ''; str += '
'; str += ''; str += '
鍦ㄧ嚎鐣欒█
'; str += '
'; str += '
'; str += '
'; str += '
'; str += '
'; str += '
'; str += '
'; str += ''; str += '
'; str += '
'; str += '
'; str += ''; str += '
' + tel + '
'; str += '
'; str += ''; str += ''; str += '
'; str += '
'; str += '
'; str += '
'; return str; } this.DailoagMsgInfoOpen = function () { var html =this.showHTml(); $("#divmsginfo").remove(); $("body").append(html); //浜嬩欢鍔犺浇 $(".message_olr_list ul li").click(function () { $(this).find("a").toggleClass("act"); $(this).siblings("li").find("a").removeClass("act"); if ($(this).find("a").is(".ol_tel.act")) { $(".oll_tel").fadeIn(300); $(".oll_tel").siblings("div").fadeOut(300); } else if ($(this).find("a").is(".ol_mes.act")) { $(".oll_mes").fadeIn(300); $(".oll_mes").siblings("div").fadeOut(300); } else if ($(this).find("a").is(".ol_ewm.act")) { $(".oll_ewm").fadeIn(300); $(".oll_ewm").siblings("div").fadeOut(300); } else if ($(this).find("a").is(".ol_wx.act")) { $(".oll_wx").fadeIn(300); $(".oll_wx").siblings("div").fadeOut(300); } else { $(".oll_tel").fadeOut(300); $(".oll_mes").fadeOut(300); $(".oll_ewm").fadeOut(300); $(".oll_wx").fadeOut(300); } }); $(".message_olr_list ul li").mousedown(function () { if ($(this).find("a").is(".ol_md")) { $(this).find("a").addClass("act"); } }); $(".zxly").click(function () { $(".ol_zxly").fadeIn(300); }); $(".dhzx").click(function () { $(".ol_dhzx").fadeIn(300); }); $("#clo3").click(function () { $(".ol_dhzx").fadeOut(300); }); $("#clo4").click(function () { $(".ol_zxly").fadeOut(300); }); $(".to_top").click(function () { $('body,html').animate({ scrollTop: 0 }, 500); $(this).removeClass("act"); return false; }); } } function ShowMsgInfo() { cid = $("#SendMessageScript").attr("cid"); $.getJSON( server + "/ashx/MessageTool.ashx?callback=?", { "action": "GetTCSetInfo", "cid": cid }, function (data) { console.log(data) var qqstr = data.qq; tel = data.tel; mobile = data.mobile; var qqlist = qqstr.split(','); if (qqlist.length > 0) qq = qqlist[0]; tel = ((tel != null && tel != "") ? tel : mobile); if (tel == "") tel = " "; var win_ = new DailoagMsgInfo(); win_.DailoagMsgInfoOpen(); } ); } function test() { alert("parent"); } DailoagPCAlert = function (msginfo, callback, second) { var idtemp = "pcalert_" + Math.floor(Math.random() * 100); this.showHTml = function () { var html = '
'; html += '
'; html += ''; html += '

鍙戦€佹垚鍔烖/h3>'; html += '

' + msginfo + '

'; html += '
'; html += '
'; html += ''; html += '
'; html += '
'; return html; } this.DailoagPCAlertOpen = function () { var html = this.showHTml(); $("#pcalert").remove(); $("body").append(html); $("#btnokalert").bind("click", function () { $("#pcalert").hide(); if (callback) callback(); }); $("#pcalert").show(); if (second > 0) { setTimeout(function () { $("#pcalert").hide(); if (callback) callback(); }, second * 1000) } } } function ShowPCAlert(msginfo, callback, second) { var win_ = new DailoagPCAlert(msginfo, callback, second); win_.DailoagPCAlertOpen(); }