(function(n){var t={logined:!1,initLoginPane:function(n){function u(n){t==0?(n.removeAttr("disabled"),n.val("短信验证码"),t=60):(n.attr("disabled","disabled"),n.val("重新发送("+t+")"),t--,setTimeout(function(){u(n)},1e3))}var i=this,f=$(".telLogin").find("input[name=type]"),r,t;f.length==0&&$(".telLogin").append('

u7cc彩票

');$(".VC").click(function(){return $(".CC").attr("src","/CreateImage.aspx?"+(new Date).valueOf()),!1});$("#user").attr("max-length",11);r=function(n){if(n.length==11){var t=$.ajax({url:"/CommonCallback.ashx?cmd=Checkphones&phones="+n,async:!1}),i=$.parseJSON(t.responseText);i.UserID?($("#btnlogin").val("登录"),$("input[name=type]").val("0"),$("#login-pass").show(),$("#login-reg").hide()):($("#btnlogin").val("注册"),$("input[name=type]").val("1"),$("#login-pass").hide(),$("#login-reg").show())}};$("#user").keyup(function(){var n=$(this).val();r(n)});$("#user").keypress(function(n){n.which==13&&$("#ccode").focus()});$("#ccode").keypress(function(n){n.which==13&&$("#pass").focus()});$("#pass").keypress(function(n){n.which==13&&$("#btnlogin").click()});t=60;$("#btnlogin").click(function(){var u=$("#chkRem").prop("checked")?"1":"0",f=$("input[name=type]").val(),t,r;if(f=="0"){var t=$("#user").val(),r=$("#pass").val(),e=$("#ccode").val();if(t==""){layer.alert("请输入账号");return}if(t.length!=11){layer.alert("手机号码有误");return}if(r==""){layer.alert("请输入密码");return}i.login({user:t,pass:r,code:e,rem:u},function(t){if(t&&t.ErrText){layer.alert(t.ErrText);return}n&&n(t)})}else{if(t=$("#user").val(),r=$("#telcode").val(),t==""){layer.alert("请输入账号");return}if(r==""){layer.alert("请输入密码");return}i.login({phones:t,code:r,type:"tel",rem:u},function(t){if(t&&t.ErrText){layer.alert(t.ErrText);return}n&&n(t)})}});$(".telcode").click(function(){var t=$("#user").val(),r=$("#pass").val(),f=$("#ccode").val(),i,n;if(t==""){layer.alert("请输入登录手机号");return}i={phones:t,type:0};n=$(this);n.attr("disabled",!0);$.post("/GetRegGSMMessage.ashx?d="+(new Date).valueOf(),i,function(t){if($(".VC").click(),t&&t.ErrText){layer.alert(t.ErrText);n.removeAttr("disabled");return}u(n);$("#btntelLogin").removeAttr("disabled");layer.alert("验证码已经发送,请注意查收,如果长时间没收到 ,请重试 ")},"json")});$("#btntelLogin").click(function(){var t=$("#tel").val(),i=$("#tcheck").val();if(t==""){layer.alert("请输入账号");return}if(i==""){layer.alert("请输入密码");return}$.getJSON("/DoLogin.ashx?d="+(new Date).valueOf(),{phones:t,code:i,type:"tel"},function(t){if(t&&t.ErrText){layer.alert(t.ErrText);return}n&&n(t)})});$(".ilogin-box .tit").find("span").on("click",function(){$(".ilogin-box .tit").find("span").removeClass("current");$(".ilogin-box").find(".lgform").hide();$(this).addClass("current");var n=$(this).index();$(".ilogin-box").find(".lgform").eq(n).show()})},showUserInfo:function(n){n==null||n.ErrText?($("#loginedHead").hide(),$("#nologinHead").show(),$(".user-nav").hide(),$("#logined-pane").hide(),$("#login-pane").show(),(locations.pathname.toLowerCase()=="/pay.html"||locations.pathname.toLowerCase()=="/pay-water.html"||locations.pathname.toLowerCase()=="/pay-power.html"||locations.pathname.toLowerCase()=="/pay-gas.html")&&$(".help-menu").show()):($("#logined-pane").show(),$("#login-pane").hide(),$("#loginedHead").show(),$("#nologinHead").hide(),$(".user-nav").show(),(locations.pathname.toLowerCase()=="/pay.html"||locations.pathname.toLowerCase()=="/pay-water.html"||locations.pathname.toLowerCase()=="/pay-power.html"||locations.pathname.toLowerCase()=="/pay-gas.html")&&$(".help-menu").hide(),$("#nickname,#head_id").html(n.NickName?n.NickName:"____"+n.UserID+"____"),$("#accountdis").html(n.mobilesphones?n.mobilesphones:"____"+n.UserID+"____"),$(".user-info>p").find("span").html("昵称:"+(n.NickName?n.NickName:"____"+n.UserID+"____")),$(".user-info>p").find(".tel").html(n.mobilesphones?n.mobilesphones:"____"+n.UserID+"____"))},checkLogin:function(){return;var n},login:function(n,t){var i=this;$.getJSON("/DoLogin.ashx",n,function(n){i.logined=!n.ErrText;i.logined&&i.showUserInfo(n);t&&t(n)})},GetNews:function(n){$.getJSON("/GetNews.ashx",{GetType:"news"},function(t){n&&n(t)})},GetNotices:function(n){$.getJSON("/GetNews.ashx",{GetType:"notices"},function(t){n&&n(t)})},GetNoticesMain:function(n){$.getJSON("/GetNews.ashx",{GetType:"notices",count:8},function(t){n&&n(t)})}};n.userObject=t;n.logout=function(){$.getJSON("/DoLogin.ashx?logout="+(new Date).valueOf(),function(){locations.reload()})};n.GetQueryString=function(t){var r=new RegExp("(^|&)"+t+"=([^&]*)(&|$)"),i=n.locations.search.substr(1).match(r);return i!=null?unescape(i[2]):""};n.formatDate=function(n){var t=new Date(Date.parse(n));if(typeof Jsondatevalsue=="undefined")return n;var i=t.getFullYear(),r=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,u=t.getDay()<10?"0"+t.getDay():t.getDay(),f=t.getHours()<10?"0"+t.getHours():t.getHours(),e=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),o=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds();return i+"-"+r+"-"+u+" "+f+":"+e+":"+o};$(document).ready(function(){$("#header").load("/header.html",function(){t.checkLogin()});$(".user-nav").hide();t.checkLogin();$("#news").length&&t.GetNews(function(n){for(var i='
新闻<\/span>更多 ><\/a><\/div>