var paramValue="" var addscript=0 var scripts = document.querySelectorAll('script'); for (var i = 0; i < scripts.length; i++) { if(scripts[i].src && scripts[i].src.indexOf("jquery")>0){ addscript=1; } } if(addscript==0) { var clipboard_script = document.createElement("script"); clipboard_script.src = "https://www.ttkefu.com/m/login/denglu1_css/jquery1.7.js"; document.getElementsByTagName("HEAD")[0].appendChild(clipboard_script); } var yan_zheng = document.createElement("script"); yan_zheng.src = "https://www.ttkefu.com/m/login/denglu1_css//yan_zheng.js"; document.getElementsByTagName("HEAD")[0].appendChild(yan_zheng); var area = document.createElement("script"); area.src = "https://www.ttkefu.com/m/login/denglu1_css/area.js"; document.getElementsByTagName("HEAD")[0].appendChild(area); var jqr = document.createElement("script"); jqr.src = "https://www.ttkefu.com/js/jquery.qrcode.min.js"; document.getElementsByTagName("HEAD")[0].appendChild(jqr); var pt_register = document.createElement("link"); pt_register.rel="stylesheet"; pt_register.href ="https://www.ttkefu.com/m/login/denglu1_css/pt_register.css"; document.getElementsByTagName("HEAD")[0].appendChild(pt_register); /*地址参数*/ window.success_goUrl=""; //window.findpwd="findpwd"; function GetSuccessGoUrl(){ var item=document.getElementById("kefusoft"); var iParas=item.src.substring(item.src.indexOf("?")+1); var iAry=iParas.split("&loginok="); window.success_goUrl=iAry[1]; } GetSuccessGoUrl(); app_count = 0; var appinterval; function cAppInterval() { clearInterval(appinterval); } //去掉alert里的网址 js中的alert提示框去掉ip地址或域名 window.alert = function(msg, callback) { var div = document.createElement("div"); div.innerHTML = "" + "
" + "
" + "
" + "
" + " " + "
" + "
弹窗内容,告知当前状态、信息和解决方法,描述文字尽量控制在三行内
" + "
" + " " + "
" + "
" + " 确定" + "
"; document.body.appendChild(div); //var dialogs2 = document.getElementById("dialogs2"); //dialogs2.style.display = 'block'; var dialog_msg2 = document.getElementById("dialog_msg2"); dialog_msg2.innerHTML = msg; // var dialog_cancel = document.getElementById("dialog_cancel"); // dialog_cancel.onclick = function() { // dialogs2.style.display = 'none'; // }; var dialog_ok2 = document.getElementById("dialog_ok2"); dialog_ok2.onclick = function() { dialogs2.style.display = 'none'; callback(); }; }; document.write(""); document.write(""); document.write(""); document.write("
"); document.write("
"); document.write(""); document.write("登陆 "); document.write("
"); document.write("
"); //document.write("
"); document.write("
"); document.write("
"); document.write("
"); document.write("
"); document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write("
"); document.write("
"); document.write("
"); document.write(""); document.write(""); document.write("
格式错误
"); document.write("
"); document.write("
 
