function AutoScroll() { $('.say').find('div.one:last').insertBefore('div.one:first').css("opacity", "0").animate({ "opacity": "1" }, 1000); } setInterval('AutoScroll()', 7000); $("input").keydown(function (e) { if (e.keyCode == 13) { $('#LoginBtn').trigger("click"); } }); function Login() { var UserName = $("#UserName").val(); var PassWord = $("#PassWord").val(); var IsSave = $("#IsSave")[0].checked; if (UserName == "" || UserName == "网校号或邮箱或手机号") { alert("请输入网校号或者邮箱或手机号"); $("#UserName").focus(); } else if (PassWord == "") { alert("请输入密码"); $("#PassWord").focus(); } else { $("#LoginBtn").attr("disabled", "disabled"); var info = {}; info.UserName = UserName; info.PassWord = PassWord; info.IsSave = IsSave; info.host = window.location.host; if (info.host.substring(0, 2) == "t.") { info.host = info.host.substr(1); } $.post("/Login.DoLogin.data", info, function (data) { if (data.R == "0" || data.R == "2") { $.dialog.alert(data.Text); } else if (data.R == "3") { var html = []; html.push('
'); html.push('您目前的积分为' + data.Point + '分,信用等级为' + data.UserLevel + '级。'); html.push(''); html.push(' '); html.push(' '); html.push(' '); html.push(' '); html.push(' '); html.push(' '); html.push(' '); html.push(' '); html.push(' '); for (var i = 0; i < data.PunishDetail.length; i++) { html.push(' '); html.push(' '); html.push(' '); html.push(' '); html.push(' '); html.push(' '); } html.push(' '); html.push('
时间原因个人积分信誉等级
' + data.PunishDetail[i].AddTime + '' + data.PunishDetail[i].BadContent + '' + data.PunishDetail[i].ReducePoint + '' + data.PunishDetail[i].ReputationLevel + '
'); html.push('
'); $.dialog({ title: "查看详细", content: html.join(""), ok: function () { var returnUrl = $("#ReturnUrl").val(); location.href = returnUrl; }, cancel: false }); } if (data.R != "ok") { $("#LoginBtn").removeAttr("disabled"); } else { if (typeof (data.SSO) != "undefined" && (data.SSO != "")) { var img = new Image(); img.onerror = winRef; img.onsuccess = winRef; img.src = data.SSO; } else { winRef(); } } }, "json"); } } function winRef() { var retUrl = $("#ReturnUrl").val(); window.needRef = true; if (retUrl == "" || (retUrl.length == 0)) { window.needRef = false; } if (window.needRef) { window.location = retUrl; } else { window.location.reload(true); } } function openqq() { window.open("http://sso.30edu.com.cn/qq.aspx", "TencentLogin", "width=580,height=480,left=300,top=100,menubar=0,scrollbars=0, status=0,titlebar=0,toolbar=0,location=0"); } function PostLogin(obj) { var UserName = $("#UserName").val(); var PassWord = $("#PassWord").val(); var IsSave = $("#IsSave")[0].checked; if (UserName == "" || UserName == "网校号或邮箱或手机号") { alert("请输入网校号或者邮箱或手机号"); $("#UserName").focus(); } else if (PassWord == "") { alert("请输入网校号密码"); $("#PassWord").focus(); } else { var info = {}; info.UserName = UserName; info.PassWord = PassWord; info.IsSave = IsSave; info.host = window.location.host; if (info.host.substring(0, 2) == "t.") { info.host = info.host.substr(1); } $.post("/Login.DoLogin.data", info, function (data) { if (data.R != "ok") { top.alert(data.Text); } else { top.location = top.location; } }, "json"); } }