1 var cjProtocol = window.location.protocol.split(':')[0]; 2 if (cjProtocol === 'https') { 3 var API = 'https://api3.mairuan.com/api.php'; 4 cjProtocol = 'https:'; 5 }else{ 6 var API = 'http://api3.mairuan.com/api.php'; 7 cjProtocol = 'http:'; 8 } 9 10$(function() { 11 12 var wd = $(window).width(); 13 var chanpinMenuOff = $('.chanpinMenuBox').offset(); 14 var duibiTableOff = $('.duibiTable').offset(); 15 16 $(window).scroll(function() { 17 scrollHeight = $(this).scrollTop(); 18 if (wd < 768) { 19 //é¦é¡µæµ®å¨è´ä¹°bannerx 20 var bannerH = $('.fixedBanner').height(); 21 if(scrollHeight > bannerH){ 22 $('.fixedbuy').removeClass('layui-hide'); 23 }else{ 24 $('.fixedbuy').addClass('layui-hide'); 25 } 26 } 27 28 /***产åå¯¼èªæ¬æµ®**/ 29 if(typeof(chanpinMenuOff) != 'undefined'){ 30 if(scrollHeight > chanpinMenuOff.top){ 31 $(".chanpinMenuBox").addClass("chanpinMenufixed"); 32 }else{ 33 $(".chanpinMenuBox").removeClass("chanpinMenufixed"); 34 } 35 } 36 if(typeof(duibiTableOff) != 'undefined'){ 37 if(scrollHeight > duibiTableOff.top){ 38 $(".duibiXTBT").addClass("duibiXTBTfixed"); 39 }else{ 40 $(".duibiXTBT").removeClass("duibiXTBTfixed"); 41 } 42 } 43 }); 44 45 //é¦é¡µ 46 $('.indexBanbenList a').hover(function(){ 47 var imagename = $(this).find('img').attr('data-imagename'); 48 $(this).find('img').attr('src', '//pic.mairuan.com/WebSource/flstudio/web/images/'+ imagename +'.png') 49 },function(){ 50 var imagename = $(this).find('img').attr('data-imagename'); 51 $(this).find('img').attr('src', '//pic.mairuan.com/WebSource/flstudio/web/images/'+ imagename +'h.png') 52 }); 53 54 /** 55 * æ°ç é¦é¡µ 56 */ 57 58 /* menu start */ 59 $("header .menuSarch .searchButtom").click(function(){ 60 searchUrl('searchValueMenu'); 61 }); 62 $("#searchValueMenu").focus(function(){ 63 if(this.value==this.defaultValue){ 64 this.value=''; 65 } 66 }); 67 $("#searchValueMenu").blur(function(){ 68 if(this.value==''){ 69 this.value=this.defaultValue; 70 } 71 }); 72 $("header .topSearch i").click(function(){ 73 $('header .topSearch').addClass('layui-hide'); 74 $('header .topSearchImg, .naviList').removeClass('layui-hide'); 75 }); 76 $("header .topSearch .searchButtom").click(function(){ 77 searchUrl('searchValueId'); 78 }); 79 $("#searchValueId").focus(function(){ 80 if(this.value==this.defaultValue){ 81 this.value=''; 82 } 83 }); 84 $("#searchValueId").blur(function(){ 85 if(this.value==''){ 86 this.value=this.defaultValue; 87 } 88 }); 89 $("header .topSearchImg img").click(function(){ 90 // $(this).addClass('layui-hide'); 91 // $('header .navList').parent().addClass('layui-hide'); 92 // $('header .topSearch').removeClass('layui-hide'); 93 $("#search_expand").addClass("active"); 94 // $(this); 95 96 }); 97 // $("#topSearchImg img").click(function(){ 98 // console.log(1111); 99 // }); 100 101 $('header .mMenu').click(function() { 102 if ($('header .content').hasClass('expand')) { 103 $('header .content').removeClass('expand').animate({ height: $(window).height()},300); 104 }else{ 105 $('header .content').addClass('expand').animate({ height: '1.267rem'},100); 106 } 107 }); 108 109 // ç¹å»å¼¹çªæç´¢æ¡ 110 $(".search img").click(function (event) { 111 $("#search_expand").eq(0).addClass("active"); 112 event.stopPropagation(); 113 }); 114 // ç¹å»ç©ºç½å°æ¹ï¼æç´¢æ¡æ¶å¤± 115 $(document).click(function (event) { 116 // å½æç´¢æ¡åºç°çæ åµä¸ï¼éèå® 117 if ($(".search_expand.active").length == 1) { 118 $(".search_expand").removeClass("active"); 119 } 120 });
121 // ç¹å»æç´¢æ¡èå´å ï¼æç´¢æ¡ç»§ç»åå¨ 122 $(".search_expand").click(function(event) { 123 event.stopPropagation(); 124 }); 125 /* menu end */ 126 127 // ç§»å¨ç«¯èåäºä»¶ 128 m_menu_init(); 129 // ç§»å¨ç«¯èåäºä»¶ 130 function m_menu_init() { 131 $(".menu_bar_menu").click(function() { 132 $(".tab_list").toggleClass("active"); 133 $(".top_menu").toggleClass("active"); 134 }); 135 } 136 137 //chajian.html 138 if( isPhone()){ 139 if( $(".swiperMain").length > 0){ 140 let swiperThumb = new Swiper(".swiperThumb", { 141 spaceBetween: 10, 142 slidesPerView: 4, 143 freeMode: true, 144 watchSlidesProgress: true, 145 }); 146 new Swiper(".swiperMain", { 147 loop: true, 148 spaceBetween: 30, 149 navigation: { 150 nextEl: ".swiper-button-next", 151 prevEl: ".swiper-button-prev", 152 }, 153 thumbs: { 154 swiper: swiperThumb, 155 }, 156 }); 157 } 158 }else{ 159 if( $(".swiperMain").length > 0){ 160 let swiperThumb = new Swiper(".swiperThumb", { 161 spaceBetween: 10, 162 slidesPerView: 4, 163 freeMode: true, 164 watchSlidesProgress: true, 165 }); 166 new Swiper(".swiperMain", { 167 loop: true, 168 slidesPerView: 2, 169 centeredSlides: true, 170 spaceBetween: 10, 171 navigation: { 172 nextEl: ".swiper-button-next", 173 prevEl: ".swiper-button-prev", 174 }, 175 thumbs: { 176 swiper: swiperThumb, 177 }, 178 }); 179 } 180 } 181 182 /** 183 * æ°ç 产å页 184 */ 185 var prodMenuOff = $('.prod_menu').offset(); 186 $(window).scroll(function() { 187 scrollHeight = $(this).scrollTop(); 188 // menu å¸é¡¶ 189 if(typeof(prodMenuOff) != 'undefined'){ 190 if( !isPhone() ){ 191 if($(".static-opay-common").length > 0){ 192 $(".prod_menu").css("top","60px"); 193 } 194 } 195 // if(scrollHeight > prodMenuOff.top){ 196 // $(".prod_menu").addClass("fl_prod_menu_fixed"); 197 // if($(".static-opay-common").length > 0){ 198 // if( !isPhone() ){$(".fl_prod_menu_fixed").css("top","60px");} 199 // else{$(".fl_prod_menu_fixed").css({ 200 // "top":"1rem", 201 // "height": "2rem" 202 // });} 203 // }else{ 204 // if( !isPhone() ){$(".fl_prod_menu_fixed").css("top","30px");} 205 // else{$(".fl_prod_menu_fixed").css({ 206 // "top":"1rem", 207 // "height": "2rem" 208 // });} 209 // } 210 // }else{ 211 // if( !isPhone() ){$(".prod_menu").removeClass("fl_prod_menu_fixed").css("top","0");} 212 // else{ 213 // $(".prod_menu").removeClass("fl_prod_menu_fixed").css({ 214 // "top":"0", 215 // "height": "1rem" 216 // }); 217 // } 218 219 // } 220 } 221 // 对æ¯thead å¸é¡¶ 222 // if(typeof(prodMenuOff) != 'undefined'){ 223 // if(scrollHeight > prodMenuOff.top){ 224 // $(".fl_prod_duibi table.first thead").addClass("layui-hide"); 225 // $(".fl_prod_duibi .tableFixed").removeClass("layui-hide"); 226 // if($(".static-opay-common").length > 0){ 227 // $(".fl_prod_duibi .tableFixed").css("top","130px"); 228 // }else{ 229 // $(".fl_prod_duibi .tableFixed").css("top","100px"); 230 // } 231 // }else{ 232 // $(".fl_prod_duibi table.first thead").removeClass("layui-hide"); 233 // $(".fl_prod_duibi .tableFixed").addClass("layui-hide"); 234 // } 235 // } 236 });
237 // $(".fl_prod_menu .content>span").click(function(){ 238 // $('html,body').animate({ 239 // scroll: 0 240 // }, 100); 241 // }); 242 243 /** 244 * æä»¶é¡µ start 245 */ 246 // å·²éåå 247 let goods = []; 248 249 // æç´¢ 250 // $(".plugIn_search .search").click(function(){ 251 // let _this = $(this); 252 // let search_word = _this.prev().val().toLowerCase(); 253 // let item_titles = $(".plugIn_m2 .item .v_title"); 254 // let items = $(".plugIn_m2 .item"); 255 // let txt_arr = []; // æ é¢ 256 // let conform_arr = []; // ç¬¦åæ é¢ 257 // if(search_word == ''){ 258 // items.css("display", "block"); 259 // return; 260 // } 261 // items.css("display", "none"); 262 // for(let i = 0 , len = item_titles.length ; i < len ; i ++){ 263 // txt_arr.push({"id": i , "title": item_titles[i].innerText.toLowerCase()}); 264 // } 265 // txt_arr.filter((item) => { 266 // if(item.title == search_word){ 267 // conform_arr.push(item.id); 268 // } 269 // }); 270 // for(let i = 0 , len = conform_arr.length ; i < len ; i ++){ 271 // items.eq(conform_arr[i]).css("display", "block"); 272 // }; 273 // $(".plugIn_m3 .more").addClass("layui-hide"); 274 // }); 275 // æ¥çæ´å¤ 276 $(".plugIn_m3 .more").click(function(){ 277 let _this = $(this); 278 let arr = $(".plugIn_m2 .item.layui-hide"); 279 for(let i = 0 ; i < 6 ; i ++){ 280 arr.eq(i).removeClass("layui-hide"); 281 } 282 if($(".plugIn_m2 .item.layui-hide").length == 0){ 283 _this.addClass("layui-hide"); 284 } 285 }); 286 // å å ¥è´ç©è½¦ æé®-éä¸ 287 $(".plugIn_m2 .item .addBuyCar").click(function(){ 288 let _this = $(this); 289 _this.parents(".item").addClass("active"); 290 let obj = {id: _this.data("id"), price: parseInt(_this.data("price"))}; 291 goods.push(obj); 292 updateNumPrice(goods); 293 }); 294 // å å ¥è´ç©è½¦ æé®-åæ¶ 295 $(".plugIn_m2 .item > i.close").click(function(){ 296 let _this = $(this); 297 let id = _this.data("id"); 298 _this.parent().removeClass("active"); 299 goods = goods.filter(item => { 300 return item.id != id; 301 }); 302 updateNumPrice(goods); 303 }); 304 // è´ç©è½¦ç»ç® 305 $(".plugIn_m4 .right .buynow").click(function(){ 306 send_getckeck(2, goods); 307 }); 308 // æ´æ°æ°é&æ»ä»· 309 function updateNumPrice(arr){ 310 let number = $(".plugIn_m4 .number"); 311 let total = $(".plugIn_m4 .price"); 312 313 number.text(arr.length); 314 let sum = 0; 315 arr.map( item => { 316 sum += item.price; 317 }); 318 total.text(sum); 319 } 320 321 /** 322 * æä»¶é¡µ end 323 */ 324 325 /** 326 * æ°ç ä¸è½½é¡µ 327 */ 328 layui.use('element', function(){ 329 var element = layui.element; 330 element.render(); 331 //è´ä¹°é¡µ 332 $(".doufu .layui-colla-title").click(function(){ 333 $(this).find("i").toggleClass("rotate"); 334 }); 335 //akia 336 $(".akia_fire_con5 .layui-colla-title i").html("").removeClass("akia_subt").addClass("akia_addt"); 337 $(".akia_fire_con5 .layui-show").prev().find("i").removeClass("akia_addt").addClass("akia_subt"); 338 $(".akia_fire_con5 img").addClass("akia_opent"); 339 340 }); 341 $(".dl_m2 .layui-colla-item").click(function(){ 342 let self = $(this); 343 let arrow = self.find(".layui-colla-title i"); 344 let flag = self.find(".layui-colla-content").hasClass("layui-show"); 345 346 $(".dl_m2 .layui-colla-title i").css("transform","rotate(90deg)"); 347 $(".dl_m2 .layui-colla-item").removeClass("active"); 348 if(flag){ 349 arrow.css("transform", "rotate(180deg)"); 350 self.addClass("active"); 351 }else{ 352 arrow.css("transform", "rotate(90deg)"); 353 self.removeClass("active"); 354 } 355 }); 356 357 $(".akia_fire_con5 .layui-colla-title").click(function(){ 358 $(".akia_fire_con5 .layui-colla-title i").html("").removeClass("akia_subt").addClass("akia_addt"); 359 $(".akia_fire_con5 .layui-show").prev().find("i").removeClass("akia_addt").addClass("akia_subt"); 360 $(this).parents(".main").children().find("img").removeClass("akia_opent"); 361 $(this).toggleClass("akia_opent"); 362 });
363 364 $(".akia_fire_con7 .layui-colla-item").click(function(){ 365 let arr = $(this).index()+1; 366 $('.akia_fire_con7 .layui-colla-item').removeClass("opent2"); 367 $(".akia_fire_con7 .layui-colla-item:nth-child("+arr+")").addClass("opent2"); 368 }); 369 370 if(wd >= 768){ 371 layui.use(['cycle'], function(cycle) { 372 $('.indexAnimate').cycle({ 373 'log': false, 374 'fx': 'carousel', 375 'timeout': 0, 376 'carouselFluid': 1, 377 'carouselVisible': '3', 378 'prev': '.indexGoLeft', 379 'next': '.indexGoRight', 380 }); 381 }); 382 } 383 384 /** 385 * orb 386 */ 387 if( $('.orb-btn1').length > 0 ){ 388 let num =1; 389 let btn = $('.orb-btn1'); 390 setInterval(() => { 391 num == 5 ? num = 0 : num; 392 btn.eq(num).click(); 393 num ++; 394 }, 5000); 395 } 396 $('#orb_download').click(function(){ 397 layer.open({ 398 btn: 0, 399 title: 'è¯ç¨ä¸è½½', 400 area: ['450px', '200px'], 401 content:'<div class="orb-xiazai">'+ 402 '<span>Orb Producer SuiteãWinã</span>'+ 403 '<a href="http://xiazai.mairuan.com/full/OrbProducerSuite.exe">ç«å³ä¸è½½</a>' + 404 '</div>'+ 405 '<div class="orb-xiazai">'+ 406 '<span>Orb Producer SuiteãMacã</span>'+ 407 '<a href="http://xiazai.mairuan.com/full/OrbProducerSuite.dmg">ç«å³ä¸è½½</a>'+ 408 '</div>', 409 }); 410 }); 411 412 /** 413 * ç¾ä¸è¡¥è´´è½å°é¡µ 414 */ 415 // é¢å 416 $(".butie_m1 .item .btns>span").click(function(){ 417 $(this).addClass("layui-hide"); 418 $(this).next().removeClass("layui-hide"); 419 }); 420 // å¤å¶ 421 $(".butie_m1 .item .btns .copy").click(function(){ 422 let txt = $(this).prev().text(); 423 copyToClip(txt); 424 }); 425 426 427 /*************ææº begin**********/ 428 if (wd < 768) { 429 $('.m_menu').click(function() { 430 if ($('.top').hasClass('m_o95')) { 431 $('.top').removeClass('m_o95').animate({ height: $(window).height() }, 300); 432 $(this).attr('src', '//pic.mairuan.com/WebSource/common/web/images/chacha_menu_white.png'); 433 } else { 434 $('.top').addClass('m_o95').animate({ height: '1.267rem' }, 100); 435 $(this).attr('src', '//pic.mairuan.com/WebSource/common/web/images/m_menu_white.png'); 436 } 437 }); 438 439 $('.footer .footerTitle').click(function() { 440 if ($(this).nextAll('ul').css('display') == 'none') { 441 $(this).nextAll('ul').removeClass('hide-xs'); 442 $(this).find('img').attr('src', '//pic.mairuan.com/WebSource/common/web/images/chacha.png'); 443 } else { 444 $(this).nextAll('ul').addClass('hide-xs'); 445 $(this).find('img').attr('src', '//pic.mairuan.com/WebSource/common/web/images/jia.png'); 446 } 447 }); 448 449 layui.use(['cycle'], function(cycle) { 450 $('.indexAnimate').cycle({ 451 'log': false, 452 'fx': 'carousel', 453 'timeout': 0, 454 'carouselFluid': 1, 455 'carouselVisible': '1', 456 'prev': '.indexGoLeft', 457 'next': '.indexGoRight', 458 }); 459 460 $('.supportMenu').cycle({ 461 'log': false, 462 'slides': '> li', 463 'fx': 'carousel', 464 'timeout': 0, 465 'prev': '.supportMenuPrev', 466 'next': '.supportMenuNext', 467 }); 468 }); 469 470 $('.m_xiazaiBtn').click(function(){ 471 var banben = $(this).attr('banben'); 472 if(banben == 'mac'){ 473 $('.xiazaimobile').find('.win').addClass('layui-hide'); 474 $('.xiazaimobile').find('.mac').removeClass('layui-hide'); 475 }else{ 476 $('.xiazaimobile').find('.win').removeClass('layui-hide'); 477 $('.xiazaimobile').find('.mac').addClass('layui-hide'); 478 } 479 480 layer.open({ 481 type: 1, 482 title: false, 483 closeBtn: 1, 484 area: ['8rem', '4.5rem'], 485 content: $('.xiazaimobile').html() 486 }); 487 return false; 488 }); 489 } 490 /*************ææº end**********/ 491 492 //analysys-start 493 $("a,button,input").on('click',function(){ 494 if( $(this).attr("class") ){ 495 var classes = $(this).attr('class').split(' '); 496 for(var j=0; j<classes.length; j++){ 497 if(classes[j].lastIndexOf('analysys_',0)===0 || classes[j].lastIndexOf('stats_',0)===0){ 498 //console.log('A: '+classes[j]);
499 //AnalysysAgent.track(classes[j]); 500 break; 501 } 502 } 503 } 504 }); 505 //analysys-end 506 507 /* menu start */ 508 $("header .menuSarch .searchButtom").click(function(){ 509 searchUrl('searchValueMenu'); 510 }); 511 $("#searchValueMenu").focus(function(){ 512 if(this.value==this.defaultValue){ 513 this.value=''; 514 } 515 }); 516 $("#searchValueMenu").blur(function(){ 517 if(this.value==''){ 518 this.value=this.defaultValue; 519 } 520 }); 521 $("header .topSearch i").click(function(){ 522 $('header .topSearch').addClass('layui-hide'); 523 $('header .topSearchImg, .naviList').removeClass('layui-hide'); 524 }); 525 $("header .topSearch .searchButtom").click(function(){ 526 searchUrl('searchValueId'); 527 }); 528 $("#searchValueId").focus(function(){ 529 if(this.value==this.defaultValue){ 530 this.value=''; 531 } 532 }); 533 $("#searchValueId").blur(function(){ 534 if(this.value==''){ 535 this.value=this.defaultValue; 536 } 537 }); 538 // $("header .topSearchImg").click(function(){ 539 // $(this).addClass('layui-hide'); 540 // $('header .naviList').addClass('layui-hide'); 541 // $('header .topSearch').removeClass('layui-hide'); 542 // }); 543 544 $('header .mMenu').click(function() { 545 if ($('header .content').hasClass('expand')) { 546 $('header .content').removeClass('expand').animate({ height: $(window).height()},300); 547 }else{ 548 $('header .content').addClass('expand').animate({ height: '1.267rem'},100); 549 } 550 }); 551 /* menu end */ 552 553 /* footer start */ 554 $('.footer .jia').click(function(){ 555 if ($(this).nextAll('ul').css('display') == 'none') { 556 $(this).nextAll('ul').removeClass('hide-xs'); 557 $(this).attr('src', '//pic.mairuan.com/WebSource/flstudio/web/new/images/jian.png'); 558 }else{ 559 $(this).nextAll('ul').addClass('hide-xs'); 560 $(this).attr('src', '//pic.mairuan.com/WebSource/flstudio/web/new/images/jia.png'); 561 } 562 }); 563 /* footer end */ 564 565 566 //----------------new-test-static-silder-------start--------------- 567 var QIYEKEFU = { 568 'flstudiochina': 569 { 570 'sales':[1,'https://work.weixin.qq.com/kfid/kfc2de53e42f0e84fba?enc_scene=ENCWSDwFP8LPJdCheAYA4QkQM'], 571 'cservice':[1,''], 572 } 573 } 574 var sitekfcate = 'sq'; 575 576 $('.static-silder').hide(); 577 $('body').prepend('<div class="new-static-silder newsilder"></div>'); 578 var silder_load_url = 'silder-fl/textsliber.html?v='+Date.parse(new Date()); 579 $('.newsilder').load('https://cdn.mairuan.com/'+silder_load_url,function(){ 580 //kefu 581 var qiyeObj = QIYEKEFU[SITE_ALIAS]; 582 if(qiyeObj){ 583 if(isPhone){ 584 //$('.menu_kefu.openKefu').attr('href','https://url.cn/58FAn8d?_type=wpa&qidian=true'); 585 $('a.menu_bar_kefu').attr('href',qiyeObj['sales'][1]); 586 $('a.menu_bar_kefu').attr('target','_blank'); 587 console.log('kefu:',qiyeObj['sales'][1]); 588 } 589 if(sitekfcate=='sq'){ 590 switch(qiyeObj['sales'][0]){ 591 case 1: 592 $('.ssilder_info .ssilder .zixunBtn').attr('href',qiyeObj['sales'][1]); 593 $('.ssilder_info .ssilder .zixunBtn').attr('target','_blank'); 594 break; 595 // case 2: 596 // $('.ssilder_info .zixunBtn').prop({ 597 // 'href': qiyeObj['sales'][3], 598 // 'target':'_blank' 599 // }); 600 // break; 601 default:; 602 } 603 $('.ssilder_info .artificial .title2').text('è´ä¹°å¨è¯¢'); 604 } 605 } 606 607 $(".click_kefu_sales").click(function(){ 608 $("#im_qd_sales_"+SITE_ALIAS)[0].click(); 609 }); 610 $(".click_kefu_cservice").click(function(){ 611 $("#im_qd_cservice_"+SITE_ALIAS)[0].click(); 612 }); 613 $('.ssilder_info .link .zixunBtn').click(function(){ 614 $('.ssilder_info .ssilder .zixunBtn')[0].click(); 615 }); 616 //hours 617 var myDate = new Date(); 618 var hours = myDate.getHours(); 619 $('.ssilder_info .greet_1').removeClass('morning noon afternoon night'); 620 if(hours>=6 && hours<=10){ 621 $('.ssilder_info .greet_1').addClass("morning"); 622 $('.ssilder_info .greet_2').text('ä¸å'); 623 }else if(hours>=11 && hours<=13){ 624 $('.ssilder_info .greet_1').addClass("noon"); 625 $('.ssilder_info .greet_2').text('ä¸å'); 626 }else if(hours>=14 && hours<=18){ 627 $('.ssilder_info .greet_1').addClass("afternoon"); 628 $('.ssilder_info .greet_2').text('ä¸å'); 629 }else if(hours>=18 || hours<=5){ 630 $('.ssilder_info .greet_1').addClass("night"); 631 $('.pos_info .greet_2').text('æä¸'); 632 } 633 //æ¹å客æç线å·ç 634 var webhost = window.location.host; 635 var iphonetxt = '400-8765-888'; 636 637 638 // ä¸´æ¶æ·»å 639 $(".newsilder .consult .main .faq a").attr('href',"/support.html"); 640 //$('.ssilder_info .phone span').text(iphonetxt); 641 642 $('.ssilder_info .link .tel span').text(iphonetxt); 643 //pathname 644 if($.inArray(location.pathname,['/newbuy.html','/newbuye.html','/newbuyt.html','/paysuccess.html','/qrcodebuy.html'])>=0){ 645 $('.pos_info .ssilder').hide(); 646 $('.pos_info .link').show(); 647 }else{ 648 $('.ssilder_info .ssilder').show(); 649 $('.ssilder_info .link').hide(); 650 } 651 });
652 653 //----------------new-test-static-silder-------end--------------- 654 655}); 656 657// å¸çå£ -- LP页 658$(function() { 659 // ç¹å»å³å»æ¢è´ 660 $('.hhssj190716 #ssjToNewbuyBtn').click(function(event) { 661 if($('.hhssj190716 .cover').length>0){ 662 $('.hhssj190716 .cover').fadeIn('fast'); 663 return; 664 } 665 666 var truename = $('.hhssj190716 [name="truename"]').val(); 667 var email = $('.hhssj190716 [name="email"]').val(); 668 var phone = $('.hhssj190716 [name="phone"]').val(); 669 var lid = $('.hhssj190716 [name="lid"]').val(); 670 671 if(!truename){ 672 layer.msg('请å®åå§å'); 673 return; 674 }else if(!/^.+@[a-z0-9]+\.[a-z]{2,4}$/.test(email)){ 675 layer.msg('请è¾å ¥æ£ç¡®çé®ç®±'); 676 return; 677 }else if(!/^1[1-9][0-9]{9}$/.test(phone)){ 678 layer.msg('请è¾å ¥æ£ç¡®çææºå·ç '); 679 return; 680 }else if(!lid){ 681 layer.msg('å®åidé误'); 682 return; 683 } 684 685 window.open('/newbuy.html?onlineid='+lid+'&trueName='+truename+'&email='+email+'&phone='+phone); 686 }); 687 688 // éèå·²æ¢å å¼¹çª 689 $('.hhssj190716 .hideShouqingBtn').click(function(event) { 690 $(this).closest('.cover').fadeOut('fast'); 691 }); 692 693 // banner æ·»å å®ç½å¾æ 694 if($('.hhssj190716 .cover').length>0){ 695 $('.hhssj190716 .banner').append('<img class="pa b150" style="left:50%;margin-left:100px;" src="http://pic.mairuan.com/WebSource/huishenghuiying/web/images/shishengji/p_5_hhssh.png">') 696 } 697 698 // å°ç¾åº¦ç¹å»äºä»¶ä¸ä¼ å°ç«å±±å¼æä¸ï¼ 699 // event_index_click_宿´çç«éæ¢è´ => params[] = ['index', 'click', '宿´çç«éæ¢è´'] 700 $("[baidujsapi]").click(function() { 701 var baidujsapi = $(this).attr('baidujsapi'); 702 var page_params = baidujsapi.split('_'); 703 window.collectEvent && window.collectEvent('page_event', { 704 page_name: page_params[1], 705 page_action: page_params[2], 706 page_element: page_params[3] 707 }); 708 }); 709}); 710 711/*页é¢js*/ 712layui.use(['form'], function(){ 713 layui.form.on('checkbox(duibiXT)', function(data){ 714 if(data.elem.checked){ 715 $('.duibiTable').find('.hiddenXT').addClass('layui-hide'); 716 }else{ 717 $('.duibiTable').find('.hiddenXT').removeClass('layui-hide'); 718 } 719 }); 720 layui.form.on('checkbox(duibiBT)', function(data){ 721 if(data.elem.checked){ 722 $('.duibiTable tr').not('.hiddenXT').find('.quanquan').addClass('bg-2'); 723 }else{ 724 $('.duibiTable tr').not('.hiddenXT').find('.quanquan').removeClass('bg-2'); 725 } 726 }); 727}); 728 729/** 730 * flag => 1: å个ç»ç® 2ï¼å¤ä¸ªç»ç® 731 */ 732function send_getckeck(flag, ids){ 733 let co_params; 734 735 if(flag == 1){ 736 co_params = { 737 webfrom: 2, 738 id: ids, 739 dpid: 0, 740 relsid: 0, 741 scdpid: 0, 742 num: 1 743 }; 744 }else if(flag == 2){ 745 let plug_id_arr = []; 746 var w_arr = []; 747 let n_arr = []; 748 749 for(let i = 0 , len = ids.length ; i < len ; i ++){ 750 plug_id_arr.push(ids[i].id); 751 w_arr.push(2); 752 n_arr.push(1); 753 } 754 co_params = { 755 webfrom: w_arr.join("|"), 756 id: plug_id_arr.join("|"), 757 dpid: 0, 758 relsid: 0, 759 scdpid: 0, 760 num: n_arr.join("|") 761 }; 762 } 763 // console.log(co_params); 764 getOrderCheckkey(co_params); 765} 766 767function getOrderCheckkey(params) { 768 var loading = layer.load(); 769 $.ajax({
770 url: apihost+'/Order/cheeckkey', 771 type: 'post', 772 xhrFields: {withCredentials: true}, 773 data: params 774 }) 775 .done(function(data) {console.log(data); 776 if(data.code == 200){ 777 location.href = uchost + '/ordercheck/' + data.data.checkkey; 778 }else{ 779 layer.msg(data.message); 780 } 781 }) 782 .fail(function(err) { 783 console.log(err); 784 }) 785 .always(function() { 786 layer.close(loading); 787 }); 788} 789 790function modalVideo2(videoUrl, width, height) { 791 792 // window.open (videoUrl); 793 794 if (!width) { width = '800px'; } 795 if (!height) { height = '600px'; } 796 var w = $(window).width(); 797 if(w <=767){ 798 width = '90%'; 799 height = ($(window).height() - 40) + 'px'; 800 } 801 layui.layer.open({ 802 type: 2, 803 title: false, 804 area: [width, height], 805 shade: 0.8, 806 closeBtn: 1, 807 shadeClose: false, 808 content: videoUrl, 809 }); 810} 811 812function copyToClip(content) { 813 let aux = document.createElement("input"); 814 aux.setAttribute("value", content); 815 document.body.appendChild(aux); 816 aux.select(); 817 document.execCommand("copy"); 818 document.body.removeChild(aux); 819 layer.msg('å¤å¶æå',{ 820 time: 1000 821 }); 822} 823 824//---------buy.html åådoufu详æ -------------- 825function buy_init() { 826 // 声ææä»¶å¼¹çªé¨å« 827 var pluginKeeper = 0; 828 var pluginIndex = -1; 829 $(".plugin_hover").hover(function() { 830 pluginKeeper++; 831 $(".pop_plugin_list").addClass("active"); 832 var x = $(this).offset().left - 210; 833 var y = $(this).offset().top + 20; 834 835 $(".pop_plugin_list").offset({left: x, top: y}); 836 837 // pluginIndex = $(".plugin_hover").index(this); 838 if ($(this).hasClass('producer')) { 839 pluginIndex = 0; 840 } else if ($(this).hasClass('signature')) { 841 pluginIndex = 1; 842 } else if ($(this).hasClass('allbundle')) { 843 pluginIndex = 2; 844 } else { 845 $(".buy_edition_plugin_list").removeClass('active'); 846 return; 847 } 848 $(".buy_edition_plugin_list").removeClass('active'); 849 $(".buy_edition_plugin_list").eq(pluginIndex).addClass('active'); 850 }, function() { 851 pluginKeeper--; 852 if (pluginKeeper <= 0){ 853 $(".pop_plugin_list").removeClass("active"); 854 } else {} 855 }); 856 857 $(".pop_plugin_list").hover(function() { 858 $(".pop_plugin_list").addClass("active"); 859 pluginKeeper++; 860 }, function() { 861 pluginKeeper--; 862 if (pluginKeeper <= 0){ 863 $(".pop_plugin_list").removeClass("active"); 864 $(".buy_edition_plugin_list").removeClass('active'); 865 } else {} 866 }); 867 868 // å£°æææ¯åæ°é¨å« 869 var specKeeper = 0; 870 $("#buy_reason_spec").hover(function() { 871 console.log('111') 872 specKeeper++; 873 $(".pop_spec_list").addClass("active"); 874 var x = $(this).offset().left - 210; 875 var y = $(this).offset().top + 20; 876 877 $(".pop_spec_list").offset({left: x, top:y}); 878 }, function() { 879 specKeeper--; 880 if (specKeeper <= 0){ 881 $(".pop_spec_list").removeClass("active"); 882 } 883 }); 884 885 // å¤çæ»å¨äºä»¶ 886 $(window).scroll(function() { 887 if (pluginKeeper > 0) { 888 var x = $(".plugin_hover").eq(pluginIndex).offset().left; 889 var y = $(".plugin_hover").eq(pluginIndex).offset().top; 890 $(".pop_plugin_list").offset({"left": x - 210, "top":y+20}); 891 } else {} 892 893 if (specKeeper > 0) { 894 var x = $("buy_reason_spec").offset().left; 895 var y = $("buy_reason_spec").offset().top; 896 $(".pop_spec_list").offset({"left": x - 210, "top":y+20}); 897 } 898 }); 899} 900 901//-------------------å计æ¶-------------------- 902var countdown_init = function() { 903 // Get countdown values 904 var data_init_value = $('.count-down').attr('data-init-value'); 905 var date = new Date(data_init_value); 906 var remaining_time = (date.getTime() - new Date().getTime()) / 1000; 907 908 var remaining_days = Number.parseInt(remaining_time/(24*3600)); 909 remaining_time = remaining_time%(24*3600); 910 var remaining_hours = Number.parseInt(remaining_time/(3600)); 911 remaining_time = remaining_time%(3600); 912 var remaining_munites = Number.parseInt(remaining_time/(60)); 913 remaining_time = remaining_time%(60); 914 var remaining_seconds = Number.parseInt(remaining_time); 915 916 // Create Countdown 917 var Countdown = { 918 919 // Backbone-like structure 920 $el: $('.count-down'), 921 922 // Params 923 countdown_interval: null, 924 total_seconds: 0, 925 926 // Initialize the countdown 927 init: function () { 928 929 // DOM 930 this.$ = { 931 days: this.$el.find('.bloc-time.days .figure'), 932 hours: this.$el.find('.bloc-time.hours .figure'), 933 minutes: this.$el.find('.bloc-time.min .figure'), 934 seconds: this.$el.find('.bloc-time.sec .figure') 935 }; 936 937 // Init countdown values 938 this.values = { 939 days : remaining_days, 940 hours : remaining_hours, 941 minutes: remaining_munites, 942 seconds: remaining_seconds, 943 }; 944 945 // Initialize total seconds 946 this.total_seconds = (this.values.days * 60 * 60 * 24) + (this.values.hours * 60 * 60) + (this.values.minutes * 60) + this.values.seconds; 947 948 // Animate countdown to the end 949 this.count(); 950 }, 951 952 count: function () { 953 954 var that = this, 955 $day_1 = this.$.days.eq(0), 956 $day_2 = this.$.days.eq(1), 957 $hour_1 = this.$.hours.eq(0), 958 $hour_2 = this.$.hours.eq(1), 959 $min_1 = this.$.minutes.eq(0), 960 $min_2 = this.$.minutes.eq(1), 961 $sec_1 = this.$.seconds.eq(0), 962 $sec_2 = this.$.seconds.eq(1); 963 964 this.countdown_interval = setInterval(function () { 965 966 if (that.total_seconds > 0) { 967 968 --that.values.seconds; 969 970 if (that.values.minutes >= 0 && that.values.seconds < 0) { 971 972 that.values.seconds = 59; 973 --that.values.minutes; 974 } 975 976 if (that.values.hours >= 0 && that.values.minutes < 0) { 977 978 that.values.minutes = 59; 979 --that.values.hours; 980 } 981 982 // Update DOM values 983 // Days 984 that.checkTime(that.values.days, $day_1, $day_2); 985 986 // Hours 987 that.checkTime(that.values.hours, $hour_1, $hour_2); 988 989 // Minutes 990 that.checkTime(that.values.minutes, $min_1, $min_2); 991 992 // Seconds 993 that.checkTime(that.values.seconds, $sec_1, $sec_2); 994 995 --that.total_seconds; 996 } 997 else { 998 clearInterval(that.countdown_interval); 999 } 1000 }, 1000); 1001 }, 1002 1003 animateFigure: function ($el, value) { 1004 1005 var that = this, 1006 $top = $el.find('.top'), 1007 $bottom = $el.find('.bottom'), 1008 $back_top = $el.find('.top-back'), 1009 $back_bottom = $el.find('.bottom-back'); 1010 1011 // Before we begin, change the back value 1012 $back_top.find('span').html(value); 1013 1014 // Also change the back bottom value 1015 $back_bottom.find('span').html(value); 1016 1017 // Then animate 1018 TweenMax.to($top, 0.8, { 1019 rotationX: '-180deg', 1020 transformPerspective: 300, 1021 ease: Quart.easeOut, 1022 onComplete: function () { 1023 1024 $top.html(value); 1025 1026 $bottom.html(value); 1027 1028 TweenMax.set($top, { rotationX: 0 }); 1029 } 1030 }); 1031 1032 TweenMax.to($back_top, 0.8, { 1033 rotationX: 0, 1034 transformPerspective: 300, 1035 ease: Quart.easeOut, 1036 clearProps: 'all' 1037 }); 1038 }, 1039 1040 checkTime: function (value, $el_1, $el_2) { 1041 1042 var val_1 = value.toString().charAt(0), 1043 val_2 = value.toString().charAt(1), 1044 fig_1_value = $el_1.find('.top').html(), 1045 fig_2_value = $el_2.find('.top').html(); 1046 1047 if (value >= 10) { 1048 1049 // Animate only if the figure has changed 1050 if (fig_1_value !== val_1) this.animateFigure($el_1, val_1); 1051 if (fig_2_value !== val_2) this.animateFigure($el_2, val_2); 1052 } 1053 else { 1054 1055 // If we are under 10, replace first figure with 0 1056 if (fig_1_value !== '0') this.animateFigure($el_1, 0); 1057 if (fig_2_value !== val_1) this.animateFigure($el_2, val_1); 1058 } 1059 } 1060 }; 1061 1062 // Let's go ! 1063 Countdown.init(); 1064} 1065 1066//---------æ«ç æ¯ä»----------- 1067$(".buy_edition_item .buy_edition_buynow .buy").click(function(e){
1068 var li = document.getElementsByClassName('buy'); 1069 for(var i = 1; i < li.length; i++){ 1070 li[i].onclick = function(){ 1071 for(var i = 1; i < li.length; i++){ 1072 $(li[i]).show(); 1073 $(li[i]).parent().parent().find('.xieyi').hide(); 1074 $(li[i]).parent().parent().find('.foot').show(); 1075 $(li[i]).parent().parent().find('.scanpay').hide(); 1076 $(li[i]).parent().parent().find('.buy_edition_price').show(); 1077 $(li[i]).parent().parent().find('.buy_edition_intro').removeClass("pb20"); 1078 } 1079 $(this).hide(); 1080 $(this).parent().parent().find('.scanpay').show(); 1081 $(this).parent().parent().find('.foot').hide(); 1082 $(this).parent().parent().find('.xieyi').show(); 1083 $(this).parent().parent().find('.buy_edition_price').hide(); 1084 $(this).parent().parent().find('.buy_edition_intro').addClass("pb20"); 1085 } 1086 } 1087}); 1088 1089/*$(".top_right").click(function(e){ 1090 var text= $(this).find('.text').html(); 1091 if(text == 'å ¨é¢æ¯ä»'){ 1092 $(this).find('.text').html('å æ¯åæ'); 1093 $(this).parent().find('.box_wx').show(); 1094 }else{ 1095 $(this).find('.text').html('å ¨é¢æ¯ä»'); 1096 $(this).parent().find('.box_wx').hide(); 1097 } 1098});*/ 1099 1100//ç¹å»ç»å½ 1101$(".qrcodebuy_login").click(function() { 1102 $(".tab_saoma")[0].click(); 1103}); 1104 1105//æ£æµæ¯å¦æè´ä¹°æåçåå 1106var qrcodebuy_goodsid = new Array(); 1107$(".qrcodebuy_goodsid").each(function(){ 1108 var ls_goodsid = $(this).val(); 1109 if(ls_goodsid>0){ 1110 qrcodebuy_goodsid.push(ls_goodsid); 1111 } 1112}); 1113var qrcodebuy_goodsids = qrcodebuy_goodsid.join(","); 1114if(qrcodebuy_goodsids!=''){ 1115 var myVar = setInterval(function(){ CheckQrcodebuySta() }, 1500); 1116} 1117 1118//æ£æµQrcodebuyæ¯å¦å·²ç»æ¯ä»å®æï¼å®æ¶ï¼ 1119function CheckQrcodebuySta(goodsids){ 1120 var datas = {cms_token:$('.cms_token').val()}; 1121 $.ajax({ 1122 url: API+'/Web/qrcodebuycheck', 1123 method: 'post', 1124 data: datas, 1125 xhrFields: {withCredentials: true}, 1126 success: function(res){ 1127 if(res.code==200){ 1128 layer.msg('æ¯ä»æåï¼æ£å¨ä¸ºæ¨æ´æ°æ°æ® ...',{time:1000},function(){ 1129 var orderid = res.data.orderid; 1130 location.href = '/paysuccess.html?orderid='+orderid; 1131 }); 1132 return; 1133 } 1134 } 1135 }) 1136} 1137 1138 1139/* training.html- 7天åºç¡è®ç»è¥-start */ 1140/*è§é¢hoverææ¾-start*/ 1141(function(a) { 1142 a.fn.hoverDelay = function(c, f, g, b) { 1143 var g = g || 500, //hover entry time 1144 b = b || 100, //hover departure time 1145 f = f || c; 1146 var e = [], 1147 d = []; 1148 return this.each(function(h) { 1149 a(this).mouseenter(function() { 1150 var i = this; 1151 clearTimeout(d[h]); 1152 e[h] = setTimeout(function() { 1153 c.apply(i) 1154 }, 1155 g) 1156 }).mouseleave(function() { 1157 var i = this; 1158 clearTimeout(e[h]); 1159 d[h] = setTimeout(function() { 1160 f.apply(i) 1161 }, b) 1162 }) 1163 }) 1164 } 1165})(jQuery); 1166 1167function formatTime(t){ 1168 var h = parseInt(t/3600) 1169 h = h<10?'0'+h:h 1170 var m = parseInt(t%3600/60) 1171 m = m<10?'0'+m:m 1172 var s = parseInt(t%60) 1173 s = s<10?'0'+s:s 1174 return m+':'+s 1175} 1176 1177$(".item .video8").hoverDelay(function(){ 1178 // å¾ç => è§é¢ 1179 let _this = $(this); 1180 let videourl = _this.attr("data-vid"); 1181 if(videourl.length > 0){ 1182 _this.find("img.poster").hide(); 1183 _this.find(".control").show(); 1184 _this.find(".preview").attr("src", videourl); 1185 1186 let {totalT,presentT} = {totalT:0,presentT:0} 1187 let audio_btn = _this.find("i.audio")[0]; 1188 let full_video_btn = _this.find(".preview")[0]; 1189 let full_btn = _this.find("i.full")[0]; 1190 let video = _this.find(".preview")[0]; 1191 _this.find(".preview").show(); 1192 video.addEventListener("canplay",function(){ 1193 video.play(); 1194 totalT = formatTime(this.duration); 1195 _this.find(".control").find("i.total").text(totalT); 1196 }) 1197 video.addEventListener('timeupdate',function(){ 1198 presentT = formatTime(this.currentTime); 1199 _this.find(".control").find("i.present").text(presentT); 1200 }) 1201 full_video_btn.addEventListener('click',function(){ 1202 //video.webkitRequestFullScreen(); 20220915 å¼ æé£ 1203 width = '800px'; 1204 height = '600px'; 1205 var w = $(window).width(); 1206 if(w <=767){ 1207 width = '90%'; 1208 height = ($(window).height() - 40) + 'px'; 1209 } 1210 layui.layer.open({ 1211 type: 2, 1212 title: false, 1213 area: [width, height], 1214 shade: 0.8, 1215 closeBtn: 1, 1216 shadeClose: false, 1217 content: videourl, 1218 }); 1219 1220 }) 1221 full_btn.addEventListener('click',function(){ 1222 //video.webkitRequestFullScreen(); 20220915 å¼ æé£ 1223 width = '800px'; 1224 height = '600px'; 1225 var w = $(window).width(); 1226 if(w <=767){ 1227 width = '90%'; 1228 height = ($(window).height() - 40) + 'px'; 1229 } 1230 layui.layer.open({ 1231 type: 2, 1232 title: false, 1233 area: [width, height], 1234 shade: 0.8, 1235 closeBtn: 1, 1236 shadeClose: false, 1237 content: videourl, 1238 }); 1239 1240 }) 1241 audio_btn.addEventListener('click',function(){ 1242 _this.find("i.audio").toggleClass("off"); 1243 video.muted = !video.muted; 1244 }) 1245 } 1246 1247}, function(){ 1248 // è§é¢ => å¾ç 1249 let _this = $(this); 1250 _this.find("img.poster").show(); 1251 _this.find(".control").hide(); 1252 _this.find(".preview").attr("src", "").hide(); 1253}); 1254/*è§é¢hoverææ¾-end*/ 1255
1256/* training.html- 7天åºç¡è®ç»è¥-end */ 1257 1258//åºåå·éªè¯æ¡ 1259// function serial_no(goodsid){ 1260// document.getElementById("submitRegcode").setAttribute("data-goodsid",goodsid); 1261// $(".update_verify_error").hide(); 1262// $(".layui-layer-shade").hide(); 1263// $(".serialbg").show(); 1264// }; 1265// $('.serialbg .layui-layer-close2').on('click',function(){ 1266// $(".serialbg").hide(); 1267// }); 1268 1269 1270 1271 1272 1273// FL Studio Mobile #7654 1274 1275if($('.fl-mobile-banner').length){ 1276 let html = `<img src="//pic.mairuan.com/WebSource/flstudio/web/images/flMobile/banner_mac_qrcode.png" width="160" />`; 1277 if(!isPhone()){ 1278 let tipsIndex; 1279 $("[btn_over_mac]").on("mouseenter", function(){ 1280 tipsIndex = layer.tips(html, this, { 1281 tips: [3, '#21272B'] 1282 }); 1283 }).on("mouseleave", function(){ 1284 layer.close(tipsIndex); 1285 }) 1286 } 1287 $("[btn_over_google]").click(function(){ 1288 layer.msg('䏿å®ç½ä¸æä¾ä¸è½½ï¼éè¦ä¸è½½FL Studio Mobile å®åç请èªè¡åå¾è°·æPlayååºè·å'); 1289 }) 1290}
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.