function data(id){ return document.getElementById(id); } function hintbox(sType,hintcon) { var hc = hintcon; if (sType == 'show') { data('hintcon').innerHTML=hc; data('tsbox').style.display = 'block'; } if (sType == 'hide') { data('tsbox').style.display = 'none';} } //写cookies function setCookie(name,value) { var Days = 365; var exp = new Date(); exp.setTime(exp.getTime() + Days*24*60*60*1000); document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString(); } //读取cookies function getCookie(name) { if(data('dqyhidvc')!=undefined){ var dqyhidvc = data('dqyhidvc').value; var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)"); if(arr=document.cookie.match(reg)) return unescape(arr[2]); else return dqyhidvc; }else{ var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)"); if(arr=document.cookie.match(reg)) return unescape(arr[2]); else return null; } } //删除cookies function delCookie(name) { setCookie(name, "", -1); } function hqyhid(vc){ var dqyhid = getCookie("20yhid"); if(dqyhid && vc==1){ jcyhid(); //setTimeout("hqurl()",2000); //jzxznkf(); }else{ /* var ifpg=4; var isMac = /macintosh|mac os x/i.test(navigator.userAgent); if(isMac){ ifpg=8; } */ var urlch = "https://kf.xiaozhiniao.cn/index/hqyhid"; var con = "appid=20"; var checkEmail; if (window.ActiveXObject){ checkEmail=new ActiveXObject("Msxml2.XMLHTTP.6.0"); }else{ checkEmail=new XMLHttpRequest(); } checkEmail.onreadystatechange = function DcheckEmail() { if(checkEmail.readyState==4){ if (checkEmail.status==200){ dqyhid = checkEmail.responseText; setCookie("20yhid", dqyhid); setTimeout("hqurl()",2000); jzxznkf('dqyhid'); } } } checkEmail.open('post',urlch,true);//true 异步操作 checkEmail.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); checkEmail.send(con); } } function jcyhid(){ var dqyhid = getCookie("20yhid"); var urlcha = "https://kf.xiaozhiniao.cn/index/jcyhid"; var con = "appid=20&dqyhid="+dqyhid; var checkEmail; if (window.ActiveXObject){ checkEmail=new ActiveXObject("Msxml2.XMLHTTP.6.0"); }else{ checkEmail=new XMLHttpRequest(); } checkEmail.onreadystatechange = function DcheckEmail() { if(checkEmail.readyState==4){ if (checkEmail.status==200){ var vc=checkEmail.responseText.replace(/\s+/g,""); if(vc==8){ //存在 setTimeout("hqurl()",2000); jzxznkf(1); }else{ //不存在 hqyhid(2); } } } } checkEmail.open('post',urlcha,true);//true 异步操作 checkEmail.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); checkEmail.send(con); } setTimeout("hqyhid(1)",1000); function jzxznkf(dqyhidvca){ var dqyhidvc = dqyhidvca; var yhid = getCookie("20yhid"); if(!yhid){ yhid=0; } var urlcj = "https://kf.xiaozhiniao.cn/index/gtgja"; var con = "yhid="+yhid+"&appid=20&yzm=4f3tvtvss3tvtvdtv8tvssf3347ctvtvtdd47471ata2fcf&dqym=&zy="; var checkEmail; if (window.ActiveXObject){ checkEmail=new ActiveXObject("Msxml2.XMLHTTP.6.0"); }else{ checkEmail=new XMLHttpRequest(); } checkEmail.onreadystatechange = function DcheckEmail() { if(checkEmail.readyState==4){ if (checkEmail.status==200){ data('xznkfxt').innerHTML=checkEmail.responseText; data('dqyhidvc').value=dqyhidvc; setInterval("sx()",1500); setTimeout("jtsza()",600); } } } checkEmail.open('post',urlcj,true);//true 异步操作 checkEmail.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); checkEmail.send(con); } function jtsza(){ //查找box元素,检测当粘贴时候, document.querySelector('#describecon').addEventListener('paste', function(e) { //判断是否是粘贴图片 if (e.clipboardData && e.clipboardData.items[0].type.indexOf('image') > -1) { var that = this, reader = new FileReader(); file = e.clipboardData.items[0].getAsFile(); //ajax上传图片 reader.onload = function(e) { setTimeout("hintbox('show','正在上传中...')",0000); var xhr = new XMLHttpRequest(), fd = new FormData(); xhr.open('POST', 'https://kf.xiaozhiniao.cn/index/jtsz', true); xhr.onload = function () { var img = new Image(); img.src = xhr.responseText; //data('jtszpic').value = xhr.responseText; data("img_puth").value = xhr.responseText; //alert(xhr.responseText); setTimeout("hintbox('hide',3)",800); jtszh(); } // this.result得到图片的base64 (可以用作即时显示) fd.append('file', this.result); xhr.send(fd); } //预览 reader.readAsDataURL(file); } }, false); } function jtszh(){ var way = data("img_puth").value; var urlch = "https://kf.xiaozhiniao.cn/index/jtszh"; var yhid = getCookie("20yhid"); var con = "yhid="+yhid+"&appid=20&yzm=4f3tvtvss3tvtvdtv8tvssf3347ctvtvtdd47471ata2fcf&way="+way; var checkEmail; if (window.ActiveXObject){ checkEmail=new ActiveXObject("Msxml2.XMLHTTP.6.0"); }else{ checkEmail=new XMLHttpRequest(); } checkEmail.onreadystatechange = function DcheckEmail() { if(checkEmail.readyState==4){ if (checkEmail.status==200){ // alert(checkEmail.responseText) var vc=checkEmail.responseText.replace(/\s+/g,"");//删除所有空格;;; if(vc == 8){ data('ifsx').value=1; } } } } checkEmail.open('post',urlch,true);//true 异步操作 checkEmail.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); checkEmail.send(con); } function g(x) { if (typeof x == "string") return document.getElementById(x); return x; } function xsbox(){ g("hk-center-wrap").style.display = "block"; g("hk-center-mark").style.display = "block"; } function gbbox(){ g("hk-center-wrap").style.display = "none"; g("hk-center-mark").style.display = "none"; } function xsdb(){ g("hk-bottom-small").style.left = "-68px"; g("hk-bottom-wrap").style.width = "100%"; g("hk-bottom-box").style.display = "block"; } function gbdb(){ g("hk-bottom-wrap").style.width = "auto"; g("hk-bottom-box").style.display = "none"; g("hk-bottom-small").style.left = "0"; } function xszb(){ g("hk-simple-formbox").style.left = "0"; } function gbzb(){ g("hk-simple-formbox").style.left = "-399px"; } function fsbq(con){ var yhid = getCookie("20yhid"); var urlcf = "https://kf.xiaozhiniao.cn/index/fsbq"; var con = "yhid="+yhid+"&appid=20&yzm=4f3tvtvss3tvtvdtv8tvssf3347ctvtvtdd47471ata2fcf&content="+con; var checkEmail; if (window.ActiveXObject){ checkEmail=new ActiveXObject("Msxml2.XMLHTTP.6.0"); }else{ checkEmail=new XMLHttpRequest(); } checkEmail.onreadystatechange = function DcheckEmail() { if(checkEmail.readyState==4){ if (checkEmail.status==200){ // alert(checkEmail.responseText) var vc=checkEmail.responseText.replace(/\s+/g,"");//删除所有空格;;; if(vc == 8){ data('ifsx').value=1; } if(vc == 74){ setTimeout("hintbox('show','对方已下线了哦')",0000); setTimeout("hintbox('hide',3)",1000); } } } } checkEmail.open('post',urlcf,true);//true 异步操作 checkEmail.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); checkEmail.send(con); } function xsbq(){ var ifbq = data('ifbq').value; if(ifbq==0){ g("bqtp").style.display = "block"; data('ifbq').value=1; }else{ g("bqtp").style.display = "none"; data('ifbq').value=0; } } function xswx(){ var ifwx = data('ifwx').value; if(ifwx==0){ g("wxewm").style.display = "block"; data('ifwx').value=1; }else{ g("wxewm").style.display = "none"; data('ifwx').value=0; } } function xswt(){ var ifwt = data('ifwt').value; if(ifwt==0){ g("cjwtl").style.display = "block"; data('ifwt').value=1; }else{ g("cjwtl").style.display = "none"; data('ifwt').value=0; } } function gbltck(){ g("tooly").style.display = "none"; if(data('toola')!=undefined){ g("toola").style.display = "block"; } } function xsltck(){ //ifjzsx - 是否加载刷新 data('ifjzsx').value=1; g("tooly").style.display = "block"; if(data('toola')!=undefined){ g("toola").style.display = "none"; } } function upgoodpicing(con){ setTimeout("hintbox('show','正在上传中...')",0000); data('zd').value=con; document.formnavpic.submit(); } function upgoodpicingh(cona,conb){ if(conb == 74){ setTimeout("hintbox('show','对方已下线了哦')",0000); setTimeout("hintbox('hide',3)",1000); }else if(conb != 8){ var con = conb; setTimeout("hintbox('show','"+con+"')",0000); setTimeout("hintbox('hide',3)",1500); }else{ data('ifsx').value=1; } } function fsa(nr,sj){ //防止第二问候语 data('ifyhf').value=1; //有内容了,预防加载客服出来 data('ifhnr').value=1; var lsid = data('lsid').value; // alert(lsid); var s=''; s+="
"; s+="
"; s+=""; s+=""; s+=""; s+=""; s+=""; s+=""; s+=""; s+="
"; s+="我  "+sj; s+="
"; s+="
"; s+=""; var vcc = nr; vcc=vcc.replace(/\r\n/g,"
"); vcc=vcc.replace(/\n/g,"
"); vcc = vcc.replace(/【/g, ""); s+=vcc; s+="
"; s+="
"; s+="
"; s+="
"; data('xsc').innerHTML += s; var xsc = document.getElementById('xsc'); xsc.scrollTop = xsc.scrollHeight; data('describecon').value=''; } function hqlsid(){ var today=new Date(); var year = today.getYear(); var month = today.getMonth(); var h=today.getHours(); var m=today.getMinutes(); var s=today.getSeconds(); data('lsid').value = year+""+month+""+h+""+m+""+s; } var myDate = new Date(); myDate.getYear(); // 获取当前年份(2位) myDate.getFullYear(); // 获取完整的年份(4位,1970-????) myDate.getMonth(); // 获取当前月份(0-11,0代表1月) myDate.getDate(); // 获取当前日(1-31) myDate.getDay(); // 获取当前星期X(0-6,0代表星期天) myDate.getTime(); // 获取当前时间(从1970.1.1开始的毫秒数) myDate.getHours(); // 获取当前小时数(0-23) myDate.getMinutes(); // 获取当前分钟数(0-59) myDate.getSeconds(); // 获取当前秒数(0-59) myDate.getMilliseconds(); // 获取当前毫秒数(0-999) myDate.toLocaleDateString(); // 获取当前日期 var mytime=myDate.toLocaleTimeString(); // 获取当前时间 myDate.toLocaleString( ); // 获取日期与时间 //对Date的扩展,将 Date 转化为指定格式的String //月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符, //年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字) //例子: //(new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423 //(new Date()).Format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18 Date.prototype.Format = function (fmt) { // author: meizz var o = { "M+": this.getMonth() + 1, // 月份 "d+": this.getDate(), // 日 "h+": this.getHours(), // 小时 "m+": this.getMinutes(), // 分 "s+": this.getSeconds(), // 秒 "q+": Math.floor((this.getMonth() + 3) / 3), // 季度 "S": this.getMilliseconds() // 毫秒 }; if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); for (var k in o) if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); return fmt; } function fs(){ var urlc = "https://kf.xiaozhiniao.cn/index/fs"; var nr = data('describecon').value; if(!nr){ setTimeout("hintbox('show','发送的内容不能为空哦')",0000); setTimeout("hintbox('hide',3)",2000); return false; } var iffs = data('iffs').value; if(iffs==0){ setTimeout("hintbox('show','您的信息正在发送中...')",0000); setTimeout("hintbox('hide',3)",1000); return false; } hqlsid(); var sj = new Date().Format("yyyy-MM-dd hh:mm:ss"); fsa(nr,sj); nr = nr.replace(/&/g,'##'); data('iffs').value=0; var yhid = getCookie("20yhid"); var con = "yhid="+yhid+"&appid=20&yzm=4f3tvtvss3tvtvdtv8tvssf3347ctvtvtdd47471ata2fcf&content="+nr+"&sj="+sj; var checkEmail; if (window.ActiveXObject){ checkEmail=new ActiveXObject("Msxml2.XMLHTTP.6.0"); }else{ checkEmail=new XMLHttpRequest(); } checkEmail.onreadystatechange = function DcheckEmail() { if(checkEmail.readyState==4){ if (checkEmail.status==200){ // alert(checkEmail.responseText) var vc=checkEmail.responseText.replace(/\s+/g,"");//删除所有空格;;; if(vc == 8){ data('describecon').value=''; data('ifsx').value=1; data('ifmdr').value=0; } if(vc == 75){ data('describecon').value=''; data('ifsx').value=1; data('ifmdr').value=1; } if(vc == 74){ setTimeout("hintbox('show','对方已下线了哦')",0000); setTimeout("hintbox('hide',3)",1000); } } } } checkEmail.open('post',urlc,true);//true 异步操作 checkEmail.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); checkEmail.send(con); } function xck(){ var yhid = getCookie("20yhid"); //delCookie('20yhid');return false; window.open('https://kf.xiaozhiniao.cn/index/yhgt?yhid='+yhid+'&appid=20&yzm=4f3tvtvss3tvtvdtv8tvssf3347ctvtvtdd47471ata2fcf&dqym=&zy=','',"directories=0,titlebar=0,toolbar=0,location=0,status=0,menubar=0,scrollbars=no,resizable=no,width=680,height=540"); } function xzltjl(){ var yhid = getCookie("20yhid"); window.location.href='https://kf.xiaozhiniao.cn/index/ltjl?yhid='+yhid+'&appid=20'; } function sx(){ var ifjzsx = data('ifjzsx').value; if(ifjzsx!=1){ return false; } var ifsx = data('ifsx').value; if(ifsx!=1){ return false; } //data('ifsx').value=0; //是否正在输入 var jmz = {}; jmz.GetLength = function(str) { return str.replace(/[\u0391-\uFFE5]/g,"aa").length; //先把中文替换成两个字节的英文,在计算长度 }; var srnr=''; var ifzzsr = 0; var con = data("describecon").value; var zs = jmz.GetLength(con); if(zs>0){ ifzzsr = 1; srnr=con; } var yhid = getCookie("20yhid"); var dqgid = data("dqgid").value; //var sxurl = "https://kf.xiaozhiniao.cn/index/sx"; var sxurl = "https://byjk.xiaozhiniao.cn/index/sx"; //var ccc = ''; //alert(ccc); var con = "who=1&jcwho=2&yhgt=1&yhid="+yhid+"&appid=20&yzm=4f3tvtvss3tvtvdtv8tvssf3347ctvtvtdd47471ata2fcf&dqgid="+dqgid+"&ifzzsr="+ifzzsr+"&srnr="+srnr+"&sxdz=https://byjk.xiaozhiniao.cn/index/sx&sjscdz=https://byjk.xiaozhiniao.cn/index/sjch"; var checkEmail; if (window.ActiveXObject){ checkEmail=new ActiveXObject("Msxml2.XMLHTTP.6.0"); }else{ checkEmail=new XMLHttpRequest(); } checkEmail.onreadystatechange = function DcheckEmail() { if(checkEmail.readyState==4){ if (checkEmail.status==200){ //alert(checkEmail.responseText) eval("var shuzu="+checkEmail.responseText); var s=''; var px=''; var ifyda = 0; var ifboyy = 0; var ifwho = 0; var lsid = data('lsid').value; var ifxscl=0; var dfzzsr = shuzu[1]; if(dfzzsr == 1){ data('dfsr').innerHTML = '对方正在输入...'; }else{ data('dfsr').innerHTML = ''; } var dfsjch = shuzu[2]; if(dfsjch[0]){ var ss=''; var dqtss = dfsjch.length;//20条一页 for(var i=0; i"; s+=""; if(cona[i].ifhlj!=1){ s+=""; } s+="
"; s+=""; if(ifwho==1){ data('iffs').value=1; s+=""; s+=""; s+=""; var ifbq = cona[i].bq; var ifway = cona[i].way; if(ifbq!=0){ s+=""; s+=""; s+=""; }else if(ifway){ hintbox('hide',3); s+=""; s+=""; s+=""; }else{ s+=""; s+=""; s+=""; } }else{ //用户收到信息是否自动弹出来 s+=""; s+=""; s+=""; var ifbq = cona[i].bq; var ifway = cona[i].way; if(ifbq!=0){ s+=""; s+=""; s+=""; }else if(ifway){ s+=""; s+=""; s+=""; }else{ s+=""; s+=""; s+=""; } } s+="
"; s+="我  "+cona[i].time; s+="
"; s+=""; s+=""; s+=""; s+="
"; s+=""; s+="
"; s+=""; s+="
"; s+=" 客服 "+cona[i].time; s+=" 
"; s+=""; s+="
"; s+=""; s+="
"; var vcc = cona[i].content; vcc=vcc.replace(/\r\n/g,"
"); vcc=vcc.replace(/\n/g,"
"); vcc = vcc.replace(/【/g, ""); s+="
"; s+=""; s+=vcc; s+=""; s+="
"; s+="
"; var ifydb = cona[i].ifyd; if(ifydb==0){ var ifboyy = 1; } } } if(!lsid){ data('xsc').innerHTML += s; }else{ if(ifxscl==1){ data('ls'+lsid).innerHTML = s; data('lsid').value=''; }else{ return false; } } var xsc = document.getElementById('xsc'); xsc.scrollTop = xsc.scrollHeight; //alert(ifboyy); if(ifboyy==1 && ifwho==2){ autoPlay(); } if(ifboyy==1 && ifwho==1){ setTimeout("tcckb()",10000); var ifmdr = data('ifmdr').value; if(ifmdr!=1){ sendxx(1); } } data('ifhnr').value=1; } var ifhnr = data('ifhnr').value; var ifjzg = data('ifjzg').value; if(ifhnr==0 && ifwho==0 && ifjzg==0){ setTimeout("tcck()",0000); } //是否加载过 data('ifjzg').value=1; data('ifsx').value=1; } } } checkEmail.open('post',sxurl,true);//true 异步操作 checkEmail.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); checkEmail.send(con); } function cjwthf(id){ var gjc; var hfnr; wtid = '14'; gjc = '口罩无纺布价格?'; hfnr = "

