1$(function(){ 2 // è§é¢ææ¾æä»¶ (ä¼å½±åè§é¢èªå¨ææ¾åè½) 3 const noPlyrUrl = ['/'] 4 if (!noPlyrUrl.includes(window.location.pathname)) { 5 plyr.setup(); 6 } 7 8 // å表åç´æ»å¨ 9 $('.J-Audience').myScroll({ 10 speed: 40, //æ°å¼è¶å¤§ï¼éåº¦è¶æ ¢ 11 rowHeight: 33 //liçé«åº¦ 12 }); 13 14 if($(".counter").length > 0){ 15 $('.counter').countUp() 16 } 17 18 var mySwiper = new Swiper ('.js-newcoment', { 19 // direction: 'vertical', // åç´åæ¢é项 20 loop: true, // å¾ªç¯æ¨¡å¼é项 21 slidesPerView:2, 22 spaceBetween:40, 23 prevButton:'.js-newcoment-prev', 24 nextButton:'.js-newcoment-next', 25 breakpoints: { 26 27 //å½å®½åº¦å°äºçäº640 28 640: { 29 slidesPerView: 1, 30 spaceBetween: 0 31 } 32 } 33 }); 34 35 36 $('#exareabox').on('click','.js-tabitem',function(){ 37 var _this = $(this), 38 _index = _this.index(); 39 _this.addClass('current').siblings().removeClass('current'); 40 $('#exareabox').find('.js-showbox-item').eq(_index).slideDown().siblings().slideUp(); 41 42 43 }); 44 45 46 var images = new Swiper('.images-swiper', { 47 slidesPerView: 3, 48 spaceBetween: 20, 49 nextButton: '.images-btn-next', 50 prevButton: '.images-btn-prev', 51 breakpoints: { 52 640: { 53 slidesPerView: 1, 54 spaceBetween: 15, 55 } 56 } 57 }); 58 59 60 // ç¸å 61 $("a.itemtype-image").fancybox({ 62 helpers: { 63 overlay: { 64 locked: false 65 } 66 } 67 }); 68 69 // å¦ä½åå± 70 if($('.J-Quick-box').length > 0){ 71 var _cssLink = '<link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">'; 72 $('head').append(_cssLink); 73 74 topheight = $('.J-Quick-box').offset().top + 20; 75 $(".J-Quick-box").css('width',$('.whyjam-box').width()); 76 $(window).scroll(function(){ 77 var deviation = $(document).scrollTop(); 78 79 80 if(deviation > topheight){ 81 $(".J-Quick-box").css("position","fixed"); 82 $(".J-Quick-box").css({ 83 'position':'fixed', 84 'top':'47px', 85 86 }); 87 }else{ 88 89 $(".J-Quick-box").css("position",""); 90 } 91 }); 92 var w_wid = $(window).width(); 93 var m_left = (w_wid - $('.whyjam-box').width())/2; 94 $('.J-Quick-box').css('left',m_left+'px'); 95 96 $(window).resize(function(){ 97 w_wid = $(window).width(); 98 m_left = (w_wid - $('.whyjam-box').width())/2; 99 $('.J-Quick-box').css('left',m_left+'px'); 100 if(w_wid < 1200){ 101 $('.J-Quick-box').hide(); 102 } 103 }); 104 105 if(w_wid < 1200){ 106 $('.J-Quick-box').hide(); 107 } 108 109 110 } 111 112 113 var w=$(document).width(); 114 115 // var winWidth=$('body').width(); 116 var num=0; 117 var banner_length=$('.banner-li').length; 118 var timer; 119 120 var a=$('.banner-li').eq(0).html(); 121 $('.banner-ul').last().append('<li class="banner-li">'+a+'</li>'); 122 123 124 function run(){ 125 num++; 126 if (banner_length==1) { 127 num=0; 128 }else{ 129 if(num>banner_length){ 130 num=1; 131 $('.banner-ul').css({left: 0}); 132 } 133 } 134 135 var winWidth=$('body').width(); 136 $('.banner-ul').stop().animate({'left':-num*winWidth},500) 137 138 } 139 timer=setInterval(run,8000) 140 141 142 143 $('.banner-r').click(function(){ 144 clearInterval(timer); 145 num++; 146 if(num>banner_length){ 147 num=1; 148 $('.banner-ul').css({left: 0}); 149 } 150 var winWidth=$('body').width(); 151 $('.banner-ul').stop().animate({'left':-num*winWidth},500) 152 153 timer=setInterval(run,8000) 154 }); 155 156 $('.banner-l').click(function(){ 157 clearInterval(timer) 158 num--; 159 var winWidth=$('body').width(); 160 if(num<0){ 161 num=banner_length-1; 162 $('.banner-ul').css({left: -banner_length*winWidth}); 163 } 164 $('.banner-ul').stop().animate({'left':-num*winWidth},500) 165 timer=setInterval(run,8000) 166 }); 167 168 // å±ååå 169 var roll_num=0; 170 var roll_li=w > 760 ? $('.Exhibitor-roll-li').length-5 : $('.Exhibitor-roll-li').length-7; 171 function schedule(){ 172 var num2=w > 760 ? roll_num+4 : roll_num+6; 173 $('.Exhibitor-roll-li').removeClass('hidden'); 174 $('.Exhibitor-roll-li:gt('+num2+')').addClass('hidden'); 175 $('.Exhibitor-roll-li:lt('+roll_num+')').addClass('hidden'); 176 } 177 schedule(); 178 $('.Exhibitor-roll-l').click(function(event) { 179 roll_num--; 180 if(roll_num<=0){ 181 roll_num=0; 182 } 183 schedule(); 184 }); 185 $('.Exhibitor-roll-r').click(function(event) { 186 roll_num++; 187 if(roll_num>=roll_li){ 188 roll_num=roll_li; 189 } 190 schedule(); 191 }); 192 193 var partner_num=0; 194 var time2; 195 196 //var c = w > 979 ? 3 : 2; 197 /*var partner_li= w > 760 ? $('.index-partner-li').length-7 : $('.index-partner-li').length-3; 198 199 function schedule2(){ 200 var num2=w > 760 ? partner_num+7 : partner_num+2; 201 $('.index-partner-li').removeClass('hidden'); 202 $('.index-partner-li:gt('+num2+')').addClass('hidden'); 203 $('.index-partner-li:lt('+partner_num+')').addClass('hidden'); 204 } 205 schedule2(); 206 function run2(){ 207 partner_num=w > 760 ? partner_num+8 : partner_num+3; 208 if(partner_num>partner_li){ 209 partner_num=0; 210 } 211 schedule2(); 212 213 } 214 timer2=setInterval(run2,3000) 215 216 $('.partner-roll-l').click(function(event) { 217 clearInterval(timer2) 218 partner_num=w > 760 ? partner_num-8 : partner_num-3; 219 if(partner_num<=0){ 220 partner_num=0; 221 } 222 schedule2(); 223 timer2=setInterval(run2,3000) ; 224 }); 225 $('.partner-roll-r').click(function(event) { 226 clearInterval(timer2) 227 partner_num=w > 760 ? partner_num+8 : partner_num+3; 228 if(partner_num>partner_li){ 229 partner_num=partner_li; 230 } 231 schedule2(); 232 timer2=setInterval(run2,3000) 233 });*/ 234var partner_li= w > 760 ? $('.index-partner-li').length-11 : $('.index-partner-li').length-3; 235 236 function schedule2(){ 237 var num2=w > 760 ? partner_num+11 : partner_num+2; 238 $('.index-partner-li').removeClass('hidden'); 239 $('.index-partner-li:gt('+num2+')').addClass('hidden'); 240 $('.index-partner-li:lt('+partner_num+')').addClass('hidden'); 241 } 242 schedule2(); 243 function run2(){ 244 partner_num=w > 760 ? partner_num+12 : partner_num+3; 245 if(partner_num>partner_li){ 246 partner_num=0; 247 } 248 schedule2(); 249 250 } 251 timer2=setInterval(run2,3000) 252 253 $('.partner-roll-l').click(function(event) { 254 clearInterval(timer2) 255 partner_num=w > 760 ? partner_num-12 : partner_num-3; 256 if(partner_num<=0){ 257 partner_num=0; 258 } 259 schedule2(); 260 timer2=setInterval(run2,3000) ; 261 }); 262 $('.partner-roll-r').click(function(event) { 263 clearInterval(timer2) 264 partner_num=w > 760 ? partner_num+12 : partner_num+3; 265 if(partner_num>partner_li){ 266 partner_num=partner_li; 267 } 268 schedule2(); 269 timer2=setInterval(run2,3000) 270 }); 271 272 273 274 275 276 if (w>760) { 277 $(".new-row .new-text").each(function(){ 278 var maxwidth=50; 279 if($(this).text().length>maxwidth){ 280 $(this).text($(this).text().substring(0,maxwidth)); 281 $(this).html($(this).html()+'â¦'); 282 } 283 }) 284 }else{ 285 $(".new-row .new-text").each(function(){ 286 var maxwidth=200; 287 if($(this).text().length>maxwidth){ 288 $(this).text($(this).text().substring(0,maxwidth)); 289 $(this).html($(this).html()+'â¦'); 290 } 291 }) 292 } 293 294 $(".new-list-content .new-text").each(function(){ 295 var maxwidth=120; 296 if($(this).text().length>maxwidth){ 297 $(this).text($(this).text().substring(0,maxwidth)); 298 $(this).html($(this).html()+'â¦'); 299 } 300 }) 301 302 303 // æç´¢é¨å模æä¸ææ¡ 304 $(".Search-ComboBox-text").click(function(){ 305 var ul = $(".Search-ComboBox-ul"); 306 if(ul.css("display")=="none"){ 307 ul.slideDown("fast"); 308 }else{ 309 ul.slideUp("fast"); 310 } 311 }); 312 $(".Search-ComboBox-li a").click(function(){ 313 var txt = $(this).text(); 314 $(".Search-ComboBox-text").html(txt); 315 var value = $(this).attr("rel"); 316 window.location.href = value; 317 //$(".Search-ComboBox-ul").slideUp("fast"); 318 }); 319 320 $('body').click(function(e) { 321 var c=$(e.target).parents(); 322 // if(!c.hasClass("Search-ComboBox")){ 323 // $(".Search-ComboBox-ul").slideUp("fast"); 324 // } 325 326 }); 327 328 //$('.fs-tiny').click(function(event) { 329 // $('.standard span').removeClass('cur'); 330 // $(this).addClass('cur');
331 // CBDtools.setCookie("", 60 * 24 * 30, "site-view-info", "font-size"); 332 // $('body').removeClass('middle-body').removeClass('big-body'); 333 //}); 334 335 //$('.fs-middle').click(function(event) { 336 // $('.standard span').removeClass('cur'); 337 // $(this).addClass('cur'); 338 // CBDtools.setCookie("middle-body", 60 * 24 * 30, "site-view-info", "font-size"); 339 // $('body').addClass('middle-body').removeClass('big-body'); 340 341 //}); 342 //$('.fs-big').click(function(event) { 343 // $('.standard span').removeClass('cur'); 344 // $(this).addClass('cur'); 345 // CBDtools.setCookie("big-body", 60 * 24 * 30, "site-view-info", "font-size"); 346 // $('body').removeClass('middle-body').addClass('big-body'); 347 348 //}); 349 350 351 $("#page-font-setting .page-font-setting-i").click(function () { 352 var items = $(this).parents("#page-font-setting").find(".page-font-setting-i").removeClass("cur"); 353 items.each(function (index, item) { 354 var relClass = $(item).attr("rel-class"); 355 if (relClass.length > 0) 356 { 357 $('body').removeClass(relClass); 358 } 359 }); 360 361 $(this).addClass("cur"); 362 var relClass = $(this).attr("rel-class"); 363 if (relClass.length > 0) 364 { 365 $('body').addClass(relClass); 366 } 367
368 CBDtools.setCookie(encodeURIComponent(relClass), 60 * 24 * 30, "siteviewinfo", "fontsize"); 369 370 }) 371 372 $('.app-nav-p').click(function(event) { 373 $(this).parents('.app-nav-li').siblings('.app-nav-li').slideUp(200); 374 $(this).siblings('.app-sub-nav').slideDown(300); 375 $(this).removeClass('app-nav-p-after'); 376 $(this).css({'backgroundColor':'#009452','color':'#FFF'}); 377 $('.app-return').css({"display":"block"}); 378 }); 379 $('.app-return').click(function(event){ 380 var appNav=$(this).parents('.app-nav-row'); 381 $(this).css({"display":"none"}); 382 appNav.find('.app-nav-li').slideDown(100); 383 appNav.find('.app-sub-nav').slideUp(100); 384 appNav.find('.app-nav-p').css({'background':'none','color':'#222'}); 385 386 $('.app-nav-p').each(function(index, el) { 387 if ($(this).siblings('.app-sub-nav').length>0) { 388 $(this).addClass('app-nav-p-after'); 389 } 390 }); 391 }) 392 393 $('.app-nav-row .app-icons').click(function(event) { 394 $(this).parents('body').find('.app-nav-row').hide(); 395 $(this).parents('body').removeClass('body-fixed'); 396 }); 397 398 399 $('.app-icon-open').on('click',function(event) { 400 if($('body').hasClass('body-fixed')){ 401 $(this).parents('body').find('.app-nav-row').hide(); 402 $(this).parents('body').removeClass('body-fixed'); 403 }else{ 404 $(this).parents('body').find('.app-nav-row').show(); 405 $(this).parents('body').addClass('body-fixed'); 406 } 407 }); 408 409 410 $('.app-nav-p').each(function(index, el) { 411 if ($(this).siblings('.app-sub-nav').length>0) { 412 $(this).addClass('app-nav-p-after'); 413 $(this).attr({ 414 href: 'Javascript: void(0)' 415 }); 416 } 417 }); 418 419 $(window).scroll(function(){ 420 var hei=$(window).scrollTop(); 421 // alert(hei) 422 if(hei>51){ 423 $('.nav-row-box').addClass('suspend-row '); 424 $('header').addClass('header-margin') 425 }else{ 426 $('.nav-row-box').removeClass('suspend-row '); 427 $('header').removeClass('header-margin') 428 } 429 430 }) 431 432 var numShowcase=0; 433 // var lengthShowcase=$('.banner-li').length+1; 434 var lengthShowcase=$('.index-Showcase-li').length; 435 436 437 $('.index-Showcase-r').click(function(){ 438 var winWidth=$('body').width(); 439 440 numShowcase++; 441 if(numShowcase>=lengthShowcase){ 442 numShowcase=lengthShowcase-1; 443 } 444 $('.index-Showcase-ul').stop().animate({'left':-numShowcase*winWidth},500) 445 }); 446 447 $('.index-Showcase-l').click(function(){ 448 var winWidth=$('body').width(); 449 450 numShowcase--; 451 if(numShowcase<0){ 452 numShowcase=0; 453 } 454 $('.index-Showcase-ul').stop().animate({'left':-numShowcase*winWidth},500) 455 456 }); 457 458 459 //åææ´»å¨ 460 // $('.event-tab tbody tr td').click(function(){ 461 // var eventSub=$(this).find('.event-sub'); 462 // if(eventSub.hasClass('hidden')){ 463 // eventSub.removeClass('hidden').parents('tr').siblings('tr').find('.event-sub').addClass('hidden'); 464 // }else{ 465 // eventSub.addClass('hidden').parents('tr').siblings('tr').find('.event-sub').removeClass('hidden'); 466 // } 467 // }) 468 469 470 471 472}); 473 474 475 476// $(function () { 477// // var font = CBDtools.getCookie("siteviewinfo", "fontsize"); 478// var font = sessionStorage.typeface("siteviewinfo", "fontsize"); 479// if (font.length > 0) 480// { 481 482 483// var item = $("#page-font-setting .page-font-setting-i[rel-class='" + font + "']"); 484 485// if (item.length > 0) 486// { 487// $("#page-font-setting .page-font-setting-i").removeClass("cur"); 488// $('body').addClass(font); 489// item.addClass("cur") 490// } 491 492// } 493// }) 494 495 496$(function () { 497 $('.fs-tiny').click(function(event) { 498 $('body').removeClass('middle-body').removeClass('big-body'); 499 $(this).addClass("cur").siblings().removeClass('cur'); 500 localStorage.fs='0'; 501 }); 502 $('.fs-middle').click(function(event) { 503 $('body').addClass('middle-body').removeClass('big-body'); 504 $(this).addClass("cur").siblings().removeClass('cur'); 505 localStorage.fs='1'; 506 }); 507 $('.fs-big').click(function(event) { 508 $('body').removeClass('middle-body').addClass('big-body'); 509 $(this).addClass("cur").siblings().removeClass('cur') 510 localStorage.fs='2'; 511 }); 512 513 if(localStorage.fs==undefined){ 514 localStorage.fs='1' 515 }
516 if(localStorage.fs=='0'){ 517 $('body').removeClass('middle-body').removeClass('big-body'); 518 $('.page-font-setting-i').removeClass('cur').eq(0).addClass('cur'); 519 } 520 if(localStorage.fs=='1'){ 521 $('body').addClass('middle-body').removeClass('big-body'); 522 $('.page-font-setting-i').removeClass('cur').eq(1).addClass('cur') 523 } 524 if(localStorage.fs=='2'){ 525 $('body').removeClass('middle-body').addClass('big-body'); 526 $('.page-font-setting-i').removeClass('cur').eq(2).addClass('cur') 527 } 528 529 530if(!$(".swiper-container-1").length == 0){ 531 532 var mySwiper = new Swiper('.swiper-container-1', { 533 nextButton: '.swiper-button-next', 534 prevButton: '.swiper-button-prev', 535 pagination: '.swiper-pagination', 536 loop:true, 537 observer: true, 538 spaceBetween: 0, 539 observeParents: true 540 }); 541 542} 543 544if(!$(".swiper-container-2").length == 0){ 545 var mySwiper = new Swiper('.swiper-container-2', { 546 nextButton: '.comments-button-next', 547 prevButton: '.comments-button-prev', 548 slidesPerView: 2, 549 slidesPerGroup: 2, 550 loop:true, 551 observer: true, 552 spaceBetween: 50, 553 observeParents: true, 554 breakpoints: { 555 768: { 556 slidesPerView: 1, 557 slidesPerGroup: 1, 558 spaceBetween: 30, 559 } 560 } 561 }); 562 563} 564 565if(!$(".swiper-container-3").length == 0){ 566 567 var mySwiper = new Swiper('.swiper-container-3', { 568 nextButton: '.news-button-next', 569 prevButton: '.news-button-prev', 570 slidesPerView: 3, 571 loop:true, 572 observer: true, 573 spaceBetween: 45, 574 observeParents: true, 575 breakpoints: { 576 768: { 577 slidesPerView: 1, 578 spaceBetween: 30, 579 } 580 } 581 }); 582 583} 584if(!$(".swiper-container-4").length == 0){ 585 586 var mySwiper = new Swiper('.swiper-container-4', { 587 nextButton: '.introduced-button-next', 588 prevButton: '.introduced-button-prev', 589 slidesPerView: 4, 590 loop:false, 591 observer: true, 592 spaceBetween: 46, 593 observeParents: true 594 }); 595 596} 597if(!$(".swiper-container-5").length == 0){ 598 599 var mySwiper = new Swiper('.swiper-container-5', { 600 nextButton: '.swiper-button-next', 601 prevButton: '.swiper-button-prev', 602 pagination: '.swiper-pagination', 603 loop:true, 604 observer: true, 605 spaceBetween: 0, 606 observeParents: true 607 }); 608} 609 610var prohighlightSwiper = new Swiper('.prohighlight-swiper', { 611 paginationClickable: true, 612 autoplay: 5000, 613 slidesPerView: 3, 614 slidesPerGroup: 3, 615 slidesPerColumn: 2, 616 spaceBetween: 10, 617 pagination: '.prohighlight-pagination', 618 breakpoints: { 619 768: { 620 slidesPerView: 2, 621 slidesPerGroup: 2, 622 } 623 } 624 }); 625 626var prohighlightSwiper = new Swiper('.vstmessage-swiper', { 627 paginationClickable: true, 628 autoplay: 5000, 629 slidesPerView: 1, 630 slidesPerColumn: 2, 631 spaceBetween: 30, 632 nextButton: '.vstmessage-btn-next', 633 prevButton: '.vstmessage-btn-prev', 634 }); 635 636 637 638 $('.advisory-input,.search-input').focus(function(){ 639 $(this).addClass("curr"); 640 }) 641 $('.advisory-input,.search-input').blur(function(){ 642 $(this).removeClass("curr"); 643 }) 644 645 646 // $(".advisory-input").val(""); 647 // $(".advisory-input").focusout(function(){ 648 // if($(this).val() != ""){ 649 // $(this).addClass("has-content"); 650 // }else{ 651 // $(this).removeClass("has-content"); 652 // } 653 // }) 654 655if($(".Right-suspension-x").length != 0){ 656 657 var topheight = $(".Right-suspension-x").offset().top - 79; 658 659 $(window).scroll(function(){ 660 var deviation = $(document).scrollTop(); 661 662 if(deviation > topheight){ 663 // $(".Right-suspension-x").css("position","fixed"); 664 $(".Right-suspension-x").addClass("fixed"); 665 }else{ 666 $(".Right-suspension-x").removeClass("fixed"); 667 // $(".Right-suspension-x").css("position",""); 668 } 669 }); 670 671} 672 673if($(".Right-suspension-shrinkage").length != 0){ 674 var topheight2 = $(".Right-suspension-shrinkage").offset().top + 220; 675 676 $(window).scroll(function(){ 677 var deviation2 = $(document).scrollTop(); 678 679 // if(deviation2 > topheight2){ 680 // $(".Right-suspension-shrinkage").slideUp(); 681 // $(".Right-suspension-con-s").css({ 682 // "background":"#009452" 683 // }); 684 // }else{ 685 686 $(".Right-suspension-shrinkage").slideDown(); 687 $(".Right-suspension-con-s").css({ 688 "background":"#009452" 689 }); 690 // } 691 }); 692 693 // $(".Right-suspension-con-s").hover(function(){ 694 // $(".Right-suspension-shrinkage").stop().slideDown(); 695 // $(".Right-suspension-con-s").css({ 696 // "background":"#009452" 697 // }); 698 // }) 699 700} 701 702}) 703 704 705 706
707 //åªä½ç®æ¥ 708 $(function(){ 709 if(!$("#pageloding").length ==0){ 710 var mediahtml='<style href="/static/home/cn/js/css/jPages.css" rel="stylesheet"></style><script src="/static/home/cn/js/jPages.js"></script>'; 711 $('#pageloding').html(mediahtml); 712 $("div.holder").jPages({ 713 containerID : "movies", 714 previous : "â", 715 next : "â", 716 perPage : 10 717 }); 718 } 719 720 }); 721 722 723 724// å¬åä¸åº- è§ä¼å表æ»å¨ææ 725$(function(){ 726 $.fn.myScroll = function(options) { 727 //é»è®¤é ç½® 728 var defaults = { 729 speed: 40, //æ»å¨é度,å¼è¶å¤§éåº¦è¶æ ¢ 730 rowHeight: 24 //æ¯è¡çé«åº¦ 731 }; 732 733 var opts = $.extend({}, defaults, options), 734 intId = []; 735 736 function marquee(obj, step) { 737 738 obj.find("ul").animate({ 739 marginTop: '-=1' 740 }, 0, function() { 741 var s = Math.abs(parseInt($(this).css("margin-top"))); 742 if (s >= step) { 743 $(this).find("li").slice(0, 1).appendTo($(this)); 744 $(this).css("margin-top", 0); 745 } 746 }); 747 } 748 749 this.each(function(i) { 750 var sh = opts["rowHeight"], 751 speed = opts["speed"], 752 _this = $(this); 753 intId[i] = setInterval(function() { 754 if (_this.find("ul").height() <= _this.height()) { 755 clearInterval(intId[i]); 756 } else { 757 marquee(_this, sh); 758 } 759 }, speed); 760 761 _this.hover(function() { 762 clearInterval(intId[i]); 763 }, function() { 764 intId[i] = setInterval(function() { 765 if (_this.find("ul").height() <= _this.height()) { 766 clearInterval(intId[i]); 767 } else { 768 marquee(_this, sh); 769 } 770 }, speed); 771 }); 772 773 }); 774 775 } 776 $('.visit-info').myScroll({ 777 speed: 80, //æ°å¼è¶å¤§ï¼éåº¦è¶æ ¢ 778 rowHeight: 30 //liçé«åº¦ 779 }); 780 781 782 783 // å¬åä¸åºè¡¨å-start 784 $(".checkboxparent-list .radio.select-sub").change(function () { 785 var row = $(this).parents(".checkboxparent-list"); 786 var sub_row = row.find(".answer-sub-itmes"); 787 var sub_row_input=sub_row.find("input").prop("checked", false); 788 row.siblings(".checkboxparent-list").find('.answer-sub-itmes').find('input').removeAttr("checked"); 789 row.siblings(".checkboxparent-list").find('.answer-sub-itmes').hide(); 790 if (sub_row.length > 0) 791 { 792 var isChecked = $(this).prop("checked", true); 793 if (isChecked) { 794 $(this).prop("checked", true); 795 sub_row_input.removeAttr("checked"); 796 row.siblings(".checkboxparent-list").find(".select-sub").removeAttr("checked"); 797 798 row.addClass("sub-row-show"); 799 sub_row.show(); 800 } 801 } 802 }); 803 804 $(".answer-sub-itmes input:checked").each(function(i, item) { 805 $(this).parents('.answer-sub-itmes').show(); 806 $(this).parents('.answer-sub-itmes').siblings('.checkbox-box').find('.select-sub').prop("checked", true); 807 }) 808 809 $(".checkboxparent-list .checkbox.select-sub").change(function () { 810 811 var row = $(this).parents(".checkboxparent-list"); 812 var sub_row = row.find(".answer-sub-itmes"); 813 var sub_row_input=sub_row.find("input").prop("checked", false); 814 if (sub_row.length > 0) 815 { 816 if ($(this).is(':checked')) { 817 $(this).prop("checked", true); 818 sub_row_input.removeAttr("checked"); 819 row.addClass("sub-row-show"); 820 sub_row.show(); 821 }else{ 822 $(this).prop("checked", false); 823 sub_row_input.removeAttr("checked"); 824 row.removeClass("sub-row-show"); 825 sub_row.hide(); 826 } 827 } 828 }); 829 830 // // é®ç®±éªè¯ 831 $("[name=email]").blur(function(){ 832 var me = $(this); 833 var email = $(this).val(); 834 835 var search_str = /^[\w\-\.]+@[\w\-\.]+(\.\w+)+$/; 836 if(!search_str.test(email)){ 837 layer.msg("请è¾å ¥æ¨ççµåé®ä»¶"); 838 me.parents('.J-inp-w').addClass('has-error'); 839 return; 840 } 841 842 }); 843 844 // ææºéªè¯ 845 $("[name=personal_mobile_num]").blur(function(){ 846 847 var mbMoblie=$(this).val(); 848 849 var myreg = /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/; 850 if(!myreg.test(mbMoblie)){ 851 layer.msg("请è¾å ¥æ£ç¡®ççµè¯å·ç "); 852 $("[name=personal_mobile_num]").parents(".J-inp-w").addClass("has-error"); 853 return; 854 } 855 856 857 }); 858 859 860 861 862 $('[name="CompanyCountry"]').change(function () { 863 864 var v = $(this).val(); 865 866 var option = $(this).find("option:selected"); 867 if (option.length > 0 && option.val()>0) 868 { 869 var code = $(option).attr("code"); 870 871 $("[name='personal_mobile_country']").val("+" + code) + " "; 872 } 873 console.log(v) 874 875 }).change(); 876 877 $('#sub_btn').click(function (){ 878 var cs = 'J-type2'; 879 if($('.J-type1 .ticket-sub').hasClass('curr')){ 880 layer.msg("请ä¸è¦éå¤æäº¤"); 881 return; 882 } 883 884 var cls = "."+cs+" "; 885 886 var data = {} 887 $(cls+".J-input").each(function(){ 888 var me = $(this); 889 data[me.attr('name')] = me.val(); 890 891 if(me.val() == ""){ 892 me.parents(".J-inp-w").addClass("has-error"); 893 } 894 895 }); 896 897 898 899 // php 900 console.log(data) 901 902 // data.chkFirstTime = $(cls+'[name=chkFirstTime]:checked').val(); 903 904 data.passport_country = $(cls+'#CompanyCountry').val(); 905 906 907 // è´µå ¬å¸çä¸å¡æ§è´¨ 908 if ($("[name=xingzhi_sub]:checked").length > 0) { 909 data.chkVisit_Spring = $("[name=xingzhi_sub]:checked").val(); 910 911 } 912 else { 913 if ($("[name=xingzhi]:checked").length >0) { 914 data.chkVisit_Spring= $("[name=xingzhi]:checked").val(); 915 } 916 } 917 918 // æå ´è¶£ç产å/è®¾å¤ 919 data.chkVisit_Autumn = []; 920 $(".chkInterested:checked").each(function (index, item) { 921 var v = $(item).val(); 922 data.chkVisit_Autumn.push(v); 923 }) 924 925 926 if(data.passport_country == '-1'){ 927 928 $(cls+'#CompanyCountry').parents(".J-inp-w").addClass("has-error"); 929 } 930 931 932 // net æ°æ® 933 934 var txtName = $(cls+'#txtName').val(); 935 var idcard = $(cls+'#txtIdcard').val(); 936 var txtEmail = $(cls+'#txtEmail').val(); 937 var txtPhone = $(cls+'#txtPhone').val(); 938 var txtCompany = $(cls+'#txtCompany').val(); 939 var xingzhi_sub = $('input[name=xingzhi_sub]:checked').val(); 940 var xingzhi_sub1 = $('input[name=xingzhi]:checked').val(); 941 console.log(txtEmail,txtPhone); 942 var arr = []; 943 $('input[name=Interested_i]').each(function () { 944 if ($(this).prop('checked')) { 945 arr.push($(this).val()); 946 } 947 }); 948 // è´µå ¬å¸çä¸å¡æ§è´¨ 949 var ddBusinessType = 0; 950 if ($("[name=xingzhi_sub]:checked").length > 0) { 951 ddBusinessType = $("[name=xingzhi_sub]:checked").val(); 952 console.log("11") 953 954 } 955 else { 956 if ($("[name=xingzhi]:checked").length >0) { 957 ddBusinessType= $("[name=xingzhi]:checked").val(); 958 xingzhi_sub = xingzhi_sub1; 959 } 960 } 961 962 //èº«ä»½è¯æ¯å¦æ¯18ä½ 963 if($(cls+'#txtName').val().length !== 15 && $('#txtIdcard').val().length !==18 ){ 964 layer.msg('请è¾å ¥ææç身份è¯å·ç '); 965 return; 966 } 967 968 // æå ´è¶£ç产å/è®¾å¤ 969 // var chkInterested = ""; 970 // $(".chkInterested:checked").each(function (index, item) { 971 972 // var v = $(item).val(); 973 // chkInterested += (chkInterested.length > 0 ? "," : "") + v; 974 // }) 975 976 // if($("[name='xingzhi']:checked").length == 0){ 977 // layer.msg("è¯·éæ©è´µå ¬å¸çä¸å¡æ§è´¨") 978 // return false;
979 // } 980 // if($("[name='xingzhi']:checked").parents(".checkboxparent-list").hasClass("sub-row-show") == true && $(".sub-row-show [name='xingzhi_sub']:checked").length == 0){ 981 // layer.msg("è¯·éæ©äºçº§") 982 // return false; 983 // } 984 // if(chkInterested == ""){ 985 // layer.msg("è¯·éæ©æå ´è¶£ç产å/设å¤") 986 // return false; 987 // } 988 // if($("[name='Interested_w']:checked").parents(".checkboxparent-list").hasClass("sub-row-show") == true && $(".sub-row-show [name='Interested_i']:checked").length == 0){ 989 // layer.msg("è¯·éæ©äºçº§") 990 // return false; 991 // } 992 993 994 var data2 = { 995 truename: txtName, 996 idcard:idcard, 997 company: txtCompany, 998 email: txtEmail, 999 mobile: txtPhone, 1000 // type: xingzhi_sub, 1001 // interest: arr.join(','), 1002 lang: 'cn' 1003 }; 1004 // net æ°æ® 1005 console.log(data2); 1006 if(data.chkFirstTime == null){ 1007 $(cls+'[name=chkFirstTime]').parents(".J-inp-w").addClass("has-error"); 1008 } 1009 if(data.chkVisit_Spring == 0 && data.chkVisit_Autumn == 0){ 1010 $(cls+'[name=chkVisit_Spring]').parents(".J-inp-w").addClass("has-error"); 1011 } 1012 1013 // æ¬å° 1014 if(cs=="J-type1"){ 1015 localStorage.setItem('dt',JSON.stringify(data)); 1016 } 1017 1018 // æ¬å° 1019 1020 if($(".has-error").length >= 1){ 1021 return; 1022 } 1023 1024 1025 layer.msg('æ£å¨æäº¤', { 1026 icon: 16 1027 ,shade: 0.01 1028 ,time:0 1029 }); 1030 1031 1032 1033 // net æ°æ® 1034 $.ajax({ 1035 url:'/api/apply_ticket', 1036 type:'post', 1037 data:data2, 1038 dataType:'json', 1039 success:function(res){ 1040 1041 if(res.code == 1){ 1042 layer.closeAll(); 1043 1044 var win = $(window).width(); 1045 if(win < 680){ 1046 1047 layerW = '85%'; 1048 }else{ 1049 1050 layerW = '600px'; 1051 } 1052 1053 layer.open({ 1054 type: 1 1055 ,title: false //䏿¾ç¤ºæ 颿 1056 ,closeBtn: false 1057 ,area: layerW 1058 ,shade: 0.8 1059 ,id: 'success-box-id' //设å®ä¸ä¸ªidï¼é²æ¢éå¤å¼¹åº 1060 ,resize: false 1061 ,btn: ['OK'] 1062 ,btnAlign: 'c' 1063 ,moveType: 1 //ææ½æ¨¡å¼ï¼0æè 1 1064 ,content:$(".success-box") 1065 ,success: function(layero){ 1066 var btn = layero.find('.layui-layer-btn'); 1067 btn.find('.layui-layer-btn0').attr({ 1068 // href: 'http://www.crexpo.cn/c.aspx?id=332' 1069 href: 'https://www.crexpo.cn/' 1070 ,target: '_blank' 1071 }); 1072 } 1073 }); 1074 }else{ 1075 layer.msg(res.msg); 1076 } 1077 }, 1078 error:function(reg){ 1079 layer.msg(res.msg); 1080 } 1081 }) 1082 }); 1083 1084 $('.J-input').focus(function(){ 1085 var me = $(this); 1086 me.parents(".J-inp-w").removeClass("has-error"); 1087 }); 1088 // å¬åä¸åºè¡¨å-end 1089 1090}) 1091 1092 1093 1094 //è·åcookie 1095 function getCookie(name){ 1096 var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)"); 1097 if(arr=document.cookie.match(reg)) 1098 return unescape(arr[2]); 1099 else 1100 return null; 1101 } 1102 /** 1103 * åå¨cookie 1104 * */ 1105 function setCookie($name, $value, $expire=0, $path='/', $domain='', $secure=false) {
1106 document.cookie = $name + '=' + $value + ";expires=" + $expire + ';' +$path + ';' + $domain + ';' + $secure; 1107 1108 //æè 1109 document.cookie = $name + "=" + $value + ";expires=" + $expire + "; path=" + $path + "; domain=" + $domain + ";" + $secure; 1110 1111 //æè 1112 var cookieText = ''; 1113 cookieText += $name + '=' + $value; 1114 cookieText += "; expires=" + $expire; 1115 if ($path) { 1116 cookieText += "; path=" + $path; 1117 } 1118 if ($domain) { 1119 cookieText += "; domain=" + $domain; 1120 } 1121 if ($secure) { 1122 cookieText += "; secure"; 1123 } 1124 document.cookie = cookieText; 1125 } 1126 1127 // å é¤cookie 1128 function deleteCookie(name, path = '/', domain = '') { 1129 setCookie(name, "", -1, path, domain); 1130}
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.