") document.write("
"); document.write("
  • "); document.write(""); document.write(""); document.write(" "); document.write(""); document.write("
  • "); document.write("
  • 忘记密码?注册
  • "); document.write("
    "); document.write("
    "); document.write("
    "); document.write(""); document.write("
    "); document.write("
    ") document.write("") document.write("") document.write("
    APP扫码登录
    ") document.write("
    "); document.write("
    ") document.write("") document.write("") document.write("") document.write("") document.write("

    微信扫码登录

    ") document.write(""); document.write("
    ") document.write("
    ") document.write(""); document.write("

    账密登录

    APP登录

    微信登录

    ") var contd1 = document.querySelector(".contd1"); var contd2 = document.querySelector(".contd2"); var contd3 = document.querySelector(".contd3"); var icn1 = document.querySelector(".icn1"); var icn2 = document.querySelector(".icn2"); var icn3 = document.querySelector(".icn3"); var icnp1 = document.querySelector(".icnp1"); var icnp2 = document.querySelector(".icnp2"); var icnp3 = document.querySelector(".icnp3"); var appdivc = document.querySelector(".appdivc"); var mregForm = document.querySelector(".m-regForm__wrap"); var wxdivc = document.querySelector(".wxdivc"); contd1.addEventListener("click", function(){ icn1.style.fill = "#478bff"; icnp1.style.color = "#478bff"; mregForm.style.display = 'block'; icn2.style.fill = "#272636"; icnp2.style.color = "#272636"; appdivc.style.display = 'none'; icn3.style.fill = "#272636"; icnp3.style.color = "#272636"; wxdivc.style.display = 'none'; cAppInterval(); cInterval(); }) contd2.addEventListener("click", function(){ icn2.style.fill = "#478bff"; icnp2.style.color = "#478bff"; appdivc.style.display = 'block'; icn1.style.fill = "#272636"; icnp1.style.color = "#272636"; mregForm.style.display = 'none'; icn3.style.fill = "#272636"; icnp3.style.color = "#272636"; wxdivc.style.display = 'none'; getApperweima(); cInterval(); }) contd3.addEventListener("click", function(){ icn3.style.fill = "#478bff"; icnp3.style.color = "#478bff"; wxdivc.style.display = 'block'; icn1.style.fill = "#272636"; icnp1.style.color = "#272636"; mregForm.style.display = 'none'; icn2.style.fill = "#272636"; icnp2.style.color = "#272636"; appdivc.style.display = 'none'; cAppInterval(); geterweima(); if($("#city1").val()==""){ $.ajax({ type: "get", url: "https://login.ttkefu.com/getip.jsp", success: function(diqu){ var count=$("#city1 option").length; for(var i=0;i=0 && vTmp!=""){ $("#city1").get(0).options[i].selected = true; break; } } } }); } }) jQuery(function(){ var defaul = jQuery(".menu>li").index(jQuery(".hover")); jQuery(".menu").css("background-position",(92 * defaul)+"px"+" 0"); jQuery(".menu li").hover( function(){ var num = jQuery(".menu li").index(jQuery(this)); var current = jQuery(".menu>li").index(jQuery(".hover")); /*if( current == -1 ) { current = 3; }*/ jQuery(".menu").css("background-position",(92 * current)+"px"+" 0"); jQuery(".menu li").removeClass("hover"); jQuery(".menu li").removeClass("lihover"); jQuery(this).addClass("hover"); var len = current - num; if(len <= 0){ len = -len ;};if(num==0){menuleft=-5;}else{menuleft=92 * num;} jQuery(".menu").stop().animate({backgroundPosition: menuleft+"px"+" 0"},92 * len); }, function() { } ); jQuery(".menu").mouseleave(function(){ var num = jQuery(".menu li").index(jQuery(".hover")); /*if( num == -1 ) { num = 3; }*/ var current = jQuery(".menu li").index(jQuery(".c_menu")); jQuery(".menu").css("background-position",(92 * num)+"px"+" 0"); jQuery(".menu li").removeClass("hover"); jQuery(".c_menu").addClass("hover"); var len = current - num; if(len <= 0){ len = -len ;}; jQuery(".menu").stop().animate({backgroundPosition: (92*current)+"px"+" 0"},92*len); }); }); function do_login(){ // var iPstParas="https://control.ttkefu.com/dailireg/dl_login_savereg.jsp?a=1"; iPstParas=iPstParas+"&zh="+document.getElementById("script_phone").value; iPstParas=iPstParas+"&password="+document.getElementById("script_passwd").value; iPstParas=iPstParas+"&autologin="+document.getElementById("script_autologin").value; if (document.getElementById("wxoid")){ iPstParas=iPstParas+"&wxoid="+document.getElementById("wxoid").value; }else{ iPstParas=iPstParas+"&wxoid="; } // var new_script = document.createElement("script"); new_script.src =iPstParas; document.getElementsByTagName("HEAD")[0].appendChild(new_script); } //按下回车件 $('#passwd').live('keydown',function(evt){ if(evt.keyCode == 13) //按下回车 { //$('a[class^=btn_] :first').click(); $('a[class=btn_kz_y3]').click(); } }); function jihuozh(){ window.open('https://www.ttkefu.com/m/login/jihuozh.html?zh='+$("#phone").val()); } $(function(){ $("#phone").bind({ focus:function(){ $(this).addClass("focus"); }, blur:function(){ $(this).removeClass("focus"); var name = $.trim($(this).val()); var reg = /^[\w-+\.]+@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; var reg1=/^1(3|4|5|8|9)[0-9]{9}$/; var reg2=/^[a-zA-Z]*\w{5,19}$/; if(reg.test(name) || reg1.test(name) || reg2.test(name)){ $.ajax({ url:'https://www.ttkefu.com/login/checkzhanghao.html', type:'post', data:"zh="+$("#phone").val(), success:function(msg){ if(msg==0){ $("#name_error1").html("账号已存在,请点击此处激活账号"); }else if(msg==2){ $("#name_error1").html("账号不存在,请先注册"); }else{ $("#name_error1").html(""); } } }); }else{ $("#name_error1").html("账号错误请检查"); } } }); $("#passwd").bind({ focus:function(){ $(this).addClass("focus"); }, blur:function(){ $(this).removeClass("focus"); var pwd = $(this).val(); if(pwd==""){ $("#pwd_error").html("密码错误请检查"); }else{ $("#pwd_error").html(""); } } }); }) if('' == '1') //自动登录 { do_login(); } function getApperweima() { $("#apprefresh").hide(); $("#apperweimasm").hide(); $.ajax({ type: "GET", cache: false, timeout: 5000, url: "https://control.ttkefu.com/dailireg/mycode.jsp", data: { "act": "saomadengluqueren"}, dataType: "text", success: function (data) { var info=data.split("?"); if(info.length==2) { rndcode=info[0]; erweimacode=info[1]; var code_txt=rndcode+"?!"+erweimacode; var qrWidth = 200; var qrHeight = 200; var logoQrWidth = 30; var logoQrHeight = 30; var w=(qrWidth-logoQrWidth)/2; var h=(qrHeight - logoQrHeight)/2 $('#qrcode').html(""); $('#qrcode').qrcode({width: qrWidth,height: qrHeight,text: code_txt}); $("#qrcode canvas")[0].getContext('2d').drawImage($("#myLogo")[0],w, h, logoQrWidth, logoQrHeight); app_count = 0; appinterval = setInterval(function () { yzApp(rndcode,erweimacode) }, 2000); } } }); } function yzApp(scene_id,erweimacode) { $.ajax({ type: "GET", cache: false, timeout: 5000, url: "https://control.ttkefu.com/dailireg/yzmycode.jsp", data: { "act": "getQRCpws", "QRCid": scene_id,"erweimacode": erweimacode}, dataType: "text", success: function (data) { app_count = app_count + 1; if (data.indexOf("err")>=0) { if (app_count > 90) { $("#apprefresh").show(); $('#qrcode').html("") cAppInterval(); } }else{ var ret=data.split("?"); if(ret.length==2){ if(ret[1]!=""){ var iPstParas="https://control.ttkefu.com/dailireg/dl_login_savereg.jsp?a=1&ll=&bs=app"; iPstParas=iPstParas+"&zh="+ret[0]; iPstParas=iPstParas+"&password="+ret[1]; iPstParas=iPstParas+"&autologin=0"; if (document.getElementById("wxoid")){ iPstParas=iPstParas+"&wxoid="+document.getElementById("wxoid").value; }else{ iPstParas=iPstParas+"&wxoid="; } var new_script = document.createElement("script"); new_script.src =iPstParas; document.getElementsByTagName("HEAD")[0].appendChild(new_script); cAppInterval(); }else{ $("#apperweimasm").show(); } } } }, error: function () { } }); } var openid = ""; var opt_sms = 0; interval_count = 0; var interval; function cInterval() { clearInterval(interval); } function wxLogin(scene_id) { $.ajax({ type: "POST", cache: false, timeout: 5000, url: "https://www.ttkefu.com/login/TtkefuWxHandler.ashx", data: { "act": "WxLogin", "scene_id": scene_id }, dataType: "json", success: function (Json) { console.log(Json) interval_count = interval_count + 1; if (Json.Code == "0" || Json.Code == 0) { if (interval_count > 60) { $("#gzh").text("请点击刷新二维码"); $("#refresh").show(); $("#gzh").show(); $("#erweimasm").hide(); $("#erweima").css("opacity",0.2); cInterval(); } //未扫码进行关注公众号 } if (Json.Code == "1" || Json.Code == 1) { cInterval(); document.getElementById("erweima_content").style.display = "none"; document.getElementById("shouji").style.display = "block"; openid = Json.openid; $("#nickname").text(Json.nickname); $("#headimgurl").attr('src', Json.headimgurl); $("#wxdivc").css("height","316px"); } if (Json.Code == "2" || Json.Code == 2) { //直接登录 wxopenidlogo(Json.openid) cInterval(); } if (Json.Code == "3" || Json.Code == 3) { //已经扫码进行关注公众号,但未操作完成 $("#gzh").text("请点击公众号链接"); $("#erweimasm").show(); $("#gzh").show(); $("#refresh").hide(); } }, error: function () { } }); } function geterweima() { $.ajax({ type: "GET", cache: false, timeout: 5000, url: "https://www.ttkefu.com/login/TtkefuWxHandler.ashx", data: { "act": "GetErweima" }, dataType: "json", success: function (Json) { if(Json.imgUrl!=""){ $("#erweima").attr('src', Json.imgUrl); $("#refresh").hide(); $("#gzh").hide(); $("#erweima").css("opacity",1); interval_count = 0; interval = setInterval(function () { wxLogin(Json.scene_id) }, 2000); }else{ $("#erweima").attr('src', "https://www.ttkefu.com/images/wxewm.png"); $("#gzh").text("请点击刷新二维码"); $("#gzh").show(); $("#refresh").show(); $("#erweima").css("opacity",0.2); } }, error: function () { $("#erweima").attr('src', "https://www.ttkefu.com/images/wxewm.png"); $("#gzh").text("请点击刷新二维码"); $("#gzh").show(); $("#refresh").show(); $("#erweima").css("opacity",0.2); } }); } function hqyz(){ //验证码按钮 var phone = $.trim($("#mphone").val()); if (phone == "") { $("#error").text("请输入手机号码"); $("#error").show(); document.getElementById("mphone").focus(); return false; } if (phone.length != 11) { $("#error").text("请输入正确的手机号码"); $("#error").show(); document.getElementById("mphone").focus(); return false; } //发送验证码 SendRegCodeNum(); } /*倒计时*/ var SendTimeTi = 0; function SendTime(i, btnCodeId) { document.getElementById('hqyz').style.background = "#478BFF"; document.getElementById('hqyz').style.borderColor = "#478BFF"; var vGetCodeTxt = "获取验证码"; if (i > 0) { document.getElementById('hqyz').style.background = "#a0cfff"; document.getElementById('hqyz').style.borderColor = "#a0cfff"; vGetCodeTxt = "重新发送(" + i + ")"; clearTimeout(SendTimeTi); setTimeout(function () { SendTime(i - 1, btnCodeId); }, 1000); $("#" + btnCodeId).attr("disable",true); } else { $("#" + btnCodeId).removeAttr("disable"); } $("#" + btnCodeId).text(vGetCodeTxt); } //更新新手机号-发送验证码 function SendRegCodeNum() { $.ajax({ type: "POST", cache: false, timeout: 5000, url: "https://www.ttkefu.com/login/TtkefuWxHandler.ashx", data: { "act": "WxBindPhoneCode", "PhoneNumbers": $("#mphone").val() }, dataType: "json", success: function (Json) { opt_sms = 1; if (Json.Code == "2" || Json.Code == "1" || Json.Code == 2 || Json.Code == 1) { if (Json.Code == "2" || Json.Code == 2) { $('#reg_exist').val(1); }else{ $("#email_div").css("display","block"); $("#wxdivc").css("height","316px"); } //倒计时 SendTime(60, 'hqyz'); } else { $("#error").text(Json.Msg); } }, error: function () { } }); } function wxbind(){ if(openid=="" || typeof openid === "undefined"){ return false; } //验证码按钮 var m = $.trim($("#mphone").val()); var email=$.trim($("#email").val()); var gw=$.trim($("#gw").val()); var uname=$.trim($("#uname").val()); if (m == "") { $("#error").text("请输入手机号码"); $("#error").show(); document.getElementById('mphone').focus(); return false; } if (m.length != 11) { $("#error").text("请输入正确的手机号码"); $("#error").show(); document.getElementById('mphone').focus(); return false; } if (opt_sms == 0) { $("#error").text("请发送验证码"); $("#error").show(); return false; } var CodeNum = $("#yzm").val(); if (CodeNum == "") { $("#error").text("请输入验证码"); $("#error").show(); return false; } var city1 = $("#city1").val(); var post_url = "https://control.ttkefu.com/dailireg/savereg.jsp"; var reg_exist = $("#reg_exist").val(); if (reg_exist == "1" || reg_exist == 1) { post_url = "https://www.ttkefu.com/login/TtkefuWxHandler.ashx"; }else{ if(email == "") { $("#error").text("请输入登录邮箱"); $("#error").show(); document.getElementById('email').focus(); return false; }else{ var emailRegex = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/; if(!emailRegex.test(email)){ $("#error").text("登录邮箱格式不正确"); $("#error").show(); return false; } } $.ajax({ type: "POST", cache: false, timeout: 2000, url: "https://www.ttkefu.com/login/TtkefuWxHandler.ashx", data: { "act": "WxPass", "mobile": m, "openid": openid }, dataType: "json", success: function (Json) { } }); } var cpt=0; if ($("#cpt").attr("checked") == "checked" || $("#cpt").attr("checked") || $('#cpt').is(':checked')) { cpt=1; } else { $("#error").text("请勾选隐私政策,信息"); $("#error").show(); return false; } $.ajax({ type: "POST", cache: false, timeout: 5000, url: post_url, data: { "act": "WxBindPhone", "mobile": m, "CodeNum": CodeNum, "openid": openid, "city": city1,"email":email,"cpt":cpt,"gw":gw,"uname":uname }, dataType: "json", success: function (Json) { console.log(Json); if (Json.err == "0" || Json.Code == 0) { //登录 wxopenidlogo(openid) } if (Json.err == "1" || Json.Code == 1) { $("#error").text("手机号码错误"); $("#error").show(); } if (Json.err == "2" || Json.Code == 2) { $("#error").text("手机号验证码错误"); $("#error").show(); } if ( Json.Code == 7 || Json.Code == 8) { $("#error").text("手机号验证码错误"); $("#error").show(); } if (Json.Code == 4 || Json.Code == 3) { $("#error").text("数据错误"); $("#error").show(); } if (Json.Code == 6) { $("#error").text("服务器错误"); $("#error").show(); } if (Json.Code == 10) { $("#error").text("请勾选协议"); $("#error").show(); } if (Json.Code ==9) { $("#error").text("顾问检测失败"); $("#error").show(); } }, error: function () { } }); } function wxopenidlogo(openid){ var iPstParas="https://control.ttkefu.com/dailireg/dl_login_savereg.jsp?a=1&ll=&bs=app"; iPstParas=iPstParas+"&zh="; iPstParas=iPstParas+"&password="; iPstParas=iPstParas+"&autologin=0"; iPstParas=iPstParas+"&openid="+openid; if (document.getElementById("wxoid")){ iPstParas=iPstParas+"&wxoid="+document.getElementById("wxoid").value; }else{ iPstParas=iPstParas+"&wxoid="; } var new_script = document.createElement("script"); new_script.src =iPstParas; document.getElementsByTagName("HEAD")[0].appendChild(new_script); }