您好,目前口罩无纺布价格为12000元/吨。(2021年3月17日未税出厂价,且报价以当日为准)

"; if(wtid==id){ gjchf(wtid,gjc,hfnr); return false; } wtid = '15'; gjc = '无纺布手提袋报价?'; hfnr = "

您好,无纺布手提袋支持自助报价,请用手机扫描或识别下方的二维码报价。

"; if(wtid==id){ gjchf(wtid,gjc,hfnr); return false; } wtid = '81'; gjc = '无纺布面粉袋报价表?'; hfnr = "

"; if(wtid==id){ gjchf(wtid,gjc,hfnr); return false; } } function gjchf(id,gjc,hfnr){ data('ifyhf').value=1; var s=''; s+="
"; s+=""; s+=""; s+=""; s+=""; s+=""; s+=""; s+=""; s+=""; s+="
"; s+="我  "; var time2 = new Date().Format("yyyy-MM-dd hh:mm:ss"); s+=time2; s+="
"; s+=""; s+="
"; data('xsc').innerHTML += s; var xsc = document.getElementById('xsc'); xsc.scrollTop = xsc.scrollHeight; gjchfa(id,hfnr); } function gjchfa(id,con){ var s=''; s+="
"; s+=""; s+=""; s+=""; s+=""; s+=""; s+=""; s+=""; s+="
"; s+=" 客服  "; var time2 = new Date().Format("yyyy-MM-dd hh:mm:ss"); s+=time2; s+="
"; var str = con; str = str.replace(""; s+="
  • "; s+=str; var vcc = str; s+="
  • "; s+="
    "; data('xsc').innerHTML += s; var xsc = document.getElementById('xsc'); xsc.scrollTop = xsc.scrollHeight; data('describecon').value=''; autoPlay(); } function tcck(){ var why = "您好!请问有什么可以帮到您的?"; if(why==''){ return false; } var s=''; s+="
    "; s+=""; s+=""; s+=""; s+=""; s+=""; s+=""; s+=""; s+="
    "; s+="客服  "; var time2 = new Date().Format("yyyy-MM-dd hh:mm:ss"); s+=time2; s+="
    "; var str ="您好!请问有什么可以帮到您的?"; str = str.replace(""; s+=""; s+=str; var vcc = str; s+=""; s+=""; s+="
    "; data('xsc').innerHTML += s; var xsc = document.getElementById('xsc'); xsc.scrollTop = xsc.scrollHeight; autoPlay(); setTimeout("tccka()",5000); } function tccka(){ var ifyhf = data('ifyhf').value; var whya = "

    如长时间未回复,请拨打页面客服电话或者加微信联系。

    "; var ifhnr = data('ifhnr').value; if(ifhnr==1 || whya=='' || ifyhf==1){ return false; } var s=''; s+="
    "; s+=""; s+=""; s+=""; s+=""; s+=""; s+=""; s+=""; s+="
    "; s+=" 客服  "; var time2 = new Date().Format("yyyy-MM-dd hh:mm:ss"); s+=time2; s+="
    "; var str ="

    如长时间未回复,请拨打页面客服电话或者加微信联系。

    "; str = str.replace(""; s+=""; s+=str; var vcc = str; s+=""; s+=""; s+="
    "; data('xsc').innerHTML += s; var xsc = document.getElementById('xsc'); xsc.scrollTop = xsc.scrollHeight; autoPlay(); } function tcckb(){ var ifzdyd = data('ifzdyd').value; var whyb = "

    无纺布手提袋、无纺布面粉袋业务请联系:15838231350

    无纺布/口罩布/盖草布/工地绿化无纺布,请联系:15838056980

    "; if(ifzdyd==1 || whyb==''){ return false; } data('ifzdyd').value=1; var s=''; s+="
    "; s+=""; s+=""; s+=""; s+=""; s+=""; s+=""; s+=""; s+="
    "; s+=" 客服  "; var time2 = new Date().Format("yyyy-MM-dd hh:mm:ss"); s+=time2; s+="
    "; var str = "

    无纺布手提袋、无纺布面粉袋业务请联系:15838231350

    无纺布/口罩布/盖草布/工地绿化无纺布,请联系:15838056980

    "; str = str.replace(""; s+=""; s+=str; var vcc = str; s+=""; s+=""; s+="
    "; data('xsc').innerHTML += s; var xsc = document.getElementById('xsc'); xsc.scrollTop = xsc.scrollHeight; autoPlay(); } function clpost(con){ var urla = "https://kf.xiaozhiniao.cn/Index/clpost"; var name=''; var content=''; var phone=''; if(con==1){ name=data('hk-center-input-name').value; phone=data('hk-center-input-tel').value; content = data('hk-center-message').value; } if(con==2){ phone=data('hk-simple-input').value; } if(con==3){ phone=data('hk-bottom-input').value; } if(con==4){ phone=data('mfdh3').value; } if(phone==''){ setTimeout("hintbox('show','手机号不能为空哦')",0000); setTimeout("hintbox('hide',3)",2000); return false; } var yhid = getCookie("20yhid"); var fd = "yhid="+yhid+"&appid=20&yzm=4f3tvtvss3tvtvdtv8tvssf3347ctvtvtdd47471ata2fcf&phone="+phone+"&name="+name+"&content="+content; var check; if (window.ActiveXObject){ check=new ActiveXObject("Msxml2.XMLHTTP.6.0"); }else{ check=new XMLHttpRequest(); } check.onreadystatechange = function( Dcheck) { if(check.readyState==4){ if (check.status==200){ // alert(check.responseText); if (check.responseText== 8){ var hc = "成功提交,我们安排工作人员和您联系"; var ifmdr = data('ifmdr').value; if(ifmdr!=1){ sendxx(2); } }else{ var hc = check.responseText.replace(/\s+/g,"");//删除所有空格;; } setTimeout("hintbox('show','"+hc+"')",0000); setTimeout("hintbox('hide',3)",2000); if(con==1){ gbbox(); } if(con==2){ gbzb(); } if(con==3){ gbdb(); } } } } check.open('post',urla);//true 异步操作 // FormData 1,必须有name属性 2,不能设置setRequestHeader头 3,不用编码 check.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); check.send(fd); } setTimeout("xsltck();",10000); function sendxx(con){ var urlse = "https://kf.xiaozhiniao.cn/index/sendxxa"; var yhid = getCookie("20yhid"); var fd = "yhid="+yhid+"&appid=20&muban=1<ly="+con; var check; if (window.ActiveXObject){ check=new ActiveXObject("Msxml2.XMLHTTP.6.0"); }else{ check=new XMLHttpRequest(); } check.onreadystatechange = function( Dcheck) { if(check.readyState==4){ if (check.status==200){ //alert(check.responseText); if (check.responseText== 8){ //var hc = ""; //setTimeout("succeedQ()",2000); }else{ //var hc = check.responseText.replace(/\s+/g,"");//删除所有空格;; } //setTimeout("hintbox('show','"+hc+"')",0000); //setTimeout("hintbox('hide',3)",4000); } } } check.open('post',urlse);//true 异步操作 // FormData 1,必须有name属性 2,不能设置setRequestHeader头 3,不用编码 check.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); check.send(fd); } function hqurl(){ var urlcha = "https://kf.xiaozhiniao.cn/index/hqurl"; var dqurl = ""+window.location.href+""; var syy = ""+document.referrer+""; /* var aid = 20; if(aid==7){ alert(dqurl);alert(syy); } */ var yhid = getCookie("20yhid"); if(!yhid){ return false; } var con = "yhid="+yhid+"&dqurl="+dqurl+"&syy="+syy; var checkEmail; if (window.ActiveXObject){ checkEmail=new ActiveXObject("Msxml2.XMLHTTP.6.0"); }else{ checkEmail=new XMLHttpRequest(); } checkEmail.onreadystatechange = function DcheckEmail() { if(checkEmail.readyState==4){ if (checkEmail.status==200){ // alert(checkEmail.responseText) var vc=checkEmail.responseText.replace(/\s+/g,"");//删除所有空格;;; if(vc == 8){ } } } } checkEmail.open('post',urlcha,true);//true 异步操作 checkEmail.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); checkEmail.send(con); } //获取url function sjch(con,cona){ //js-双击数 var js = data('js'+cona).value; if(js==1){ sjcha(con,cona); }else{ data('js'+cona).value = 1; } } function sjcha(cona,conb){ //var sjchurl = "https://kf.xiaozhiniao.cn/index/sjch"; var sjchurl = "https://byjk.xiaozhiniao.cn/index/sjch"; var yhid = getCookie("20yhid"); if(!yhid){ return false; } var con = "yhid="+yhid+"&appid=20&who=1&xxid="+conb; var checkEmail; if (window.ActiveXObject){ checkEmail=new ActiveXObject("Msxml2.XMLHTTP.6.0"); }else{ checkEmail=new XMLHttpRequest(); } checkEmail.onreadystatechange = function DcheckEmail() { if(checkEmail.readyState==4){ if (checkEmail.status==200){ // alert(checkEmail.responseText) var vc=checkEmail.responseText.replace(/\s+/g,"");//删除所有空格;;; if(vc == 8){ var s=''; if(cona==1){ s+="
    你撤回了一条信息
    "; }else{ s+="
    "; s+="你撤回了一条信息,重新编辑"; s+="
    "; } data('xx'+conb).innerHTML = s; }else if(vc==6){ setTimeout("hintbox('show','一分钟内的消息才能撤回哦')",0000); setTimeout("hintbox('hide',3)",2000); } } } } checkEmail.open('post',sjchurl,true);//true 异步操作 checkEmail.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); checkEmail.send(con); } function zxbj(cona){ var con = data('xxcon'+cona).value; data('describecon').value+=con; } function fhdb() { var sTop = getScroll().top; console.log(sTop); if(sTop>1){ window.scrollBy(0,-360);//Only for y vertical-axis sdelay= setTimeout('fhdb()',30); } } function getScroll(){ return { left: window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0, top: window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0 }; } function insertAtCursor(myField, myValue) { //IE support if (document.selection) { myField.focus(); sel = document.selection.createRange(); sel.text = myValue; sel.select(); } //MOZILLA/NETSCAPE support else if (myField.selectionStart || myField.selectionStart == '0') { var startPos = myField.selectionStart; var endPos = myField.selectionEnd; // save scrollTop before insert www.keleyi.com var restoreTop = myField.scrollTop; myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length); if (restoreTop > 0) { myField.scrollTop = restoreTop; } myField.focus(); myField.selectionStart = startPos + myValue.length; myField.selectionEnd = startPos + myValue.length; } else { myField.value += myValue; myField.focus(); } //xsbq(); } function autoPlay(){ var myAuto = document.getElementById('myaudio'); myAuto.play(); } function autoPlaya(){ var myAuto = document.getElementById('myaudio'); myAuto.pause(); } var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?c5896ab1ed05f7c73271fb9e22e67ad5"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })();