<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">var interval = null;

function windowopen(url) {
	window.open(url, '_self');
	return false
}
$(function() {
	$(".dataTables_paginate .btnpage").click(function() {
		$("#pageNumber").val($(this).attr("page"));
		PagePostBack("");
		return false
	});
	initNavActive();

	function initNavActive() {
		var hrefStr = location.href;
		if ($(".channelList  .selected").length == 0) {
			$(".shijidaohang .channelList li").each(function() {
				var href = $(this).find("a").attr("href");
				if (hrefStr.indexOf(href) != -1) {
					console.log(href);
					$(".shijidaohang .channelList li").removeClass("selected");
					$(this).addClass("selected")
				}
			})
		}
	}
	$("#TsearchForm").submit(function() {
		var url = $("#TsearchForm").attr("action");
		url = url + "&amp;name=" + $("#TsearchInput").val();
		window.location.href = url;
		return false;
	});
	$("#searchlist").submit(function() {
		var url = $("#searchlist").attr("action");
		url = url + "&amp;name=" + $("#search-input").val();
		window.location.href = url;
		return false
	});
	if ($(".logincodeimage").length &gt; 0) {
		$(".logincodeimage").attr("src", $(".logincodeimage").attr("data-src"));
		$(".logincodeimage").click(function() {
			var newSrc = $(".logincodeimage").attr("data-src") + "?t=" + (new Date()).getTime();
			$(this).attr("src", newSrc)
		})
	}
	document.documentElement.scrollTop = 0;
	window.onscroll = function() {
		var sTop = document.documentElement.scrollTop;
		backTop(sTop);
		TopPageNav(sTop)
	};

	function backTop(sTop) {
		if (sTop &gt; 100) {
			$('#Topfun').show()
		} else {
			$('#Topfun').hide()
		}
	}
	var four;
	$('#Topfun').bind('click', function() {
		four = setInterval(FourscrollBy, 10)
	});

	function FourscrollBy(eachHeight) {
		if (document.documentElement &amp;&amp; document.documentElement.scrollTop) {
			if (document.documentElement.scrollTop &lt;= 0) {
				clearInterval(four)
			} else {
				window.scrollBy(0, -30)
			}
		} else {
			if (document.body.scrollTop &lt;= 0) {
				clearInterval(four)
			} else {
				window.scrollBy(0, -30)
			}
		}
	}
	function TopPageNav(sTop) {
		var navHeigth = $(".headerpage").height();
		if (sTop &gt;= navHeigth * 2) {
			$(".headerpage").addClass("fixed")
		} else {
			$(".headerpage").removeClass("fixed")
		}
	}
	$('.header .saoma_banner .txt_cont .txt').bind('mouseover', function() {
		$(this).siblings().removeClass('active');
		$(this).addClass('active');
		var index = $(this).index();
		$(this).parent().parent().find('.ewmBanner').addClass('displayfalse');
		$(this).parent().parent().find('.ewmBanner').eq(index).removeClass('displayfalse')
	});
	$('.header .search .noArrow').click(function() {
		if ($(this).hasClass('active')) {
			$(this).removeClass('active');
			$('.sstate').hide()
		} else {
			$(this).addClass('active');
			$('.sstate').show()
		}
	});
	$('.header .search .sstate&gt;span').click(function() {
		$('.noArrow .state').text($(this).text());
		$("#TsearchForm").attr("action", $(this).data("action"));
		$("#TsearchInput").attr("placeholder", $(this).data("tishi"));
		$('.noArrow').removeClass('active');
		$('.sstate').hide()
	});
	$(".duanxiLogin").bind("click", function() {
		var dataTye = $(this).attr("dataTye");
		ewmLogin(dataTye)
	});
	$(".sign-wrap-v2 .sign-tab&gt;span").bind("click", function() {
		$(this).addClass("cur");
		$(this).siblings().removeClass("cur");
		if ($(this).attr("dataType") == "phoneLogin") {
			$(".page1").show();
			$(".page2").hide();
			clearInterval(interval)
		}
		if ($(this).attr("dataType") == "ewmLogin") {
			$(".page2").show();
			$(".page1").hide();
			clearInterval(interval);
			interval = setInterval(queryOrderState, 2000)
		}
	});
	if ($("#mustlogin").val() == "1") {
		clearInterval(interval);
		interval = setInterval(queryOrderState, 2000)
	}
	$('.close_login').bind('click', function() {
		$('.page-sign').fadeOut();
		clearInterval(interval)
	});
	$('.overlay_bg').bind('click', function() {
		$('.page-sign').fadeOut();
		clearInterval(interval)
	});
	$('#loginname').bind('keyup', function() {
		var phoneVal = $(this).val();
		if (isPoneAvailable(phoneVal)) {
			$('#getloginconfrmbtn').addClass('active')
		}
		isPoneAvailable(phoneVal) ? $('#getloginconfrmbtn').addClass('active') : $('#getloginconfrmbtn').removeClass('active')
	});
	$('#loginpassword').bind('keyup', function() {
		var phoneVal = $('#loginname').val();
		var codeVal = $(this).val();
		if (phoneVal &amp;&amp; codeVal) {
			$('#login-submit-btn').addClass('current');
			$('#loginerror').css('display', 'none')
		} else {
			$('#login-submit-btn').removeClass('current')
		}
	});
	$('#getloginconfrmbtn').bind('click', function() {
		var phoneVal = $('#loginname').val();
		var code = "";
		if (phoneVal.trim() == '') {
			jqtoast('对不起，手机号码不能为空');
			return
		}
		if (!isPoneAvailable(phoneVal)) {
			jqtoast('对不起，手机号码格式不正确');
			return
		}
		if ($("#loginyancode").length &gt; 0) {
			code = $("#loginyancode").val();
			if (code.trim() == '') {
				jqtoast('对不起，请输入右侧图形中验证码');
				$("#loginyancode").focus();
				return false;
			} else if (code.length &lt; 4) {
				jqtoast('对不起，请正确输入图形中验证码');
				$("#loginyancode").focus();
				return false;
			}
		};
		var that = $(this);
		$.ajax({
			type: "post",
			dataType: "json",
			data: {
				"mobile": phoneVal,
				"code": code,
				"top": 1
			},
			url: "/tool/sendmobile?version=" + new Date(),
			cache: false,
			success: function(d) {
				if (d.state == "success") {
					settime(that)
				} else {
					jqtoast(d.msg)
				}
			}
		});
		return false
	});
	$('#login-submit-btn').bind('click', function() {
		var phoneVal = $('#loginname').val();
		var codeVal = $('#loginpassword').val();
		if (phoneVal.trim() == '') {
			jqtoast('对不起，手机号码不能为空');
			return false
		};
		if (!isPoneAvailable(phoneVal)) {
			jqtoast('对不起，手机号码格式不正确');
			return false
		};
		if (codeVal.trim() == '') {
			jqtoast('对不起，验证码不能为空');
			return false
		};
		if (phoneVal &amp;&amp; codeVal) {
			var that = $(this);
			$.ajax({
				type: "post",
				dataType: "json",
				data: {
					"mobile": phoneVal,
					"code": codeVal,
					"webcode": ""
				},
				url: "/tool/checklogin?version=" + new Date(),
				cache: false,
				success: function(d) {
					if (d.state == "success") {
						$('.page-sign').hide();
						$('.login_before,.weixinLogin,.login_befores').hide();
						$('.login_after,.login_afters').show();
						$("#showusernamet").html(d.cname);
						$("#zhaopinuserid").val(d.userid);
						clearInterval(interval);
						var url = window.location.href;
						if (url.indexOf("/fabu") != -1 || url.indexOf("/user") != -1 || url.indexOf("/jobfair") != -1 || url.indexOf("/zhiwei") != -1 || url.indexOf("/home/bind") != -1 || $(".tip_bottom_reg").length &gt; 0) {
							window.location.href = window.location.href
						}
					} else if (d.state == "erweima") {
						jqtoast(d.msg);
						setTimeout(function() {
							ewmLogin("ewmLogin")
						}, 1000)
					} else {
						jqtoast(d.msg)
					}
				}
			});
			return false
		}
	})
});

