1window.CanShowIndustry = false; 2var isIE = !!window.ActiveXObject; 3var isIE6 = isIE && !window.XMLHttpRequest; 4var isIE8 = isIE && !!document.documentMode; 5$(function () { 6 if ($.cookie) { 7 $.cookie("jwsearchlog", null, { 8 expires: -1, 9 path: '/' 10 }); 11 $.cookie("entsearchlog", null, { 12 expires: -1, 13 path: '/' 14 }); 15 } 16 17 18 //èªå¨æ¨éç»ç¾åº¦ 19 var bp = document.createElement('script'); 20 var curProtocol = window.location.protocol.split(':')[0]; 21 if (curProtocol === 'https') { 22 bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; 23 } else { 24 bp.src = 'http://push.zhanzhang.baidu.com/push.js'; 25 } 26 var s = document.getElementsByTagName("script")[0]; 27 s.parentNode.insertBefore(bp, s); 28 var IsYnzp = $("#IsYnzp").val(); 29 $(window).scroll(function () { 30 if (!$("#top_jobfair_tip").is(":visible")) { 31 var top_tip = $("#top_tip").length 32 if ($(window).scrollTop() < 120) { 33 34 35 $("body").removeClass("temp_body"); 36 $("#ctl00_panLogowrapper").attr("style", ""); 37 $("#ctl00_panLogowrapper .logowrapper").attr("style", "padding-top: 0px;box-shadow:unset;"); 38 $(".header-sub").attr("style", ""); 39 40 if (top_tip>=1) { 41 $(".header-sub").attr("margin-top", "100px"); 42 } 43 $(".search-footer").show(); 44 $(".logowrapper .logomenu .searchclass").removeClass("searchClassAni") 45 $("#ctl00_panLogowrapper").removeClass("searchClassAni2") 46 $(".header-sub").removeClass("searchClassAni2") 47 } 48 else { 49 50 $("body").addClass("temp_body"); 51 52 $("#ctl00_panLogowrapper").attr("style", "position:fixed;top:52px;z-index: 3;"); 53 $(".header-sub").attr("style", "position:fixed;top:0;z-index: 11;"); 54 if (top_tip >= 1) { 55 $(".header-sub").css("margin-top", "0px"); 56 } 57 $("#ctl00_panLogowrapper .logowrapper").attr("style", "padding-top: 0px;box-shadow:0 15px 15px rgba(0,0,0,0.05);"); 58 $(".search-footer").hide(); 59 $(".logowrapper .logomenu .searchclass").removeClass("searchClassAni") 60 $(".logowrapper .logomenu .searchclass").addClass("searchClassAni") 61 $("#ctl00_panLogowrapper").addClass("searchClassAni2") 62 $(".header-sub").addClass("searchClassAni2") 63 } 64 } 65 }); 66 $(".MenuMobile,.MenuWx").hover(function () { 67 $(this).find(".Qr").show(); 68 }, function () { 69 $(this).find(".Qr").hide(); 70 }); 71 72 if ($("#jobdropdown").html() == "è¯·éæ©<b></b>") $("#jobdropdown").html("å·¥ä½å²ä½"); 73 if ($("#citydropdown").html() == "è¯·éæ©<b></b>") $("#citydropdown").html("å·¥ä½å°ç¹"); 74 $("#daohang").hover(function () { 75 $(this).addClass("iconover"); 76 $(".daohangbox").show(); 77 }, function () { 78 $(this).removeClass("iconover"); 79 $(".daohangbox").hide(); 80 }); 81 $("#entlogin").click(function () { 82 location.href = '/ent/manage.aspx'; 83 }); 84 $("#jwlogin").click(function () { 85 location.href = '/jw/manage.aspx'; 86 }); 87 88 $(".hasclass").hover(function () { 89 $(this).find(".hasclassview").show(); 90 }, function () { 91 $(this).find(".hasclassview").hide(); 92 }); 93 94 95 // $(".citybox").hover(function () { 96 // $(".selectcity").show(); 97 // }, function () { 98 // $(".selectcity").hide(); 99 // }); 100 101 $("#search-t").hover(function () { 102 $(this).find(".selected").show(); 103 }, function () { 104 $(this).find(".selected").hide(); 105 }); 106 107 $(".qqlogin").hover(function () { 108 $(this).find(".qqkuan").show(); 109 }, function () { 110 $(this).find(".qqkuan").hide(); 111 });
112 113 114 $("#search-t").find(".selected").click(function () { 115 var search = $("#search-t"); 116 if (search.hasClass("icon1")) { 117 search.removeClass("icon1"); 118 $("#sp1").removeClass("sp2").addClass("sp1"); 119 $("#sp2").removeClass("sp1").addClass("sp2"); 120 $("#sp1").html("æ¾å·¥ä½"); 121 $("#sp2").html("æäººæ"); 122 } else { 123 search.addClass("icon1"); 124 $("#sp1").removeClass("sp1").addClass("sp2"); 125 $("#sp2").removeClass("sp2").addClass("sp1"); 126 $("#sp1").html("æäººæ"); 127 $("#sp2").html("æ¾å·¥ä½"); 128 } 129 $(this).hide(); 130 }); 131 132 $(".entlogin").hover(function () { 133 $(this).find(".entloginkuan").show(); 134 }, function () { 135 $(this).find(".entloginkuan").hide(); 136 }); 137 $("#btnIndustry").hover(function () { 138 $(".RightIndustry").css("top", $(this).offset().top - 446).css("left", $(this).offset().left - 72).show(); 139 window.CanHideIndustry = false; 140 }, function () { 141 window.CanHideIndustry = true; 142 setTimeout(function () { 143 if (window.CanHideIndustry) 144 $(".RightIndustry").hide(); 145 }, 2000); 146 }); 147 148 $(".RightIndustry").hover(function () { 149 window.CanHideIndustry = false; 150 }, function () { 151 $(".RightIndustry").hide(); 152 }); 153 154 ChangePosition(); 155 if ($(window).scrollTop() > 100) 156 $(".GoToTop").show(); 157 else 158 $(".GoToTop").hide(); 159 $(".GoToTop").click(function () { 160 $('body,html').animate({ 161 scrollTop: 0 162 }, 500); 163 return false; 164 }); 165 $(window).scroll(function () { 166 if ($(window).scrollTop() > 100) { 167 $(".GoToTop").fadeIn(1000); 168 } else { 169 $(".GoToTop").fadeOut(1000); 170 } 171 }); 172 $(window).resize(function () { 173 ChangePosition(); 174 }); 175 176 if ($.cookie && $.cookie("wxqrCloseDate") == "1") { 177 $(".DivQR").hide(); 178 } 179 if ($.cookie && $.cookie("WallCloseDate") == "1") { 180 $(".wall").hide(); 181 } 182 $("input[id^=ctl00_footer1_rblCategory]").click(function () { 183 $("#category_" + $(this).val()).show().siblings().hide(); 184 if ($("#category_" + $(this).val()).children().length > 0) 185 $("#category_" + $(this).val()).children()[0].click(); 186 }); 187 188 $("input[id^=ctl00_ContentPlaceHolder1_rblCategory]").click(function () { 189 $("#category_" + $(this).val()).show().siblings().hide(); 190 $("#category_" + $(this).val()).children()[0].click(); 191 }); 192 193 $(".CategoryItem").click(function () { 194 $(this).addClass("ItemSelect").siblings().removeClass("ItemSelect"); 195 }); 196 197 if ($("input[id^=ctl00_footer1_rblCategory]").length > 0) 198 $("input[id^=ctl00_footer1_rblCategory]")[0].click(); 199 200 if ($("input[id^=ctl00_ContentPlaceHolder1_rblCategory]").length > 0) 201 $("input[id^=ctl00_ContentPlaceHolder1_rblCategory]")[0].click(); 202 203 $("#ctl00_keyword").keydown(function (event) { 204 var keyPressed; 205 if (window.event) 206 keyPressed = window.event.keyCode; // IE 207 else 208 keyPressed = event.keyCode; // Firefox 209 if (keyPressed == 13) { 210 Search(); 211 return false; 212 } 213 }); 214 215 //触å±çäºç»´ç 216 var mobile_qrcode = $("#mobile_qrcode").attr("href"); 217 if (mobile_qrcode != undefined && mobile_qrcode != null && mobile_qrcode != '') { 218 CreateQr("mobile_qrcode", "https://"+mobile_qrcode, 110, 110); 219 220 $("#mobile_qrcode").css("padding", "10px 10px"); 221 //$("#mobile_qrcode").css("margin-bottom", "10px"); 222 $("#mobile_qrcode_panel ").css("padding-bottom","15px"); 223 } 224}); 225 226/*çæäºç»´ç */ 227function CreateQr(id, url, width, height) { 228 var browser = navigator.appName; 229 if (browser == "Microsoft Internet Explorer") { 230 $('#' + id) && $('#' + id).length > 0 && $('#' + id).qrcode({ 231 text: url, 232 width: width, 233 height: height, 234 render: "table" 235 }); 236 } else { 237 $('#' + id) && $('#' + id).length > 0 && $('#' + id).qrcode({ 238 text: url, 239 width: width, 240 height: height 241 }); 242 } 243} 244function ClearKeyWord(text) { 245 $("#ctl00_keyword").val(text); 246} 247/*æç´¢*/ 248function Search() { 249 var keyword = $("#ctl00_keyword").val(); 250 251 if (keyword == "8888") { 252 alert("请è¾å ¥åæ³å ³é®å"); 253 $("#ctl00_keyword").focus(); 254 var kkk = setTimeout("ClearKeyWord(" + keyword + ")", 1); 255 return; 256 } 257 var jtype1 = $("#jobdropdown").attr("sel_default"); 258 var jctiy1 = $("#citydropdown").attr("sel_default"); 259 var search = $("#search-t"); 260 if (keyword.length == 0 && jtype1.length == 0) { 261 alert("请è¾å ¥æç´¢å ³é®åæèä½ç±»å«"); 262 $("#ctl00_keyword").focus(); 263 var kkk = setTimeout("ClearKeyWord(" + keyword + ")", 1); 264 return; 265 } 266 if (keyword.length == 1) { 267 alert("æç´¢å ³é®åä¸è½å°äº2个å"); 268 $("#ctl00_keyword").focus(); 269 var kkk = setTimeout("ClearKeyWord(" + keyword + ")", 1); 270 return; 271 } 272 var kkk2 = setTimeout("ClearKeyWord(" + keyword+")",1000); 273 var querys = []; 274 var search = $("#search-type .selected").data('type'); 275 var url = search == 2 ? "/search/resume_search_result.aspx" : "/search/offer_search_result.aspx"; 276 querys.push("keyword=" + escape(keyword)); 277 querys.push("jtype1Hidden=" + jtype1); 278 querys.push("jcity1Hidden=" + jctiy1); 279 280 var cookiesname = search == 2 ? "jwsearchlog" : "entsearchlog"; 281 var title = ""; 282 if (keyword.length > 0) title = "å ³é®å:" + keyword + ""; 283 if (jctiy1.length > 0) { 284 var jctiy1Txt = $("#citydropdown").html().replace("<b></b>", "").replace("è¯·éæ©", "").replace("å·¥ä½å°ç¹", ""); 285 if (jctiy1Txt.length > 0) { 286 if (title.length > 0) title += "+"; 287 title += jctiy1Txt; 288 } 289 } 290 if (jtype1.length > 0) { 291 var jtype1Txt = $("#jobdropdown").html().replace("<b></b>", "").replace("è¯·éæ©", "").replace("å·¥ä½å²ä½", ""); 292 if (jtype1Txt.length > 0) { 293 if (title.length > 0) title += "+"; 294 title += jtype1Txt; 295 } 296 } 297 var searchtitle = title; //æ é¢ 298 var searchurl = url + "?" + querys.join("&"); //页é¢å°å 299 var canAdd = true; //åå§å¯ä»¥æå ¥cookieä¿¡æ¯ 300 try { 301 var len = 0; 302 var jwsearchlog = [];
303 if (window.localStorage.getItem(cookiesname) != null) { 304 jwsearchlog = eval('(' + window.localStorage.getItem(cookiesname) + ')'); 305 len = jwsearchlog.length; 306 } 307 $(jwsearchlog).each(function () { 308 if (this.searchtitle == searchtitle) { 309 canAdd = false; //å·²ç»åå¨ï¼ä¸è½æå ¥ 310 return false; 311 } 312 }); 313 if (canAdd) { 314 var json = "["; 315 var start = 0; 316 if (len > 10) { 317 start = 1; 318 } 319 for (var i = start; i < len; i++) { 320 json = json + "{\"searchtitle\":\"" + jwsearchlog[i].searchtitle + "\",\"searchurl\":\"" + jwsearchlog[i].searchurl + "\"},"; 321 } 322 json = json + "{\"searchtitle\":\"" + searchtitle + "\",\"searchurl\":\"" + searchurl + "\"}]"; 323 window.localStorage.setItem(cookiesname, json); 324 } 325 } catch (e) { 326 327 } 328 329 if ($("#searchLink").length > 0) { 330 $("#searchLink").attr("href", url + "?" + querys.join("&")); 331 document.getElementById("searchLink").click(); 332 } else { 333 open(url + "?" + querys.join("&")); 334 } 335} 336 337//å ³é微信äºç»´ç 338function CloseQR() { 339 $(".DivQR").hide(); 340 $.cookie("wxqrCloseDate", 1, { 341 expires: 1 342 }); 343} 344 345function CloseWall() { 346 $(".wall").hide(); 347 $.cookie("WallCloseDate", 1, { 348 expires: 1 349 }); 350} 351 352 353//æ¹ååæ i 354function ChangePosition() { 355 //var left = (($(window).width() - 998) / 2) + 998; 356 var left = (($(window).width() - 1100) / 2) + 1100 + 10; 357 if ($(window).width() >= 1340) { 358 $(".wall").attr("style", "left:6px;display:none"); 359 $(".DivQR").attr("style", "left:6px;bottom:55px;display:block"); 360 } else { 361 $(".wall").attr("style", "left:0;display:none"); 362 $(".DivQR").attr("style", "left:6px;bottom:55px;display:none"); 363 } 364 if ($(window).width() >= 1180) { 365 //$(".DivRightButton").css({ "left": left + "px", "top": (($(window).height() - 140) / 2) + "px" }); 366 $(".DivRightButton").css({ 367 "right": "6px", 368 "bottom": "55px" 369 }); 370 if ($(".DivRightButton").is(":hidden")) 371 $(".DivRightButton").show(); 372 } else 373 $(".DivRightButton").hide(); 374} 375//ç¾åº¦å享
376// window._bd_share_config = { 377// "common": { 378// "bdSnsKey": {}, 379// "bdText": "", 380// "bdMini": "1", 381// "bdMiniList": ["mshare", "tsina", "weixin", "tqq", "renren", "sqq", "qzone"], 382// "bdPic": "", 383// "bdStyle": "0", 384// "bdSize": "16", 385// "bdPopupOffsetLeft": "-78" 386// }, 387// "share": {} 388// }; 389// with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = (window.location.protocol.split(':')[0] == 'https' ? 'http://bdimg.share.baidu.com/static/api/js/share.js?v=898605933.js?cdnversion=' : 'http://bdimg.share.baidu.com/static/api/js/share.js?v=898605933.js?cdnversion=') + ~(-new Date() / 36e5)]; 390 391function RefreshOffer() { 392 __open("refreshoffer", { 393 caption: "å·æ°æèä¿¡æ¯", 394 w: 450, 395 h: 320, 396 scrolling: "no", 397 url: "/ent/refresh_offer1.aspx" 398 }); 399} 400 401function SugFeedBack() { 402 var hasLogin = $("#ctl00_footer1_hasLogin").val(); 403 var parm = { 404 category: $("div[id^=category_]:visible > .ItemSelect").attr("value"), 405 content: $("#txtContent").val(), 406 name: $("#txtName").val(), 407 email: $("#txtEmail").val(), 408 mobile: $("#txtPhone").val() 409 }; 410 var errorMsg = $(".FeedBackBox > .Content > .Item > .ErrorMsg"); 411 if (parm.category.length == 0) { 412 errorMsg.html("è¯·éæ©åé¦ç±»å"); 413 return; 414 } 415 if (parm.content.length == 0) { 416 errorMsg.html("请è¾å ¥è¦åé¦çå 容"); 417 return; 418 } 419 if (parm.content.length >= 500) { 420 errorMsg.html("å å®¹è¶ åºå符éå¶"); 421 return; 422 } 423 if (hasLogin == 0) { 424 if (parm.name.length == 0) { 425 errorMsg.html("请è¾å ¥æ¨çæµç§°"); 426 return; 427 } 428 if (parm.name.length >= 25) { 429 errorMsg.html("æµç§°è¶ åºå符éå¶"); 430 return; 431 } 432 if (parm.email.length == 0) { 433 errorMsg.html("请è¾å ¥æ¨çé®ç®±"); 434 return; 435 } 436 if (parm.email.length >= 50) { 437 errorMsg.html("é®ç®±è¶ åºå符éå¶"); 438 return; 439 } 440 var filter = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/; 441 if (!filter.test(parm.email)) { 442 errorMsg.html("é®ç®±æ ¼å¼é误"); 443 return; 444 } 445 if (parm.mobile.length > 0) { 446 filter = /(^\d{1}$)|(^\d{11}$)/; 447 if (!filter.test(parm.mobile)) { 448 errorMsg.html("ææºæ ¼å¼é误ï¼å¿ 须为11使°å"); 449 return; 450 } 451 } 452 } 453 $.ajax({
454 url: "/ajax/FeedBack.ashx?r=" + Math.random() + "", 455 type: 'POST', 456 dataType: 'text', 457 timeout: 30000, 458 data: parm, 459 error: function () { 460 errorMsg.html("æå¡å¨ç¹å¿ï¼è¯·ç¨åéè¯"); 461 }, 462 success: function (data) { 463 if (data.length > 0) { 464 errorMsg.html(data); 465 } else { 466 alert("æäº¤å®æï¼æè°¢æ¨çåé¦"); 467 errorMsg.html(""); 468 $("#txtContent").val(""); 469 $(".FeedBackBg,.FeedBackBox").hide(); 470 } 471 } 472 }); 473} 474 475 476 477function OpenQqLogin(e) { 478 e = e || {}; 479 pi = e.pi || 0; 480 isreg = e.isreg || 0; 481 url = e.url || window.qqurl; 482 window.open(url, "newwindow", "height=550, width=900, top=0, left=0, toolbar=no, menubar=no, scrollbars=no,resizable=no,location=no, status=no"); 483 484 window.QqLogin_Success = function (i) { 485 if (pi == 1) { 486 window.top.location.href = "/login/apilogin.aspx?isreg=" + isreg; 487 return; 488 } 489 if (i == 1) { 490 window.location.href = window.location.href; 491 return; 492 } 493 window.top.location.href = "/login/apilogin.aspx?url=" + window.top.location.href; 494 }; 495} 496 497function OpenWeiboLogin(e) { 498 e = e || {}; 499 pi = e.pi || 0; 500 isreg = e.isreg || 0; 501 url = e.url || window.weibourl; 502 window.open(url, "newwindow", "height=550, width=900, top=0, left=0, toolbar=no, menubar=no, scrollbars=no,resizable=no,location=no, status=no"); 503 window.WeiboLogin_Success = function (i) { 504 if (pi == 1) { 505 window.top.location.href = "/login/apilogin.aspx?isreg=" + isreg; 506 return; 507 } 508 if (i == 1) { 509 window.location.href = window.location.href; 510 return; 511 } 512 window.top.location.href = "/login/apilogin.aspx?isreg=" + isreg + "&url=" + window.top.location.href; 513 return; 514 }; 515} 516 517function OpenWxBind(e) { 518 e = e || {}; 519 url = e.url || window.weibourl; 520 window.open(url, "newwindow", "height=350, width=350, top=150, left=150, toolbar=no, menubar=no, scrollbars=no,resizable=no,location=no, status=no"); 521} 522 523function GetRandomNum(Min, Max) { 524 var Range = Max - Min; 525 var Rand = Math.random(); 526 return (Min + Math.round(Rand * Range)); 527} 528 529//è·åURLçåæ° 530function getQueryString(name) { 531 var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); 532 var r = window.location.search.substr(1).match(reg); 533 if (r != null) { 534 if (r[2].indexOf('%u') > -1) { 535 return unescape(r[2]); 536 } else { 537 return r[2]; 538 } 539 } 540 return ""; 541} 542 543function getLoacalDateString() { 544 var date = new Date(); 545 var y = date.getFullYear(); 546 var m = date.getMonth() + 1; 547 var dd = date.getDate(); 548 var time = y + "-" + (m < 10 ? "0" + m : m) + "-" + (dd < 10 ? "0" + dd : dd); 549 return time; 550} 551 552function getLoacalTimeString() { 553 var date = new Date(); 554 var h = date.getHours(); 555 var m = date.getMinutes(); 556 var s = date.getSeconds(); 557 var time = (h < 10 ? "0" + h : h) + ":" + (m < 10 ? "0" + m : m) + ":" + (s < 10 ? "0" + s : s); 558 return time; 559} 560 561var SaveFile = function (data, filename) { 562 var saveLink = document.createElementNS('http://www.w3.org/1999/xhtml', 'a'); 563 saveLink.href = data; 564 saveLink.download = filename; 565 566 var event = document.createEvent('MouseEvents'); 567 event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); 568 saveLink.dispatchEvent(event); 569}; 570 571function GetJsonByKey(data, key, value) { 572 var result; 573 $.each(data, function (i, item) { 574 if (item[key] = value) { 575 result = item; 576 return false; 577 } 578 }); 579 return result; 580} 581 582function DeleteJsonByKey(data, key, value) { 583 for (var i = 0; i < data.length; i++) { 584 if (data[i][key] == value) { 585 data.splice(i, 1); 586 break; 587 } 588 } 589 return data; 590} 591 592function ShowMaskLayer(closeid) { 593 if ($(".MaskLayer").length > 0) { 594 $(".MaskLayer").attr("onclick", ""); 595 $(".MaskLayer").unbind(); 596 } else { 597 $("body").append("<div class='MaskLayer'></div>"); 598 } 599 $(".MaskLayer").click(function () { 600 $("#" + closeid).hide(); 601 $(".MaskLayer").hide(); 602 $(".ShieldEntTips").hide(); 603 });
604 $(".MaskLayer").show(); 605 $("#" + closeid).show(500); 606} 607 608function CloseMaskLayer(closeid) { 609 $("#" + closeid).hide(); 610 $(".MaskLayer").hide(); 611} 612 613function IsIE() { 614 var browser = navigator.appName; 615 if (browser == "Microsoft Internet Explorer") { 616 return true; 617 } else if (browser == "Netscape" && navigator.userAgent.indexOf("Trident/7.0") > 0) { 618 return true; 619 } 620 621 return false; 622} 623 624var bctool = {}; 625bctool.confirm = function (e) { 626 var titletip = e.titletip || ""; 627 var title = e.title || ""; 628 var message = e.message || ""; 629 var confirmtxt = e.confirmtxt || "ç¡®å®"; 630 var canceltxt = e.canceltxt || "åæ¶"; 631 //åå§åæ§ä»¶ 632 if (!bctool.confirm_HaveControl()) { 633 bctool.confirm_InitControl(); 634 } 635 var html = []; 636 if (titletip != "") { 637 html.push("<div class='confirm_titletip_info'></div>"); 638 } 639 if (title != "") { 640 html.push("<div class='confirm_title'>" + title + "</div>"); 641 } 642 if (message != "") { 643 html.push("<div class='confirm_message'>" + message + "</div>"); 644 } 645 html.push("<div class='confirm_btn_warp'>" + 646 "<div class='confirm_btn confirm_btn_confirm'>" + confirmtxt + "</div>" + 647 "<div class='confirm_btn confirm_btn_cancle'>" + canceltxt + "</div>" + 648 "</div>"); 649 $(".bctool-comfirm-warp").html(html.join('')); 650 651 $(".bctool-comfirm-warp").show(); 652 $(".bctool-comfirm-warp-bg").show(); 653 $(".confirm_btn_confirm").click(function () { 654 if (typeof (e.success) != "undefined") { 655 e.success(); 656 } 657 $(".bctool-comfirm-warp").hide(); 658 $(".bctool-comfirm-warp-bg").hide(); 659 }); 660 $(".confirm_btn_cancle").click(function () { 661 $(".bctool-comfirm-warp").hide(); 662 $(".bctool-comfirm-warp-bg").hide(); 663 }); 664} 665bctool.confirm_HaveControl = function () { 666 var havenote = $(".bctool-comfirm-warp"); 667 if (havenote && havenote.length > 0) { 668 return true; 669 } 670 return false; 671} 672bctool.confirm_InitControl = function () { 673 var selwarp_html = "<div class='bctool-comfirm-warp'></div>"; 674 var selbg_html = "<div class='bctool-comfirm-warp-bg'></div>"; 675 $("body").append(selwarp_html + selbg_html); 676} 677 678function NotFindEntLogo(e) { 679 $(e).parent().html("<div class='no_logo'></div>"); 680} 681 682//è·ååéæ¡çå¼ 683function GetRadioValue(name) { 684 if ($(':radio[name="' + name + '"]:checked').length > 0) { 685 return $(':radio[name="' + name + '"]:checked').val(); 686 } 687 return ""; 688} 689 690//è·åå¤éæ¡çå¼ 691function GetCheckBoxValueByName(name) { 692 var checkValue = ""; 693 $(':checkbox[name="' + name + '"]:checked').each(function () { 694 checkValue += $(this).val() + ","; 695 }); 696 if (checkValue.length > 1) { 697 checkValue = checkValue.substring(0, checkValue.length - 1); 698 } 699 return checkValue; 700} 701 702//è·åå¤éæ¡çå¼ï¼asp.netæ§ä»¶çæçï¼ 703function GetCheckBoxValue(id) { 704 var checkValue = ""; 705 $("#" + id + " > tbody > tr > td > input").each(function () { 706 if ($(this).prop("checked")) { 707 checkValue += this.nextSibling.innerHTML + ","; 708 } 709 }); 710 if (checkValue.length > 1) { 711 checkValue = checkValue.substring(0, checkValue.length - 1); 712 } 713 return checkValue; 714} 715 716//è·åå¤éæ¡çå¼ï¼asp.netæ§ä»¶çæçï¼ 717function GetCheckBoxValue1(id) { 718 var checkValue = ""; 719 $("#" + id + " > tbody > tr > td input").each(function () { 720 if ($(this).prop("checked")) { 721 checkValue += $(this).parent().attr("myValue") + ","; 722 } 723 }); 724 if (checkValue.length > 1) { 725 checkValue = checkValue.substring(0, checkValue.length - 1); 726 } 727 return checkValue; 728} 729 730 731 732function SendMsmByCode(mobileControlId, functionName) { 733 var mobile = $("#" + mobileControlId); 734 if (mobile.val().length <= 0) { 735 alert("请è¾å ¥ææºå·ç ", "é误æç¤º"); 736 return; 737 } 738 var filter = /^1[0-9]\d{9}$/; 739 if (!filter.test(mobile.val())) { 740 alert("ææºå·ç æ ¼å¼ä¸æ£ç¡®", "é误æç¤º"); 741 return; 742 } 743 744 if ($(".ValidCodeBoxBg").length <= 0) 745 $("body").append("<div class=\"ValidCodeBoxBg\" onclick=\"$('.ValidCodeBoxBg,.ValidCodeBox').hide();\"></div>"); 746 if ($(".ValidCodeBox").length <= 0) { 747 var html = []; 748 html.push("<div class=\"ValidCodeBox\">"); 749 html.push("<img alt=\"\" id=\"ValidCode\" src=\"/ValidCode.ashx\" title='ç䏿¸ æ¥ï¼ç¹å»å¾çæ¢ä¸å¼ ã' class=\"ImgCode\" onclick=\"this.src='/ValidCode.ashx?flag='+ Math.random()\" />"); 750 html.push("<input type=\"text\" placeholder=\"请è¾å ¥éªè¯ç \" class=\"TextBox\" id=\"regValidCode\" />"); 751 html.push("<div class=\"clearfix\" style=\"margin: 10px 0 0 0;\">"); 752 html.push("<a class=\"Btn l\" onclick=\"$('.ValidCodeBoxBg,.ValidCodeBox').hide();\">åæ¶</a><a class=\"Btn Send l\" onclick=\"" + functionName + "()\">åé</a>"); 753 html.push("</div></div>"); 754 $("body").append(html.join("")); 755 } 756 $('.ValidCodeBoxBg,.ValidCodeBox').show(); 757} 758 759function SetDefaultImg(e, type, sex, imgUrl) { 760 if (type == "ent") { 761 $(e).attr("src", "/images/ent/v4/avatar.png"); 762 } else if (type == "jw") { 763 $(e).attr("src", "/images/v4/avatar-man.png"); 764 if (sex == 2) 765 $(e).attr("src", "/images/v4/avatar-woman.png"); 766 } else { 767 $(e).attr("src", imgUrl); 768 } 769 $(e).attr("onerror", ""); 770} 771 772function getJwCategory(takenum, sitecode, finish_event) { 773 //夿æ¯å¦ç»å½ 774 var jw_sn = $.cookie("Jw_SN", { 775 raw: true 776 });
777 var expires = new Date(); 778 var jw_username = $.cookie("Jw_UserName", { 779 raw: true 780 }); 781 if (jw_sn == null && jw_username != null) { 782 783 $.ajax({ 784 url: "/ajax/IndexHtmlData.ashx?ac=jw", 785 type: 'GET', 786 dataType: 'json', 787 success: function (d) { 788 if (d.Success) { 789 expires.setTime(expires.getTime() + 30 * 24 * 60 * 60 * 1000); 790 document.cookie = "Jw_SN=" + d.Data.Jw_SN + ";path=/; expires=" + expires.toGMTString(); 791 document.cookie = "Jw_Sex=" + d.Data.Sex + ";path=/; expires=" + expires.toGMTString(); 792 //getJwCategory(takenum, sitecode, finish_event); 793 jw_sn = d.Data.Jw_SN; 794 } 795 } 796 }); 797 } 798 if (jw_sn && jw_sn.length > 0) { 799 //æ¥è¯¢15åécookie 800 var c15min = $.cookie("C15min", { 801 raw: true 802 }); 803 if (c15min && c15min.length > 0) { 804 //15åécookie æå¼è¿å 805 finish_event(RetunJwCategory(takenum, c15min)); 806 } else { 807 //15åécookie æ²¡å¼ 808 Read_CategoryApi(sitecode, jw_sn, takenum, finish_event); 809 } 810 } else { 811 var c7d = $.cookie("C7d", { 812 raw: true 813 }); 814 if (c7d && c7d.length > 0) { 815 //7天cookie æå¼è¿å 816 finish_event(RetunJwCategory(takenum, c7d)); 817 } else { 818 //7天cookie æ²¡å¼ 819 Read_CategoryApi(sitecode, 0, takenum, finish_event); 820 } 821 } 822} 823 824function VisitorSetCategory(intent) { 825 if (intent == null && intent.length == 0) { 826 return; 827 } 828 var expires = new Date(); 829 var c7d = $.cookie("C7d", { 830 raw: true 831 }); 832 var typestr = intent; 833 if (c7d && c7d.length > 0) { 834 //7天cookie æå¼åå¹¶ å»é åsetå°cookieé 835 typestr += "," + c7d; 836 837 } 838 var arr = typestr.split(","); 839 var newArr = new Array; 840 for (var i = 0; i < arr.length; i++) { 841 if (arr[i].length > 6 && arr[i].substring(3) != "000000") { 842 if (newArr.indexOf(arr[i]) < 0) { 843 newArr.push(arr[i]); 844 } 845 846 } 847 if (newArr.length >= 3) { 848 break; 849 } 850 } 851 expires.setTime(expires.getTime() + 7 * 24 * 60 * 60 * 1000); 852 document.cookie = "C7d=" + newArr.join(",") + ";path=/; expires=" + expires.toGMTString(); 853} 854 855function RetunJwCategory(takenum, categoryStr) { 856 var str = ""; 857 var arr = categoryStr.split(','); 858 if (takenum <= arr.length) { 859 for (var i = 0; i < takenum; i++) { 860 if (arr[i].length > 0) { 861 str += arr[i] + ","; 862 } 863 } 864 if (str.indexOf(',') > -1) { 865 str = str.substring(0, str.length - 1); 866 } 867 } else { 868 str = arr.join(","); 869 } 870 return str; 871} 872 873function Read_CategoryApi(sitecode, jw_sn, takenum, finish_event) { 874 var expires = new Date(); 875 $.ajax({
876 url: "//app.bczp.cn/Category/CategoryByJwsn.ashx?SiteCode=" + sitecode + "&Jwsn=" + jw_sn + "&TakeNum=3", 877 type: "get", 878 success: function (data) { 879 if (data.Data.length > 0) { 880 if (jw_sn == 0) { 881 expires.setTime(expires.getTime() + 7 * 24 * 60 * 60 * 1000); 882 document.cookie = "C7d=" + data.Data + ";path=/; expires=" + expires.toGMTString(); 883 finish_event(RetunJwCategory(takenum, data.Data)); 884 } else { 885 expires.setTime(expires.getTime() + 15 * 60 * 1000); 886 document.cookie = "C15min=" + data.Data + ";path=/; expires=" + expires.toGMTString(); 887 finish_event(RetunJwCategory(takenum, data.Data)); 888 } 889 } 890 } 891 }); 892} 893 894function IsInSiteCode(sitecode) { 895 var a = [ 896 "ynzp", 897 "ynkm", 898 "0874", 899 "0877", 900 "0875", 901 "0870", 902 "0888", 903 "0879", 904 "0883", 905 "0878", 906 "0873", 907 "0876", 908 "0691", 909 "0872", 910 "0692", 911 "0886", 912 "0887" 913 ]; 914 var k = false; 915 916 for (var i = 0; i < a.length; i++) { 917 if (sitecode == a[i]) { 918 k = true; 919 break; 920 } 921 } 922 return k; 923} 924function SetDefaultPic(obj) { 925 $(obj).attr("src", "/ent/images/avatar.png"); 926} 927function ImgErrorHide(obj) { 928 $(obj).hide(); 929} 930 931function searchSelect(index) { 932 933 if (index == 0) { 934 $('#search-type span').eq(0).click(); 935 936 $(".SearchParm").each(function () { 937 if ($(this).html().indexOf('å ¨ææç´¢') >= 0) { 938 $(".SearchParm").show(); 939 } 940 }) 941 } else { 942 $('#search-type span').eq(1).click(); 943 944 $(".SearchParm").each(function () { 945 if ($(this).html().indexOf('å ¨ææç´¢') >= 0) { 946 $(".SearchParm").hide(); 947 } 948 }) 949 } 950} 951 952$(function () { 953 // é¼ æ ç§»å ¥ 954 var $icon = $("#bczp-im-icon"); 955 if ($icon) { 956 957 $icon.hover( 958 function () { 959 $(".side-menu").addClass("side-menu-hover"); 960 $(".rightChat2").addClass("side-chat-hover"); 961 }, 962 function () { 963 $(".side-menu").removeClass("side-menu-hover"); 964 $(".rightChat2").removeClass("side-chat-hover"); 965 } 966 ) 967 } 968 969 $(".side-menu").hover( 970 function () { 971 $(".side-menu").addClass("side-menu-hover"); 972 $(".rightChat2").addClass("side-chat-hover"); 973 }, 974 function () { 975 $(".side-menu").removeClass("side-menu-hover"); 976 $(".rightChat2").removeClass("side-chat-hover"); 977 } 978 ) 979 980 981 982 983 984 //妿å¨äººææç´¢é¡µç´æ¥å®ä½æ¾äººæï¼ 985 if (window.location.href.indexOf('resume_search_result.aspx') >= 0) { 986 $(".searchclass .select-head").html('æäººæ <i class="i_down"></i>'); 987 $("#ctl00_panJwKeyword").addClass("hidden"); 988 $("#ctl00_panEntKeyword").removeClass("hidden"); 989 } 990 // èªå®ä¹ä¸æç¹å»å±å¼/æ¶èµ·é»è¾ 991 const selectBoxs = document.querySelectorAll('.custom-select'); 992 if (selectBoxs) { 993 selectBoxs.forEach(box => { 994 const head = box.querySelector('.select-head'); 995 const menu = box.querySelector('.select-menu'); 996 const items = menu.querySelectorAll('li'); 997 let closeTimer = null; // åå¨å»¶æ¶å ³é宿¶å¨ 998 999 // ç¹å»å¤´é¨å±å¼èå 1000 head.addEventListener('click', e => { 1001 e.stopPropagation(); 1002 // å ³éå ¶ä»ä¸æ 1003 document.querySelectorAll('.select-menu').forEach(m => m.style.display = 'none'); 1004 menu.style.display = menu.style.display === 'block' ? 'none' : 'block'; 1005 clearTimeout(closeTimer); 1006 }) 1007 1008 // é¼ æ ç¦»å¼æ´ä¸ªä¸æå®¹å¨ï¼3ç§åå ³é 1009 box.addEventListener('mouseleave', () => { 1010 clearTimeout(closeTimer); 1011 closeTimer = setTimeout(() => { 1012 menu.style.display = 'none'; 1013 }, 1000); 1014 }) 1015 1016 // é¼ æ ç§»å ¥ä¸æåºåï¼æ¸ é¤å计æ¶ï¼ä¸èªå¨å ³é 1017 box.addEventListener('mouseenter', () => { 1018 clearTimeout(closeTimer); 1019 }) 1020 1021 // ç¹å»é项èµå¼å¹¶å ³éèå
1022 items.forEach(item => { 1023 item.addEventListener('click', () => { 1024 head.innerHTML = item.innerText + ' <i class="i_down"></i>'; 1025 menu.style.display = 'none'; 1026 clearTimeout(closeTimer); 1027 }) 1028 }) 1029 }) 1030 // ç¹å»ç©ºç½å¤å ³éææä¸æ 1031 document.addEventListener('click', () => { 1032 document.querySelectorAll('.select-menu').forEach(m => m.style.display = 'none'); 1033 }) 1034 } 1035 1036}) 1037 1038$(function () { 1039 //é¡¶é¨èåä¼å 1040 setTimeout(function () { 1041 const $menuWrap = $(".header-sub #nav_menu"); 1042 if ($menuWrap.length == 0) 1043 return false; 1044 const $allLi = $menuWrap.children("li").not(".more-btn"); 1045 const $moreBtn = $menuWrap.find(".more-btn"); 1046 const $expandMenu = $moreBtn.find(".expand-menu"); 1047 let originLiList = []; // ä¿ååå§å¯¼èªliï¼æ¯æ¬¡è®¡ç®æ¢å¤ 1048 1049 // åå§åç¼ååå§èç¹ 1050 $allLi.each(function () { 1051 originLiList.push($(this).clone(true)); 1052 }); 1053 1054 // æ ¸å¿ï¼è®¡ç®æº¢åºå¹¶æ¶çº³ 1055 function calcOverflowNav() { 1056 // 1. å æä¸æéçliå ¨é¨æ¾å主èå 1057 $expandMenu.children().appendTo($menuWrap).before($moreBtn); 1058 // 2. è¿å为åå§ç¶æ 1059 $menuWrap.children("li").not(".more-btn").remove(); 1060 $.each(originLiList, function (i, $li) { 1061 $li.clone(true).insertBefore($moreBtn); 1062 }); 1063 1064 const wrapWidth = $menuWrap.innerWidth(); 1065 let totalWidth = 0; 1066 const $liItems = $menuWrap.children("li").not(".more-btn"); 1067 const moreWidth = $moreBtn.outerWidth(true); 1068 var IsOut = true 1069 // 循ç¯ç´¯å 宽度ï¼è¶ åºå®¹å¨åç§»å ¥ä¸æ 1070 $liItems.each(function () { 1071 const $item = $(this); 1072 const itemW = $item.outerWidth(true); 1073 if (IsOut) { 1074 1075 1076 // å½å累计 + å½å项 + æ´å¤æé®å®½åº¦ > 容å¨å®½åº¦ â æº¢åºï¼ç§»å ¥ä¸æ 1077 if (totalWidth + itemW + moreWidth > wrapWidth) { 1078 $item.appendTo($expandMenu); 1079 IsOut = false; 1080 } else { 1081 totalWidth += itemW; 1082 } 1083 1084 } else { 1085 $item.appendTo($expandMenu); 1086 } 1087 }); 1088 1089 // 妿䏿æå å®¹ï¼æ¾ç¤ºåç°+ï¼æ å 容å¯éèï¼å¯éï¼ 1090 if ($expandMenu.children().length > 0) { 1091 $moreBtn.show(); 1092 } else { 1093 $moreBtn.hide(); 1094 } 1095 1096 $(".header-sub #nav_menu").css("opacity","1"); 1097 } 1098 1099 // ç¹å»å±å¼/æ¶èµ·ä¸æ 1100 $moreBtn.on("click", function (e) { 1101 e.stopPropagation(); 1102 $(this).toggleClass("active"); 1103 }); 1104 // ç¹å»é¡µé¢ç©ºç½å ³é䏿 1105 $(document).on("click", function () { 1106 $moreBtn.removeClass("active"); 1107 }); 1108 1109 // 页é¢å è½½ãçªå£ç¼©æ¾æ§è¡è®¡ç® 1110 calcOverflowNav(); 1111 //$(window).on("resize", calcOverflowNav); 1112 }, 10) 1113 1114});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.