function isPoneAvailable(str) {
	var myreg = /^[1][3,4,5,7,8][0-9]{9}$/;
	if (!myreg.test(str)) {
		return false
	} else {
		return true
	}
}
var countdown = 60;

function settime(obj) {
	if (countdown == 0) {
		
		obj.removeAttr("disabled");
		obj.addClass('active');
		
		
		obj.text("获取验证码");
		countdown = 60;
		return
	} else {
		obj.removeClass('active');
		obj.text("重新发送(" + countdown + ")");
		countdown--
	}
	setTimeout(function() {
		settime(obj)
	}, 1000)
}
function PagePostBack(action) {
	var from = $("#formlist");
	if (action != "") {
		from.attr("action", action)
	}
	from.get(0).submit()
};

function ewmLogin(dataTye) {
	if (dataTye == "phoneLogin") {
		$(".page1").show();
		$(".page2").hide();
		$(".sign-wrap-v2 .sign-tab&gt;span").eq(0).addClass("cur");
		$(".sign-wrap-v2 .sign-tab&gt;span").eq(1).removeClass("cur");
		clearInterval(interval)
	}
	if (dataTye == "ewmLogin") {
		$(".page2").show();
		$(".page1").hide();
		$(".sign-wrap-v2 .sign-tab&gt;span").eq(0).removeClass("cur");
		$(".sign-wrap-v2 .sign-tab&gt;span").eq(1).addClass("cur");
		clearInterval(interval);
		interval = setInterval(queryOrderState, 2000)
	};
	$(".page-sign").fadeIn()
}
function queryOrderState() {
	$.ajax({
		type: "POST",
		url: "/tool/checkpclogin",
		data: {
			"code": $("#logincode").val(),
			"webcode": $("#loginwebcode").val()
		},
		dataType: "json",
		timeout: 4000,
		async: false,
		success: function(d) {
			if (d.state == "success") {
				$('.page-sign').hide();
				$('.login_before,.weixinLogin,.login_befores').hide();
				$('.login_after,.login_afters').show();
				$("#showusernamet").html(d.cname);
				$("#zhaopinuserid").val(d.userid);
				clearInterval(interval);
				var url = window.location.href;
				if (url.indexOf("/fabu") != -1 || url.indexOf("/user") != -1 || url.indexOf("/jobfair") != -1 || url.indexOf("/zhiwei") != -1 || url.indexOf("/home/bind") != -1 || $(".tip_bottom_reg").length &gt; 0) {
					window.location.href = window.location.href
				}
			}
		}
	})
}</pre></body></html>